refactor-tractor's Issues
testing
- item
investigate sleep test appearing at end of `hydration-test.js`
right now, the last test in Hydration says should find sleep quality by day for that days week
looks like it's actually testing a hydration thing and might just need to be renamed
make "winner's steps this week" (last yellow box) dynamic to show steps for any week
we can't see why this is needed
Test Audit: User
Responsive: Desktop/Laptop
Test Audit: Sleep
Achieve ~100% in Accessibility Audit
lint
Test Audit: Activity
make dashboard display information in a clear way on multiple screens
(from original project spec)
figure out prettier
- then show us how it works
- and make our code prettier!
App is viewable when tested w/ colorblind extension
delete display on lower left of "increasingly active on these dates"
it's not helpful, not called for in the spec, and taking up a lot of space -- but also it's not really hurting thing and as David said, "if it ain't broke don't fix it"
Retrieve User Data
fix failing final test in hydration
idea: maybe fix by adding check so that if parameters are undefined, have a message saying no real data was passed through
Also not immediately clear why we even need this; maybe we could just eliminate that method? It seems to be related to calculateRandomWeekOunces
and the display on DOM of some way-past week's water consumption. Just remove all this stuff?
HTML is semantic (ARIA tags if appropriate)
add validation and error handling to form
fix friend steps calculation to calculate total, not average, for the week
resolve mismatches between sleep dashboard spec and actual display
-
remove all-user average sleep quality
-
remove data from random week in July of 2019 (second pink box on the right)
-
display user sleep quality over latest week (sleep hours is already there but need to add quality)
-
display this particular user's all-time average for sleep hours and quality (third bullet in spec)
change `var` to `let` or `const` throughout
build test(s) for `calculateAllUsersSleepQuality`
Responsive: Tablet
display user's distance walked (in miles) for a given day
Test Audit: Hydration
fix `userrepo-test.js` so that `npm test` doesn't choke on it
investigate unused parameters in `isolateUsernameAndRelevantData` method in `User-repo.js`
There are two unused parameters: dataSet
and date
. Should they be used? Or should they be deleted?
display average step count goal for all users in panel with user info
from original spec, iteration 1 dashboard, third bullet
- have functionality related to this on line 91 of
scripts.js
but missing the actual function that would do it. - note that this should not be hard-coded! Need to actually calculate the average
Retrieve Activity Data
pull test data out into separate `test-data.js` file(s)
Investigate mismatch between spec & tests for finding quality sleepers
Second-to-last bullet in Iteration 3 Sleep data asks to find all users with avg sleep quality greater than 3, but in Sleep-test.js
the fourth-to-last and third-to-last tests are looking for the user with the best quality sleep
break out test for 3-day increasing activity into its own describe block in `activity-test.js`
... instead of having it buried in the "Friend Activity" describe block, where it doesn't belong
fix display to give units of feet, not meters, for user's stride length
Test Audit: User-Repo
make sure user can be a weekly-step-count winner in friendly competition
look through all class files & `scripts.js` and make sure variable and method names are clear, sensible, and not too long
- As part of this, make sure to fix description of hydration test that makes it sound like only the first week's data is included
- Do things like "calculate" -> "calc"
Brainstorm Inheritance Implementation
Consider making User-Repo the parent class
refactor obviously WET code in class files
(just scrolling through Sleep.js
, for example, we noticed a few places where there were nearly identical functions that differ only in whether they're dealing with sleep hours or sleep quality)
User can tab through app w/o mouse
investigate unused variable `showcaseWinner` on line 68 in `Activity.js`
Responsive: Mobile
Retrieve Sleep Data
Refactor existing CSS into SASS
Refactor the existing CSS into Sass:
-
Break your Sass out into separate files
- index.scss
- variables.scss
- additional partials (if needed)
-
Install normalize or reset file to help with cross-browser compatibility
-
Review for other opportunities for modularity/partials
investigate chart.js -- how to use it?
- Draft charts
- Insert data from server
David sez: "I think chart.js works well! Itβs definitely the quickest option. If you really wanted a challenge, you could also consider D3."
Lucas from Mod 3 sez:
- there are YouTube videos available
- we can consult his GH repo if needed and/or ask him questions
- best way forward is to get it implemented and then build one chart to play around with
- can set up in two ways:
- (more difficult option) as a dependency
- (easier but not as clean option) import via a scripts tag in html; charts will need to live in our main js file and in onload functions
- if the easy way goes smoothly enough, we can always implement the dependency way later to make things cleaner
Add Activity Data
POST - http://localhost:3001/api/v1/activity
{
"userID": integer, "
date": string,
"numSteps": integer,
"minutesActive": integer,
"flightsOfStairs": integer
}
- Error Handling
Add Hydration Data
POST - http://localhost:3001/api/v1/hydration
{
"userID": integer,
"date": string,
"numOunces": integer
}
- Error Handling
Add Sleep Data
POST - http://localhost:3001/api/v1/sleep
{
"userID": integer,
"date": string,
"hoursSlept": integer,
"sleepQuality": integer
}
- Error Handling
fix bug in date-getting methods in `User-repo.js`
bug is that userRepo.getWeekFromDate
(and probably also userRepo.getFirstWeek
) gets the seven date entries leading up to the current one, which may or may not be the previous week.
For example, in the Hydration
class file, something like userRepo.getWeekFromDate('2019/09/18', 4, this.hydrationData
will return an array like
[
{ userID: 4, date: '2019/09/18', numOunces: 40 },
{ userID: 4, date: '2019/09/17', numOunces: 40 },
{ userID: 4, date: '2019/09/16', numOunces: 30 },
{ userID: 4, date: '2019/09/15', numOunces: 30 },
{ userID: 4, date: '2019/04/15', numOunces: 36 },
{ userID: 4, date: '2019/03/15', numOunces: 35 },
{ userID: 4, date: '2018/02/01', numOunces: 28 }
]
where the last three dates are from months ago, not earlier dates in the same week.
Note that I ran into this issue using the sample data in hydration-test.js
, so the problematic array above will be different when the methods are run using the real data.
Those methods will also return an array with less than seven entries if there aren't seven days leading up to the relevant date.
Retrieve Hydration Data
fix `accomplishStepGoal` if condition
right now, it looks like it only checks that steps are equal to goal and will return false if steps exceed goal, but of course the goal is met even if the steps are greater than that goal
calculate, test, and display user weekly total steps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.