-
Notifications
You must be signed in to change notification settings - Fork 40
feat: set up new Preferences page & edit/view drawers (MSQ V2) #5654
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-flagly ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-public-seeds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-angelopolis ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-lakeview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-public-seeds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-angelopolis canceled.
|
✅ Deploy Preview for bloom-flagly ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-lakeview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I don't understand why the Backend Integration test keeps failing. When I run it locally, I do get one failure…but it's a totally different failure in some other file. 😅 |
|
@jaredcwhite the failing property backend test appears to be because of an edge case depending on the order that the tests run. The test in question is not passing any parameters so it's defaulting to 10 as the page size, however some other tests add properties so sometimes there are more than 10 properties meaning one or both of the properties we are looking for might be on the second page. We will have to make the test more generic. I can quickly put up a PR to take that into account. |
ludtkemorgan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far looking pretty good functionally. I'm still making my way through the changes but wanted to get my review out for what I have reviewed so far.
Can you also add new frontend tests for this new functionality? We should have a new test suite for the new edit page along with all of the drawers/modals. Let me know if you need any assistance with coming up with test cases for those
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/EditPreference.tsx
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Outdated
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Outdated
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceViewDrawer.tsx
Outdated
Show resolved
Hide resolved
sites/partners/src/components/settings/preferences-v2/PreferenceEditDrawer.tsx
Outdated
Show resolved
Hide resolved
|
@ludtkemorgan Regarding tests, I'm thinking of adapting the unit/component-level tests to the new pages, and leaving Cypress alone for now. I feel like maintaining e2e tests for two different DB schemas would be really complicated, so maybe we can revisit if/how to do it once we sunset V1. |
That sounds great! Yeah, I don't think we need cypress tests at this time |
This PR addresses #5597, #5149, #5650, #5651
Description
The PR adds a new, separate screen for viewing/editing Preferences (at the path
/settings/preferences-new) which allows for managing MSQ V2 style preferences.How Can This Be Tested/Reviewed?
To seed your local DB with preferences in V2, run:
yarn setup --msqV2in theapifolderThen you can log in as a Bloomington admin in Partners and access the new page via Settings. Otherwise you'll still see the old page and seed data.
It's possible to view the two seed preferences as well as add new preferences. Unfortunately there's no easy way to flip between Edit and View for the same preference. You could try manually editing the code in the
preferences-new.tsxfor the table. I'm also not sure how easy it is to test various other statuses available in the enum.Some of the code for editing a preference is copied over and modified from the previous V1 editing, but all of the code for viewing is new, so it's possible I missed some edge cases or something in the UI could be improved. This is what I would call a "first draft".
There are also some follow-up issues which will touch on certain things in here, such as adding search, pagination, and sorting to the new preferences table.
Author Checklist:
yarn generate:clientand/or created a migration when requiredReview Process: