-
Notifications
You must be signed in to change notification settings - Fork 84
fix: data category select actionable logic [ENG-1757] #6893
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
Greptile Overview
Greptile Summary
This PR adds logic to disable the data category select component when the ASSIGN_CATEGORIES action is not available for a field's resource status.
Key Changes:
- Added
dataCategoriesDisabledprop that threads throughpage.tsx→MonitorFieldListItem.tsx→ClassificationSelect.tsx - Disables both the "Add" button and the select dropdown based on available actions for the field's
diff_status - Logic correctly checks if
ASSIGN_CATEGORIESis included in theAVAILABLE_ACTIONSfor the resource's status (e.g., "Unlabeled" allows it, but "Confirmed" doesn't)
Minor Issue:
- Inline
styleattribute used for disabled background styling (violates custom rule for style preferences)
Confidence Score: 4/5
- This PR is safe to merge with only a minor style preference violation
- The logic correctly implements the intended behavior by checking available actions per resource status. The only issue is a style preference violation using inline styles instead of Tailwind/CSS modules, which is non-critical and doesn't affect functionality.
- ClassificationSelect.tsx has a minor inline style usage that could be refactored
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/ClassificationSelect.tsx | 4/5 | Added disabled prop to Button and inline style for disabled background. Style usage violates custom rule 3db03574. |
| clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/MonitorFieldListItem.tsx | 5/5 | Added dataCategoriesDisabled parameter and passed to ClassificationSelect component - clean implementation. |
| clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/page.tsx | 4/5 | Added logic to determine when data categories should be disabled based on available actions for the resource status. |
3 files reviewed, 1 comment
...n-ui/src/features/data-discovery-and-detection/action-center/fields/ClassificationSelect.tsx
Show resolved
Hide resolved
gilluminate
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.
Looks good!
Ticket ENG-1757
Description Of Changes
Disables data category select component when the action is not available
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works