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

UI polish for recidivism chart #255

Merged
merged 8 commits into from
Nov 17, 2020
Merged

UI polish for recidivism chart #255

merged 8 commits into from
Nov 17, 2020

Conversation

macfarlandian
Copy link
Collaborator

Description of the change

Several small polish items concerned behavior in the line chart; the changes are all grouped together here.

  • the lines all start at year zero now, to visualize the slope for the first year and make sure cohorts with only one year of data are always visible
  • tooltip includes the color swatches to help match values with lines
  • highlighted cohort is always rendered even if it is not selected. This only really applies to deselected items highlighted in the dropdown menu, and this behavior is not enabled when a single-year demographic breakdown is applied

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 #252

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 Nov 13, 2020

Pull Request Test Coverage Report for Build 368791933

  • 6 of 8 (75.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.0%) to 54.845%

Changes Missing Coverage Covered Lines Changed/Added Lines %
public-dashboard-client/src/tooltip/Tooltip.js 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
public-dashboard-client/src/page-prison/PagePrison.js 1 84.21%
Totals Coverage Status
Change from base Build 368755826: 1.0%
Covered Lines: 856
Relevant Lines: 1534

💛 - 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.

Looks great! This is unrelated to the changes, but I was curious about the demographic option being reset whenever a year is changed, and wanted to ask if it's the intended behavior for this chart.

Here's the flow if I wanted to change the year I'm viewing for a particular demographic:

  • Select a single year
  • Select a demographic
  • Deselect a year and select another year
  • Demographic resets to Total, so I reselect the demographic

@macfarlandian
Copy link
Collaborator Author

@daschi it is intended but I guess in the use case you are describing it's not strictly necessary. The view resets whenever the number of cohorts is not equal to one, which means setting to zero resets it. Seems kind of silly when you spell it out like that! (It's probably an easy fix, I will look into it and add to this PR if it's sufficiently small)

Base automatically changed from ian/252-menu-polish to master November 17, 2020 18:57
@macfarlandian
Copy link
Collaborator Author

good call @daschi I got that change approved and have added it here

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.

nice! 🥇

@macfarlandian macfarlandian merged commit dd9ed09 into master Nov 17, 2020
@macfarlandian macfarlandian deleted the ian/252-chart-polish branch November 17, 2020 21:52
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.

Recidivism UI polish
3 participants