-
Notifications
You must be signed in to change notification settings - Fork 84
refactor: tree actionability #7068
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
|
adamsachs
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.
tested and looks good to me. we know there are some UX gaps that are still lingering, but i think this is the better approach for now, until we can revisit this a bit more holistically.
all non-database resources in the tree can be classified (and the BE handles classifying the right things), and only 'removal' tree elements can be removed 👍
| }, | ||
| }); | ||
| disabled: (node) => { | ||
| /** Logic for this should exist on the BE */ |
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.
nice, good to callout here that there's a gap lingering, and we're just papering over it...
Greptile OverviewGreptile SummaryReverts tree node action availability from async API-based checks to synchronous local property checks.
Confidence Score: 4/5
Important Files ChangedFile Analysis
|
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.
4 files reviewed, 1 comment
| disabled: (node) => { | ||
| /** Logic for this should exist on the BE */ | ||
| if ( | ||
| (action === FieldActionType.PROMOTE_REMOVALS && | ||
| node.status === | ||
| TreeResourceChangeIndicator.REMOVAL) || | ||
| (action === FieldActionType.CLASSIFY && | ||
| node.classifyable) | ||
| ) { | ||
| return false; | ||
| } | ||
|
|
||
| return !result.data?.allowed_actions.includes(action); | ||
| return true; |
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.
style: The synchronous disabled logic is duplicated in two places: here (for RESOURCE_ACTIONS in MonitorTree) and the identical block starting at line 300. Consider extracting this into a shared helper function to reduce duplication and ensure consistency.
f79e6fe to
8e2e3b1
Compare
8e2e3b1 to
981e4ac
Compare
Ticket []
Description Of Changes
Reverting to old logic for classification logic.
Relying on indicator status for remove action.
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works