question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create dailyTracker.js sub-component for weeklyTracker.js

See original GitHub issue

Task Use the mockup in the design directory to create a dailyTracker.js sub-component for weeklyTracker.js

See the following for the design/wireframes/CORONATRACKER UI-#1 This component is the sliders which show “You said you felt x/10 today”. It is below the Calendar.

weeklyTracker.js will hold the four dailyTracker.js components. One for the last four days.

What done looks like:

  1. See if you can find a component that already handles this online. If so, just import it, and figure out how to style it in weeklyTracker.css like the mockup.
  2. Add comments to explain code if necessary
  3. We have dailyTracker.js component in /components.
  4. We have dailyTracker.css file in /css to style the dailyTracker.js sub-component.
  5. They are slideable and change color as per the mockup.
  6. Takes state of symptoms and passes to the redux store
  7. Can set an alert for a reminder to add state later
  8. Takes state of symptoms and passes to the database for storage

@BrianHHough to add more clarity on functionality. @SomeMoosery will add clarity on what needs to passed to the database and/or redux.

Design considerations: We have decided to use regular CSS files to keep things simple for now. This allows for more contributors and less time to upskill to contribute.

Once MVP is done the team can discuss if we want to transition it to styled-components or something like CSS modules.

Folder paths CSS is located in /client/src/css Components are located in /client/src/components

Style guide for CSS files: Naming convention: Component -> dailyTracker.js CSS file -> dailyTracker.css

To avoid naming collisions: prefix class names with the name of component and link with kebab case. Class name -> .dailyTracker.js-header { ... }

How to handle state: If you can use redux, use it. Create action and reducer with an appropriate name.

Testing: No need to worry about testing for now. If you choose to add tests, please place in client/src/tests

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
BrianHHoughcommented, Mar 16, 2020

will need the bar image that belongs on the far left side

Hey @sedmo: the bar image is here as SVG and PNG: “Calendar_Three-Lines.png/.svg” here: https://github.com/COVID-19-electronic-health-system/Corona-tracker/tree/master/client/src/img

0reactions
AdhamAHcommented, Apr 5, 2020

this was fixed in #323

Read more comments on GitHub >

github_iconTop Results From Across the Web

In ReactJs, How do I create subcomponent using extends
import React from 'react'; class App extends React.Component { render() { return ( <div> <AuditTable/> </div> ); } } var AuditTable = class ......
Read more >
Components Basics - Vue.js
Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. It's common for an...
Read more >
Render Sub-component Error in React.js using Error Boundaries
This guide will cover the implementation of error boundaries to handle errors in the React UI hierarchy with pro tips. Creating Error Boundary ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found