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

lib-classifier: Refactor survey task Choice and Questions styling #6478

Draft
wants to merge 6 commits into
base: lib-classifier_survey-task-design-changes
Choose a base branch
from

Conversation

mcbouslog
Copy link
Contributor

@mcbouslog mcbouslog commented Nov 19, 2024

Package

  • lib-classifier

Linked Issue and/or Talk Post

Describe your changes

How to Review

Helpful explanations that will make your reviewer happy:

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)
  • FEM works in a mobile browser

General UX

Example Staging Project: i-fancy-cats

  • All pages of a FEM project load: Home Page, Classify Page, and About Pages
  • Can submit a classification
  • Can sign-in and sign-out
  • The component is accessible

Refactoring

  • The PR creator has described the reason for refactoring
  • The refactored component(s) continue to work as expected

Post-merge

  • This PR adds translations keys to English dictionary(s). See guidance for pulling new keys to Lokalise here.

@coveralls
Copy link

Coverage Status

coverage: 77.823% (-0.05%) from 77.868%
when pulling 2de6216 on lib-classifier_survey-choice-styling
into c146bdf on master.

Comment on lines +190 to +194
<StyledButton
fill='horizontal'
label={t('SurveyTask.Choice.cancel')}
onClick={() => handleDelete(choiceId)}
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, if a previously selected choice was selected again, then "Not this" deleted that choice selection. Should "Cancel" still have the same delete choice selection action for previously selected choices?

Copy link
Contributor

Choose a reason for hiding this comment

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

Really good catch. I think with the coming change to deselecting Choices, the Cancel button can simply close the Choice box and not delete.

@mcbouslog mcbouslog changed the base branch from master to lib-classifier_survey-task-design-changes November 19, 2024 17:15
@seanmiller26
Copy link
Contributor

This is looking really good! A couple of very minor styling tweaks, including the few we discussed.

As discussed:

  • Content padding - lets reduce the side padding to 0px, top and bottom padding at 20px, as well as deleting the drop shadow.

  • Bottom line break - now to be below the Identify buttons and above the Done buttons. Match previous styling.

New issues:

  • 'Confused with' styling should be consistent with other choices (rounded corners, matching hover state)

  • Headings should be set to #5c5c5c

  • Can we adjust the circle Choices to be pill shaped when the content is long? ie. with the '11-50' Choice.

  • At mobile size the margin is reduced to 3px. Lets keep that consistent with desktop spacing size.

  • There is an extra 10px margin below the last line of Choices. Can we remove that OR reduce the margin above the next heading to be 10px? (Trying to tighten up the overall height of the component wherever possible, to fit entirely on the screen)

  • Reduce the Choice name (animal name) box to be 15px or 20x height. (Same concern as above)

Dark Mode:

  • A selected Choice font should be #000000. (Note: currently on FEM the selected color is #5c5c5c, but that fails contrast. I wonder if this is a universal dark mode value we should change?)

@mcbouslog mcbouslog changed the title lib-classifier: Refactor survey task Choice styling lib-classifier: Refactor survey task Choice and Questions styling Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Survey task: Choice and Questions styling improvements
3 participants