Repository navigation
Conversation
Add EditableCard and EditableCard.Field. View and edit are one card with one field list: each field renders the same cell in both modes (a fixed label row and a value slot the height of a control), so pressing Edit moves nothing and only swaps values for controls. Fields that can't be edited keep their view rendering and, in edit mode, show an icon whose tooltip gives the reason, by kind: system, calculated, locked or permission. Save submits only this card; an async onSave keeps the card in edit mode until it resolves and stays there if it rejects. Labels are translated into English and Japanese. The form templates page gets three in-place examples: a purchase order header with every read-only kind, a table of the kinds, and two cards where only one can be edited at a time. Refs tailor-inc/platform-planning#2265 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs-manifest.json
This was referenced Nov 10, 2026
Contributor
Code Metrics Report
Details | | main (923933d) | #709 (e039ced) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 62.9% | 63.0% | +0.1% |
| Files | 294 | 299 | +5 |
| Lines | 13483 | 13657 | +174 |
+ | Covered | 8485 | 8617 | +132 |
+ | Test Execution Time | 4m3s | 4m0s | -3s |Code coverage of files in pull request scope (14.2% → 16.2%, patch 100.0%)
Reported by octocov |
itsprade
marked this pull request as draft
November 10, 2026 15:23
# Conflicts: # docs-manifest.json # docs-src/skill/SKILL.template.md
# Conflicts: # docs-manifest.json
# Conflicts: # docs-manifest.json # docs-src/components/form-layout.docs.outline.md # docs-src/skill/SKILL.template.md # docs/components/form-layout.md # examples/vite-app/src/pages/showcase/form-templates/overview.tsx
itsprade
marked this pull request as ready for review
November 17, 2026 10:02
# Conflicts: # docs-manifest.json
# Conflicts: # docs-manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new public component,
EditableCard. It edits one card of a record in place: view and edit are the same card with one field list. Every field keeps its exact position when Edit is pressed, and only its value turns into a control. Each card saves on its own.Refs tailor-inc/platform-planning#2265
Behaviour
EditableCard<Values>. A field with an editor must have aname, enforced by the types.onSavekeeps the card in edit mode, with buttons disabled andaria-busy, until it resolves.onSavekeeps the card in edit mode with the user's changes.errorsand show under their fields.onCancel. An Escape that a Select or Combobox popup already handled doesn't cancel the card.system,calculated,lockedandpermission.editing/onEditingChange), andeditDisabledlets a page allow only one card in edit mode at a time.EditableCard.Fieldthrows if it's used outside a card.Demo
On
/showcase/form-templates:Open question: should this be part of DescriptionCard? (needs team alignment)
Important
This needs discussion and agreement with the team before it merges. Treat the API as a proposal. It also overlaps with the TentBox follow-ups (card-level save, merged view and edit) that were assigned to Seiya on 2 Nov.
For designers, EditableCard and DescriptionCard should feel like one card with an optional edit state, and in view mode they should look the same. In code, this PR keeps them separate for now:
Editing doesn't follow from display. DescriptionCard knows how to show each field type (a badge, an amount, a reference link). It doesn't know which control edits it:
Putting all of that into DescriptionCard's
fieldsconfig would make it much bigger, mostly for cards that are never edited.Most DescriptionCards are only read. Adding form state, validation and save handling would make the simple, common case heavier.
It follows the layered plan. Layer 1 is the building blocks (FormLayout and EditableCard). The natural layer 2 lets DescriptionCard opt in to editing by building on EditableCard:
onSaveon the card;editcontrol on each field that can change.Teams already using DescriptionCard would turn on editing without rewriting their cards, and there would still be only one editing engine underneath.
The cost of keeping them separate is that the two describe fields differently: JSX children here, a
fieldsconfig in DescriptionCard. So a page could end up describing the same fields twice.For the team to agree on:
Testing
errorspropname.check-dts.Stack
A separate component, released after the forms work. It builds on FormLayout's grid, so it's stacked on #708 and retargets to
mainwhen that merges. #708 doesn't need it to merge. It doesn't depend on Stepper (#707).🤖 Generated with Claude Code