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

Racial Disparities charts UI #358

Merged
merged 13 commits into from
Mar 17, 2021
Merged

Racial Disparities charts UI #358

merged 13 commits into from
Mar 17, 2021

Conversation

macfarlandian
Copy link
Collaborator

@macfarlandian macfarlandian commented Mar 12, 2021

Description of the change

Adds the chart UI (including filters, data download, and methodology) for all sections of the Racial Disparities narrative page.

Screen Shot 2021-03-12 at 10 59 40 AM

Notable:

  • refactored some of the chart UI to uncouple it from the Metric class and use it here
  • refactored the .zip download functionality into a reusable function
  • replaced modularized lodash with the mothership because I realized the modular packages were deprecated and out of date (tried to use lodash.pick and discovered it was way behind current functionality)
  • changed named dataviz colors from Map to plain object because maps are annoying to work with in Typescript
  • changed the "focus color" in some charts per a conversation with Juan

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Configuration change (adjusts configuration to achieve some end related to functionality, development, performance, or security)

Related issues

Closes #320

Checklists

Development

These boxes should be checked by the submitter prior to merging:

  • Manual testing against realistic data has been performed locally

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

@coveralls
Copy link

coveralls commented Mar 12, 2021

Pull Request Test Coverage Report for Build 647224664

  • 68 of 73 (93.15%) changed or added relevant lines in 12 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 72.958%

Changes Missing Coverage Covered Lines Changed/Added Lines %
spotlight-client/src/RacialDisparitiesNarrativePage/RacialDisparitiesNarrativePage.tsx 3 4 75.0%
spotlight-client/src/VizControls/VizControls.tsx 12 13 92.31%
spotlight-client/src/contentModels/downloadData.ts 8 9 88.89%
spotlight-client/src/contentModels/RacialDisparitiesNarrative.ts 13 15 86.67%
Totals Coverage Status
Change from base Build 644212328: 0.2%
Covered Lines: 2650
Relevant Lines: 3520

💛 - Coveralls

Copy link

@daschi daschi left a comment

Choose a reason for hiding this comment

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

This page is so impactful and well done 💯

{section.title}
</NarrativeSectionTitle>
{narrative.isLoading ||
narrative.isLoading === undefined ? (
Copy link

Choose a reason for hiding this comment

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

I'm curious why isLoading is initially unset instead of set to true, I think we may be setting it initially to true in lantern and I was wondering if you noticed unintended behavior with that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah this came up way back when I was first setting up the data models. it basically serves as a signal that a fetch has not been initiated yet. all the models follow this convention ... there wasn't necessarily a problem with doing it the other way, this just seemed like a good idea at the time

@macfarlandian macfarlandian merged commit 0a89ead into master Mar 17, 2021
@macfarlandian macfarlandian deleted the ian/320-rd-charts branch March 17, 2021 16:19
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.

Racial disparities page charts
3 participants