Giter Site home page Giter Site logo

giphy-api's Introduction

Week 6 homework assignment:

Giphy API

ActionTastic - Basic Assignment User Story

  • I created an ActionTastic Fun App full of gifs using the giphy api!!!
  • Here is the documentation for the Giphy API: https://github.com/Giphy/GiphyAPI
    • I made an array of actions and made buttons out of them.
  • When you click on a button, 10 images are retrieved from giphy and displayed on the page.
  • When you click on the image, the gif plays. When you click again, the gif stops playing.
  • Yu can add a new action from the form on the right side of the page. The actions will be added to the array of actions and added as a new button
  • The rating of each gif will also appear on the page.

Heroku: http://polar-ocean-58067.herokuapp.com/

Copyright

Jahdasha Flagg (C) 2016. All Rights Reserved.

giphy-api's People

Contributors

jahdasha avatar

Watchers

 avatar

giphy-api's Issues

Feedback - Week 6 Assignment

Hey @jahdasha, I cloned your repo and took a look at your Giphy page.

Very nice job. All the required functionality is there and it meets all the specs of the homework. It was a nice touch trying to add the remove last button. I did notice one bug that we didn't ask for in the instructions, but it should be a quick fix (if you want to use this as portfolio piece) besides trying to get the remove last button to work. You've got $("#action-input") correctly trimming for blank spaces, but I can still submit a single empty space and create a blank button. If shouldnt be more than a simple if statement to catch this bug and stop allowing users to do make broken/blank buttons.

As for your remove last button, console says action is undefined, because we don't require an argument in the removeLastButton function. So what's happening is it registers an onClick event and then tries to .pop(), but breaks. The return false no longer works and the page is reloading as opposed to re-rendering the buttons. I was tempted to try to figure out a way to define action, but realized that's too complicated. The pop(), method literally just removes the last action from your array. so instead of actions.pop(action), action.pop() works, doesn't need to define what to pop off. And everything looks good from here.

Overall excellent homework, the only thing I might nitpick on is the indentation for your javascript.js All the main logic is wrapped in a document.ready() and seeing all the rest of your code up against the gutter (all the way left) looks weird to me. All this code is within the scope of the .ready(function and should be indented so. It may seem like something minor now, but it's a good habit to always use indenting to make things easier to read for yourself and especially other people reading your code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.