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

Migrate custom selects (Chakra -> Ant) #5502

Merged
merged 26 commits into from
Nov 22, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Nov 15, 2024

Closes HJ-160

Description Of Changes

  • Migrate remaining Select input fields from Chakra to Ant Design.
  • Replace disabled "creatable" select instances where we were using them just for badge display. Use pure Ant Badges instead.

Code Changes

  • Cleaned up a few files/components that are obsolete that were using old Chakra Select components
  • Changed colorPrimaryBg to palette.FIDESUI_NEUTRAL_75 as per @jack-gale-ethyca's request
  • Migrated one more "one-off" in the System Inventory page.
  • Replace disabled Select instances with Ant badges

Steps to Confirm


  1. Visit System inventory where an integration has been configured (Iterable)
  2. Switch to the "Integrations" tab
  3. Ensure the "Request types" multi-select uses the new Select
  4. Now switch to the "Data uses" tab
  5. Click one of the options or the [Add data use +] button
  6. In the modal, the "Data use," "Data categories," "Data subjects," "Legal basis for processing," "Features," "Dataset references," and "Cookies" fields all use the new Select

  1. Visit the Manage your vendors page (/consent/configure)
  2. Click [Add Vendors] and then [Add custom vendor]
  3. All fields in this modal are using the new Select
  4. Close the modal and return to the Manage your vendors page
  5. open a Vendor that has more than one TCF Purpose
  6. Badges should appear here where there used to be a disabled Select instance with badges inside it.

CleanShot 2024-11-14 at 15 15 55@2x


  1. Visit Manage custom fields (/settings/custom-fields)
  2. Add a new custom field
  3. "Location" and "Field type" are both using the new Select.
  4. Go ahead and create 1 for Single Select
  5. Go to the Add system form and at the very bottom under Custom fields you should see the custom field you just created and it should be using the new Select.

  1. Go to Add Systems (/add-systems)
  2. Click the "Add a System" button
  3. The "Dataset references" field is using the new Select (everything else on this page was updated in the previous PR)
  4. Now on the Add Systems page, Click the "Scan your infrastructure (AWS)" button
  5. The AWS Region field is using the new Select

  1. Go to add New Privacy Notice (/consent/privacy-notices/new)
  2. "Consent mechanism," "Data use," and "Enforcement level" are all using the new Select

  1. Go to Integrations (/integrations)
  2. Click [Add Integration] button
  3. Click [Configure] button on one of the options
  4. The "System" field is using the new Select
  5. Close the modal and [Manage] one of the existing integrations (or crate one on the previous step)
  6. Click the "Data discovery" tab
  7. Click the [Add monitor] button
  8. the "Automatic execution frequency" field is using the new Select

  1. Go to Organizations Management (/settings/organization)
  2. Click [Add SSO Provider]
  3. The "Provider" field is using the new Select

  1. Go to create a new Experience (/consent/privacy-experience/new)
  2. The "Experience Type" field is using the new Select
  3. Use that to select a "Banner and modal" type
  4. The now visible "Banner options" field uses the new Select

  1. Go to Privacy requests (/privacy-requests)
  2. Click [Create request]
  3. The "Request type" field is using the new Select
  4. Click the [filter] button at the top of the table
  5. The "Status" and "Request type" fields are using the new Select

  1. Go to the (hidden) Configure Storage page (/privacy-requests/configure/storage)
  2. "Format," and "Auth method" are using the new Select

  1. Go to Properties (/properties)
  2. Click [Add Property] button
  3. The "Type" field is using the new Select

  1. Go to the Data map report (/reporting/datamap)
  2. Click a row to open the left Drawer
  3. Expand an accordion under the "Data uses" section
  4. There are 4 fields here using the new Select (these may or may not be disabled)

  1. Go to Taxonomy management (/taxonomy)
  2. Switch to the Data Subjects tab
  3. Click the [Add Taxonomy Entity] button
  4. the "Rights" field is using the new Select

  1. Go to Connection manager (AKA Unlinked connections /datastore-connection)
  2. Click the [Create new connection] button
  3. The "Show all" connector type filter uses the new Select
  4. Search for "Manual"
  5. Click the "Manual Process" option
  6. Give it a name and click Save
  7. the "Data Categories" field uses the new Select

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • Followup issues:
    • Followup issues created: HJ-252
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

* Visit System Inventory where an integration has been configured (Iterable)
* Ensure the Request types multi-select works as expected and the form saves.
Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 8:33pm

Copy link

cypress bot commented Nov 16, 2024

fides    Run #11139

Run Properties:  status check passed Passed #11139  •  git commit 4a2835dfd4 ℹ️: Merge 016b2f01f7df725ed74125e8d2582554a1e28277 into d1baca99b58d9c13d5e99d23a94f...
Project fides
Branch Review refs/pull/5502/merge
Run status status check passed Passed #11139
Run duration 00m 37s
Commit git commit 4a2835dfd4 ℹ️: Merge 016b2f01f7df725ed74125e8d2582554a1e28277 into d1baca99b58d9c13d5e99d23a94f...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Code looks good-- UAT'd as described in PR and confirming everything works.

I am seeing one bug on the connection manager page where the "Connection type" filter select doesn't render options, not sure if that was introduced with this PR or missed on the earlier one:

Screenshot 2024-11-20 at 13 30 20

Also, after clicking "add connection", this ConnectionTypeFilter component appears to still be using the old, bespoke SelectDropdown component, could we switch that over to Ant as well? It seems to be the last one-- its counterpart MultiSelectDropdown is also still in the codebase but isn't used anywhere anywhere and should be able to be removed.

Screenshot 2024-11-20 at 13 33 20

@@ -35,7 +35,6 @@
"@reduxjs/toolkit": "^1.9.3",
"@tanstack/react-table": "^8.10.7",
"@types/jest": "^29.5.12",
"chakra-react-select": "^3.3.7",
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

return (
<Flex alignItems="center" mb={6} {...props}>
<Button
onClick={() => nextRouter.push(backPath)}
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reasoning for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I meant to leave a comment on this PR about it and forgot...

This was more of an annoyance fix. The link part would work as expected in a SPA where the page would immediately load. This button part however would load the entire app again. This change just aligns the button behavior with the link behavior using the Next router.

@gilluminate
Copy link
Contributor Author

@jpople Thanks for finding that one-off select. It helped me find 2 more in the Privacy Requests table filter!

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Looking good! Thanks for getting those extra old selects, it's great to have that cleanup done.

@gilluminate gilluminate merged commit 43b434b into main Nov 22, 2024
13 checks passed
@gilluminate gilluminate deleted the gill/HJ-160/migrate-custom-selects-to-ant branch November 22, 2024 18:58
Copy link

cypress bot commented Nov 22, 2024

fides    Run #11156

Run Properties:  status check passed Passed #11156  •  git commit 43b434b6be: Migrate custom selects (Chakra -> Ant) (#5502)
Project fides
Branch Review main
Run status status check passed Passed #11156
Run duration 00m 38s
Commit git commit 43b434b6be: Migrate custom selects (Chakra -> Ant) (#5502)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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.

2 participants