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

Cleanup survey overview layout #35906

Merged
merged 1 commit into from
Jul 21, 2020
Merged

Conversation

cforkish
Copy link
Contributor

before:
Screen Shot 2020-07-17 at 12 42 34 PM

after:
Screen Shot 2020-07-17 at 12 01 09 PM

while looking into the missing data in the question detail dialog on the survey overview page, i noticed that the overview data was not visible because the question cells weren't wrapping text so to see the data you had to scroll way to the right.

once i resized everything to fit into our regular content width, i needed to refactor the PercentAnsweredCell to properly center text when we're not including an icon.

Testing story

I manually tested these changes on the CSD Unit 1 Pre-survey, and verified that the changes to PercentAnsweredCell did not impact how that component is used for a non-survey assessment.

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

Copy link
Contributor

@jmkulwik jmkulwik left a comment

Choose a reason for hiding this comment

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

Cleanup looks great!

Copy link

@clareconstantine clareconstantine left a comment

Choose a reason for hiding this comment

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

Yesss I've gotten zendesk tickets about this before, people will be happy about this! thanks!


if (property === NOT_ANSWERED) {
percentValue = rowData.notAnswered;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice bit of cleanup here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hah, thanks! that one wasn't as simple as it looks. it turns out the PercentAnsweredCell defaults to -1 if percentValue is undefined, so we were relying on that line unsetting the value if we don't have a cell. imo much clearer to explicitly pass -1 in that case, hence my comment above.

@mvkski
Copy link
Contributor

mvkski commented Jul 21, 2020

LGTM!

@cforkish cforkish merged commit 2c6f1d1 into staging Jul 21, 2020
@cforkish cforkish deleted the cforkish/cleanup-survey-data-layout branch July 21, 2020 20:33
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.

None yet

4 participants