Repository navigation
feat(field-toolbar): show the Edit button for Taxonomy fields on the canvas toolbar - #669
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhGzeBieWdXYBvXLHnWDDf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhGzeBieWdXYBvXLHnWDDf
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…ct and isTaxonomyField
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Automated self-review (commit 9b34a1d)Mostly clean. There's one behavior inconsistency to settle before merge, plus some redundant code and tests.
|
altsh-cs
left a comment
There was a problem hiding this comment.
Small change, and reusing the multiple Select path makes sense. The Edit payload doesn't mutate the caller's metadata, and the disabled-state mock is reset by the outer beforeEach, so no leak between tests. No blockers from me, just a couple of things worth confirming and two small test cleanups inline.
One note on release order: the description says this shouldn't reach stage_v4 or main until the Visual Editor Taxonomy modal is live in every region. The same applies to develop_v4. Once this merges, the dev environment shows the Edit button, and if the matching Visual Editor change isn't deployed there yet the modal closes right away. Could we merge this after that change is deployed to dev, or link it in the description so the dependency is easy to track?
…olbar tests Note why Select skips canvas add buttons while Taxonomy keeps them, and that Taxonomy is always multiple. Drop a duplicate Edit button test, keep the Taxonomy test setup at the top of its block, and cover a Taxonomy inside a modular block keeping its parent index on Edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhGzeCtGiaD8r2BWLkqEWx
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
|
Re: #669 (review) Good point about dev. The PR body now says it: once this merges to Posted by ve-developer (Claude) Generated by Claude Code |
|
Re: #669 (comment)
Posted by ve-developer (Claude) Generated by Claude Code |
What changed
Taxonomy fields now get the Edit button on the canvas toolbar, the same way a multiple Select does.
ALLOWED_MODAL_EDITABLE_FIELDincludesFieldDataType.TAXONOMY, andfieldIconsmapstaxonomytoEditIcon.FieldToolbar.tsx, a newisTaxonomyFieldflag sits next toisMultipleSelect. When either is true, the field gets the modal Edit button, move left, move right and delete are hidden, and the Edit payload points at the whole field (instance.fieldPathWithIndexset tofieldPathWithIndex,multipleFieldMetadata.indexset to-1).add-instance.open-field-edit-modalpayload keeps its shape.Behaviour change on the canvas: clicking one Taxonomy term no longer shows move or delete buttons.
Test evidence
npm run lint: 0 errors (warnings are existing ones).npx prettier --checkon the changed files that were clean on the base: passes.FieldToolbar.tsxandfieldToolbar.test.tsxwere already not Prettier-clean ondevelop_v4, so they were left unformatted to keep the diff small.npx vitest run --changed origin/develop_v4: 76 files, 518 tests passed.npm run build: passes.Criteria and tests
fieldToolbar.test.tsx, "Taxonomy field toolbar": term click and whole-list click tests-1, as for a multiple SelectfieldToolbar.test.tsx: term click sends the whole-field payload; a term inside a modular block keeps the parent indexisFieldDisabledsays sofieldToolbar.test.tsx: disabled Edit testhandleIndividualFields.test.ts: "still adds instance buttons for a multiple Taxonomy field"fieldToolbar.test.tsxandhandleIndividualFields.test.tsManual QA
None needed for this change on its own. The modal that opens for Taxonomy lives in Visual Editor, which ships separately.
Release note
This should not go to
stage_v4ormainuntil the matching Visual Editor change for the Taxonomy modal is in production in every region. Without it, an older Visual Editor closes the modal for this field type.The same holds for the dev environment: once this merges to
develop_v4, dev shows the Edit button for Taxonomy, and the modal closes right away until the Visual Editor Taxonomy modal is deployed there. Merging waits for a reviewer's approval, so a reviewer can hold the approval until that Visual Editor change is on dev.Follow-up
After a term click, the comment, variant revert and Form actions still get the term-level metadata. Multiple Select does the same today, so this is left for a follow-up that covers both field types.
🤖 Generated with Claude Code
Posted by ve-developer (Claude)
Generated by Claude Code
Generated by Claude Code