-
Notifications
You must be signed in to change notification settings - Fork 88
Taxonomy "Save" button fix #7318
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. 2 Skipped Deployments
|
Greptile OverviewGreptile SummaryThis PR updates the taxonomy edit drawer so core (non-custom) taxonomies no longer show the Save/Delete action footer, aligning the UI with the fact that core taxonomies are not editable. The change is localized to Confidence Score: 4/5
Important Files Changed
|
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.
1 file reviewed, 1 comment
| destroyOnHidden | ||
| footer={ | ||
| <Flex justify="space-between" className="w-full"> | ||
| {isCustom && <Button onClick={onDelete}>Delete</Button>} | ||
| <Button | ||
| type="primary" | ||
| htmlType="submit" | ||
| form={FORM_ID} | ||
| loading={isUpdating} | ||
| > | ||
| Save | ||
| </Button> | ||
| </Flex> | ||
| isCustom && ( | ||
| <Flex justify="space-between" className="w-full"> | ||
| <Button onClick={onDelete}>Delete</Button> | ||
| <Button | ||
| type="primary" | ||
| htmlType="submit" | ||
| form={FORM_ID} | ||
| loading={isUpdating} | ||
| > | ||
| Save | ||
| </Button> | ||
| </Flex> | ||
| ) | ||
| } |
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.
Hidden footer breaks layout
footer={isCustom && (...)} passes false to DetailsDrawer for core taxonomies. If DetailsDrawer expects a ReactNode (and may render the footer container regardless), passing a boolean can render nothing but still reserve footer spacing or break conditional rendering logic. Prefer returning null explicitly: footer={isCustom ? (...) : null} so core taxonomies have no footer without type/behavior ambiguity.
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.
false works fine here, the footer container is not rendered and layout is unaffected.
6d89eb9 to
fdd6f42
Compare
| > | ||
| Save | ||
| </Button> | ||
| </Flex> |
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.
This diff is confusing because of the rename, but the actual change is just here-- previously the "Save" button was outside the conditional block, just moved it inside.
lucanovera
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.
Save button is no longer visible for core taxonomies as expected. Code changes look good. Approved
Ticket ENG-2483
Description Of Changes
No longer shows the "Save" button in the details drawer when editing core taxonomies since they can't be edited.
Steps to Confirm
Code Changes
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works