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

[Publisher][Agency Settings] Add new biological sex and race & ethnicity data source questions #1589

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

nasaownsky
Copy link
Collaborator

Description of the change

Added data source UI and basic logic

Type of change

All pull requests must have at least one of the following labels applied (otherwise the PR will fail):

Label Description
Type: Bug non-breaking change that fixes an issue
Type: Feature non-breaking change that adds functionality
Type: Breaking Change fix or feature that would cause existing functionality to not work as expected
Type: Non-breaking refactor change addresses some tech debt item or prepares for a later change, but does not change functionality
Type: Configuration Change adjusts configuration to achieve some end related to functionality, development, performance, or security
Type: Dependency Upgrade upgrades a project dependency - these changes are not included in release notes

Related issues

closes #1539

Checklists

Development

This box MUST be checked by the submitter prior to merging:

  • Double- and triple-checked that there is no Personally Identifiable Information (PII) being mistakenly added in this pull request

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

  • Tests have been written to cover the code changed/added as part of this pull request

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

@nasaownsky
Copy link
Collaborator Author

Hi @mxosman! So i'm in the process of implementing new questions, and so far all seems good to me. Just need some polish, particularly in handleCancelClick and handleCancelModalConfirm functions (don't know why emptyDataSourceSetting is updating along with currentDataSourceSetting), but I'll figure it out. Just pushed it so you could check my changes and maybe tell me some feedback or implementation suggestions before you're OOO. Anyway, have a great time outside the office and see you in 1.5 weeks!

@nichelle-hall
Copy link
Contributor

Hi Ilya,

I tested everything with my backend changes, and the saving and fetching are working great. However, there's one issue that can be reproduced as follows:

  1. Fill in the source questions for an agency.
  2. Switch to a different agency.
  3. Click on the source questions—the answers from the previous agency are still displayed.
  4. Perform a hard refresh of the page.
  5. Click on the source questions again.
  6. Now, the answers correctly reflect the current agency.
Screen.Recording.2024-11-15.at.12.25.24.PM.mov

@nasaownsky
Copy link
Collaborator Author

nasaownsky commented Nov 15, 2024

Hi, Nichelle! Yeah, I think it has to do with the functions I mentioned in my comment above, so will figuring this out. Thank you for great feedback!

@nasaownsky nasaownsky marked this pull request as ready for review November 19, 2024 09:28
@nasaownsky
Copy link
Collaborator Author

Hi @nichelle-hall! This should be ready for test and review now!

Copy link
Contributor

@nichelle-hall nichelle-hall left a comment

Choose a reason for hiding this comment

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

This looks great! I played around with is locally and it works perfectly.

@nasaownsky nasaownsky merged commit f1df50b into main Nov 20, 2024
7 checks passed
@mxosman
Copy link
Contributor

mxosman commented Nov 27, 2024

Thank you so much for your work on this @nasaownsky and for the review and testing @nichelle-hall!

I just played around with it and have the following quick thoughts and requests:

  • It looks like you can't empty out a perviously saved value entered in the "Other" field - can you take another look?
Screen.Recording.2024-11-27.at.12.25.32.PM.mov
  • Probably related to the above, but a user should be able to uncheck a selection for a question - can you take a look at this one as well?
Screen.Recording.2024-11-27.at.12.37.01.PM.mov
  • @nichelle-hall - the FE doesn't seem to be clearing out previously saved values for the "Other" field when a user makes a different selection - I know the BE doesn't care b/c it saves everything as a JSON, but can you remind me if this is surfaced anywhere in the dashboard API or if you think this will be an issue? If it's a non-issue, no worries! But, if it will be surfaced, then @nasaownsky I'll request that we empty out the fields and send the empty field to the BE when a user clicks away from the "Other".
Screen.Recording.2024-11-27.at.12.40.14.PM.mov
  • Styling nit: can we undo the capitalization for the options? We can keep them in the same casing as the string.

Thank you so much @nasaownsky!

@nichelle-hall
Copy link
Contributor

@nichelle-hall - the FE doesn't seem to be clearing out previously saved values for the "Other" field when a user makes a different selection - I know the BE doesn't care b/c it saves everything as a JSON, but can you remind me if this is surfaced anywhere in the dashboard API or if you think this will be an issue? If it's a non-issue, no worries! But, if it will be surfaced, then @nasaownsky I'll request that we empty out the fields and send the empty field to the BE when a user clicks away from the "Other".

The "Other" Information is not surfaced anywhere on the Dashboard API. Only the URL and Agency Description Agency Settings are surfaced.

@mxosman
Copy link
Contributor

mxosman commented Nov 27, 2024

@nichelle-hall - the FE doesn't seem to be clearing out previously saved values for the "Other" field when a user makes a different selection - I know the BE doesn't care b/c it saves everything as a JSON, but can you remind me if this is surfaced anywhere in the dashboard API or if you think this will be an issue? If it's a non-issue, no worries! But, if it will be surfaced, then @nasaownsky I'll request that we empty out the fields and send the empty field to the BE when a user clicks away from the "Other".

The "Other" Information is not surfaced anywhere on the Dashboard API. Only the URL and Agency Description Agency Settings are surfaced.

Thank you, Nichelle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Publisher][Agency Settings] Add new biological sex and race & ethnicity data source questions
3 participants