Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wire up ratings and sensor data feed to frontend #67

Merged
merged 3 commits into from
Mar 4, 2019

Conversation

fungjj92
Copy link
Contributor

@fungjj92 fungjj92 commented Mar 4, 2019

Overview

This sprint, we set up all the data needed for the front-end. This PR subs in dynamically generated data to the frontend, which previously showed static dummy data.

Connects #41
Connects #43

(I accidentally did both)

Demo

screen shot 2019-03-04 at 1 00 19 pm

screen shot 2019-03-04 at 1 00 28 pm

screen shot 2019-03-04 at 12 32 27 pm

screen shot 2019-03-04 at 12 32 37 pm

Notes

You will see some TODOs. We will need some guidance from the client about how the variable score translates to qualitative buckets (positive, warning, and negative) given its range (i.e. 1-50NTU for Turbidity). For now, it was decided to just categorize scores as positive and negative if they are in or outside the range, respectively.

I was tempted to roll in #64, but am anticipating a fair amount of conflict rebasing on #63 already so I forewent that.

Testing Instructions

Netlify will suffice.

@fungjj92 fungjj92 requested a review from caseycesari March 4, 2019 19:01
@fungjj92 fungjj92 force-pushed the jf/wire-up-ratings-to-frontend branch from cd46bb8 to f8fa9e0 Compare March 4, 2019 19:11
Copy link
Contributor

@caseycesari caseycesari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Cool to see this wired up.

src/app/src/sensorUtils.js Outdated Show resolved Hide resolved
const scoreWithUnit = `${score} ${unit}`;
const range = `${HealthyRanges[v].lower}-${
HealthyRanges[v].upper
} ${unit}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job abstracting this out.

fungjj92 added 3 commits March 4, 2019 17:10
Translating scores to ratings is still fuzzy. There's not yet direction on how to decide a "warning" rating for a variable.

Consolidates all sensor-related data to the `app` redux store

Refs #41
@fungjj92 fungjj92 force-pushed the jf/wire-up-ratings-to-frontend branch from 77cb5cd to b737d62 Compare March 4, 2019 22:11
@fungjj92
Copy link
Contributor Author

fungjj92 commented Mar 4, 2019

Thanks, yeah looks cool! Rebased on develop with minimal conflict 🎉 Netlify is so fast to update when new commits are pushed up!

@fungjj92 fungjj92 merged commit 06a6b08 into develop Mar 4, 2019
@fungjj92 fungjj92 deleted the jf/wire-up-ratings-to-frontend branch March 4, 2019 22:16
@caseycesari caseycesari assigned fungjj92 and unassigned caseycesari Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants