This project was bootstrapped with Create React App.
- npm >= v5.2
- Other package managers can be used so long as they are supported by
Create-React-App
- Other package managers can be used so long as they are supported by
- Nodejs >= v8.x
- Two open terminals at the root of the application
$ npm install
to install dependencies$ npm start
to run the React application- In the other terminal,
$ npm run server
to run the express server on port: 9001 - In the browser of your choice, navigate to
localhost:3000
- The React application:
- Uses Redux for global state management
- The Express server (
/src/server
):- Receives http requests from the React application
- Make http requests to public Gaia API's using Axios
- Redux pipeline:
- Actions:
- Dispatched by the React Application to trigger middleware and reducers
- Middleware:
- Listens for actions and maps them to handlers > await an http request to the express server
- Handles success by dispatching a success action
- Handles failure by dispatching a failure action
- Then calls
next(action)
to pass the action to the reducers
- Listens for actions and maps them to handlers > await an http request to the express server
- Reducer - Handles updating application state based on certain actions
- Actions:
- Once the project is running, open the codebase in your editor of choice
- Navigate to
/src/App.js
- Find the TODO comment in the render method
- In the render method for
<App />
, you will seeepisodes
,seriesProcessing
, andseriesError
- These variables are hydrated from data in the redux store which is populated on mount of
<App />
seriesProcessing
- Indicates whether or not a series request is being madeseriesError
- Is the error message, should an http request for series failepisodes
is an array of 5 episode objects in the form:
- These variables are hydrated from data in the redux store which is populated on mount of
episode = {
tileArtLarge: string,
tileArtMedium: string,
tileArtSmall: string,
title: string,
seasonNum: number,
episodeNum: number,
durationSeconds: number,
teaser: string,
playlist: boolean,
}
- Install and use any packages you wish
- Add any folders and files you may need to organize your code
- This codebase has Redux Dev tools enabled
- This challenge should take around 3 hours
Please meet as many of the following criteria as you can in the allotted time
-
Build a
<Section />
component fromepisodes
: -
UI requirements:
- Section container
max-width: 1070px;
min-width: 450px;
- Breakpoints
- Screen width > 1069px
- Active episode/teaser and episode list should render side by side
- Screen width < 1070px
- Active episode/teaser should render on top of episode list
- Screen width > 1069px
- See large breakpoint mock above for episode list styling based on different states:
- Default
- Active
- Hover
- Other Specific Styles:
- Play button -
background-color: #01b4b4;
- Play button hover -
background-color: #007172;
- Ellipse button -
background-color: #5c738;
- Ellipse button hover -
background-color: #44576b;
- Play button -
- In episode list, format episode.durationSeconds to nearest
(MM) mins
- Use best judgement for spacing within the section
- Use optimal thumbnail image size as screen width changes
- For any styling that is undefined, make your best effort to preserve the sprit of the mock images above
- OPTIONAL - add any additional UI/UX polish
- Skipping this step will not be counted against you
- Section container
-
UX Requirements:
- Play button
(>)
- onClick:- Noop
- Episode item - onClick:
- Toggle episode styling in the episode list (see large breakpoint mock above)
- Toggle the active episode display to the clicked episode
- The active episode consists of:
- Label
- Thumbnail
- Playlist
- Teaser
- Playlist button
(+)/(-)
- onClick:- Preferred implementation:
- Dispatch a Redux action that updates the playlist property on the active episode in the Redux store
- Playlist state should not persist through page refresh
- Playlist state should persist through active episode toggles
- Preferred implementation:
- Play button
- Implemented functionality meets acceptance criteria
- It should demonstrate:
- Understanding of React rendering lifecycle
- Effective state management
- Concise CSS
- Well-defined component Structure