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
|
| 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.
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.
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.
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.
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