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

Adding ability to delete properties #4708

Merged
merged 16 commits into from
Mar 21, 2024
Merged

Adding ability to delete properties #4708

merged 16 commits into from
Mar 21, 2024

Conversation

galvana
Copy link
Contributor

@galvana galvana commented Mar 14, 2024

Closes PROD-1664

Description Of Changes

Adding the ability to delete properties, only available to owners and contributors. Verifies that all of the experiences on the property are unlinked before being able to delete the property.

Code Changes

  • Added delete button to property table rows and property edit page
  • Removed the cascade deletes between plus_property, plus_privacy_experience_config_property to avoid putting the property/privacy_experience_config entries into an invalid state

Steps to Confirm

  • Start fidesplus off of the branch in https://github.com/ethyca/fidesplus/pull/1353
  • Start the Admin UI in this PR
  • Create a property without privacy experiences
  • Create a property with at least one privacy experience
  • Verify the delete buttons in the rows and edit page are disabled/enabled according to the state of the properties

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Mar 14, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Mar 21, 2024 4:54pm

Copy link

cypress bot commented Mar 14, 2024

Passing run #6806 ↗︎

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 b662038 into 0b1b994...
Project: fides Commit: 5b739fb3d0 ℹ️
Status: Passed Duration: 00:34 💡
Started: Mar 21, 2024 5:05 PM Ended: Mar 21, 2024 5:05 PM

Review all test suite changes for PR #4708 ↗︎

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.63%. Comparing base (ccd14a7) to head (a1d476d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4708   +/-   ##
=======================================
  Coverage   86.63%   86.63%           
=======================================
  Files         337      337           
  Lines       19977    19977           
  Branches     2551     2551           
=======================================
  Hits        17308    17308           
  Misses       2201     2201           
  Partials      468      468           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@galvana galvana marked this pull request as ready for review March 14, 2024 20:24
Copy link
Contributor

Choose a reason for hiding this comment

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

TDD for the win! Lovely!!

@Kelsey-Ethyca
Copy link
Contributor

AC
✅ When a property exists and I view the details of it, then a delete button is shown on the bottom left of the screen.
Screenshot 2024-03-19 at 8 42 54 PM
✅ When a property exists but is NOT referenced by a privacy experience, then I can delete the property.
✅ When a property exists, but is referenced by a privacy experience, then I cannot delete it.
Screenshot 2024-03-19 at 8 43 40 PM

Stretch AC
✅ When a property exists that cannot be deleted, then the UI provides a tooltip explaining what to do in order to delete the property.
Screenshot 2024-03-19 at 8 45 26 PM

Copy link
Contributor

@Kelsey-Ethyca Kelsey-Ethyca left a comment

Choose a reason for hiding this comment

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

Just little nits and questions. Can you get CI tests passing? UAT passing!

Comment on lines 14 to 18
import { getErrorMessage, isErrorResult } from "../common/helpers";
import { PROPERTIES_ROUTE } from "../common/nav/v2/routes";
import Restrict from "../common/Restrict";
import { errorToastParams, successToastParams } from "../common/toast";
import { useDeletePropertyMutation } from "./property.slice";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { getErrorMessage, isErrorResult } from "../common/helpers";
import { PROPERTIES_ROUTE } from "../common/nav/v2/routes";
import Restrict from "../common/Restrict";
import { errorToastParams, successToastParams } from "../common/toast";
import { useDeletePropertyMutation } from "./property.slice";
import { getErrorMessage, isErrorResult } from "~/features/common/helpers";
import { PROPERTIES_ROUTE } from "~/features/common/nav/v2/routes";
import Restrict from "~/features/common/Restrict";
import { errorToastParams, successToastParams } from "~/features/common/toast";
import { useDeletePropertyMutation } from "~/features/properties/property.slice";

Copy link
Contributor Author

@galvana galvana left a comment

Choose a reason for hiding this comment

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

Thanks for the review @Kelsey-Ethyca! I made the changes you recommended and fixed the CI/CD issues. Ready for round 2!

@galvana galvana requested a review from Kelsey-Ethyca March 20, 2024 19:39
@galvana galvana merged commit d098807 into main Mar 21, 2024
46 checks passed
@galvana galvana deleted the PROD-1664-delete-properties branch March 21, 2024 17:13
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