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

Add notice key field to privacy notice form #3403

Merged
merged 4 commits into from
Jun 1, 2023
Merged

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented May 31, 2023

Closes #3344

Code Changes

  • New component NoticeKeyField which watches for changes to the name field and generates a reasonable key from it when creating a new privacy notice
  • Adds lodash snakeCase package to facilitate generating the key
  • Removes the larger lodash import that was in package.json since nothing uses that anymore (ideally we import the subpackages of lodash, not all of lodash)
  • Cleans up some cypress fixtures that weren't being used
  • Cypress tests

Steps to Confirm

  • Create some privacy notices
  • Use the "Add a privacy notice +" button to add a new notice
  • Play around with naming your notice and scroll down to see the key dynamically update
  • Edit an existing privacy notice's name
  • The key should not dynamically update, and should retain whatever it once had

Note: this does not try to handle the case of what happens if a user edits their notice name, then updates their notice key, then updates their notice name again. This will currently write over the notice key (see first video) which may or may not be what we want. But I didn't want this to get too opinionated without others' input 😄

Pre-Merge Checklist

Description Of Changes

When creating a new privacy notice:

Screen.Recording.2023-05-30.at.8.11.27.PM.mov

When editing a privacy notice name:

Screen.Recording.2023-05-30.at.8.13.51.PM.mov

@cypress
Copy link

cypress bot commented May 31, 2023

Passing run #2282 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge da3377d into e68da2a...
Project: fides Commit: b3c6a3bccd ℹ️
Status: Passed Duration: 00:47 💡
Started: May 31, 2023 4:21 PM Ended: May 31, 2023 4:22 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@allisonking allisonking marked this pull request as ready for review May 31, 2023 14:28
Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

looks good to me!

@allisonking allisonking merged commit 5dbb458 into main Jun 1, 2023
@allisonking allisonking deleted the aking/3344/notice-key branch June 1, 2023 16:20
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.

Add notice_key to Privacy Notice form
2 participants