Coder Social home page Coder Social logo

swapi-box's Introduction

SWAPI-Box

Set-Up Front-End:

Clone this repo
Run npm install from the root directory
Run npm start and visit localhost:3000 in your browser

Background / About:

This app is based on a project to practice React, API fetch calls, and asynchoronous testing with Jest/Enzyme. The project uses the open-source Star Wars API, SWAPI, for all data calls.

Primary Technologies Used:

  • React
  • Javascript
  • HTML
  • SASS/SCSS
  • Jest/Enzyme

Test Driven Development:

Jest and Enzyme for front-end testing.
Run npm test from the root directory

Enhancements:

  • Add radial star animations in background of app.
  • Add more/add less button functionality on cards.
  • Save favorites in local storage.

Screenshot:

gif of app

Original Assignment:

SWAPI-Box project from Turing School of Software and Design

Contributors:

Karin Ohman

Wireframes:

landing wireframe
card wireframe

swapi-box's People

Contributors

kaohman avatar

swapi-box's Issues

Refactoring

  • Responsive layout
  • Refactor app render
  • Refactor switch statement on card

Favorites

  • There should be a button on each card to save it to Favorites.
  • There should also be a button that when clicked, displays only the favorited cards.
  • This button should also show the count of favorited items in the button text.
  • Users should be able to unfavorite a card.
  • If there are no favorites, there should be a message indicating that there are no favorites.

Extensions

  • Implement a More button. When clicked, the next 10 items of that category should be shown. There should be a Back button to go back to the previous page.
  • Have your data persist in localStorage. Think about when you want to store it.
  • Add radial stars animation

Get People

  • When a user clicks on People, the page is populated with cards with data for each person.
  • The cards should have:
    Name
    Homeworld
    Species
    Population of Homeworld
    A button to “Favorite” the person
  • The button should have an active class indicating it has been pressed.

PropTypes

PropTypes added to all components:

  • Landing
  • CardContainer
  • ControlForm
  • People
  • Planets
  • Vehicles
  • Favorites

Get Planets/Vehicles

  • When a user clicks on any of the other buttons, the data should then represent the button pressed.
  • Planet Cards:
    Name
    Terrain
    Population
    Climate
    Residents
    A button to “Favorite” the planet
  • Vehicle Cards:
    Name
    Model
    Class
    Number of Passengers
    A button to “Favorite” the vehicle

Landing Page

  • When the app starts up '/' the user should see the opening scrolling text of a random film, with the title of the film and release year listed below.
  • There should be buttons to browse three different categories: People, Planets, and Vehicles.
  • There should be a button to view favorites, with the number of current favorites indicated.

Testing

Testing completed for all components:

  • App - issues with componentDidMount
  • Landing
  • CardContainer
  • ControlForm
  • Loading
  • Cards

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.