Skip to content

Conversation

@AbhinavGonthina
Copy link
Contributor

Changes

Added the delete rule modal which shows up whenever the delete button on a specific rule is clicked. It includes a calculation of the number of rules that are subsequently deleted. I added utils, api, and hook functions based on the current delete endpoint implemented, but cannot implement the actual delete functionality for the reason below.

Notes

IMPORTANT: Deletion does not actually occur yet just because the current ruleset page does not actually fetch rulesets in the database (there is a placeholder hook right now so real rules are not fetched yet so they can't be deleted) so that needs to be implemented in a future ticket. RIght now, there is just a 404 error.

Screenshots

Deleting one rule with no children
image

Deleting rules with children (take a look at the rules behind the modal to see the rules that are being deleting and their structures.
image
image
image

To Do

Any remaining things that need to get done

  • Implement actual retrieval of ruleset tables
  • If deletion doesn't work after ↑, fix the hook in rules.hooks.ts and hook it up to the modal correctly.

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes # (issue #3651 )

Copy link
Contributor

@cielbellerose cielbellerose left a comment

Choose a reason for hiding this comment

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

great work! Just a small modal design update and this will be perfect

? `${titlePrefix} ${rule.ruleCode} - ${rule.ruleContent}`
: `${titlePrefix} ${rule.ruleCode}`;

return (
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks really good but we should use the prebuilt NERModal so it better matches the rest of the website. A good example might be the AdminToolsPage/ProjectsConfig/PartTagDeleteModal

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.

3 participants