Add a property by pressing Enter in its value field.#244
Merged
Conversation
…eld (#2040)
* fix(open-knowledge): add a property by pressing Enter in its value field
In the add-property row, pressing Enter while typing a value only settled
the value and blurred the input, forcing a mouse click on "Add". The value
editors (text / number / date) now accept an optional onSubmit handler that
the add-property row wires to commit the whole property on Enter, forwarding
the freshly-typed value so the commit doesn't race the async draft update.
Existing-row editors omit onSubmit and keep blur-to-settle Enter behavior.
Fixes PRD-7160.
* test(open-knowledge): cover DateWidget Enter-to-add + guard empty value in PropertyPanel
Address review feedback on PRD-7160:
- Add DateWidget Enter-in-value regression tests (valid parse commits;
invalid parse does not call onSubmit) — the most complex of the three
scalar Enter paths was untested.
- Mirror FolderPropertiesCard's empty-value guard in PropertyPanel.commitAdd
so the Enter-to-add keyboard path errors explicitly instead of silently
no-opping when the value is empty.
- Simplify AddPropertyRow's onSubmit passthrough to onSubmit={onCommit}.
* chore(open-knowledge): regenerate Lingui catalogs for PropertyPanel value-required string
The empty-value guard added a second reference to the existing "Value is
required" message. Re-extracted en + pseudo catalogs to clear i18n drift.
---------
GitOrigin-RevId: a3e88ff6535e424a3510854fc1c68283a51e1643
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28075649978). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
|
|
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.
Add a property by pressing Enter in its value field.
When adding a frontmatter property, typing a name, pressing Tab, typing a value, and pressing Enter now commits the new property — the whole interaction is keyboard-driven. Previously Enter in the value field only settled the value and blurred the input, so the property was not added until you clicked "Add" with the mouse. This works for text, number, and date values, in both the document property panel and a folder's properties; editing an existing property's value keeps its prior Enter-to-settle behavior.