feat: accept json as a column type, render structured example values - #33
Open
damusix wants to merge 1 commit into
Open
feat: accept json as a column type, render structured example values#33damusix wants to merge 1 commit into
damusix wants to merge 1 commit into
Conversation
Example cells went through String(value), so any nested value rendered as "[object Object]" — the frontmatter format accepted structured data that no surface could display. A structured cell now shows a truncated monospace preview with an expander that opens the pretty-printed document. The declared type is what licenses parsing a *string* as a document; nested values are recognised unconditionally, so an author who omits `json` still gets a readable cell. Modal keeps a stack and answers ESC only in its top-most instance — without that, a dialog opened from inside another closed both.
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.
jsonjoins the column-type vocabulary, and structured example values finally render.Two independent triggers, deliberately. A nested YAML value is recognised on any column, so an author who never declares
jsonstill gets a readable cell instead of[object Object]. Declaringjson/jsonbadditionally licenses parsing a value written as a quoted JSON string — the declared type is the only thing that can distinguish a document from text that happens to start with{.The expander's dialog is always stacked, which covers both callers without either knowing where it sits: from the dictionary it is the only dialog on screen, from an entity or process dialog it layers over the opener. That required giving
Modala stack — every instance listens for ESC ondocument, so previously a nested dialog would have dismissed its opener along with itself.The skill now warns off
jsonas a normalization escape hatch: a fixed set of known fields is columns, a repeating group is a child entity.models/key-inheritedgains a live example —PaymentMethod.details, whose shape genuinely differs per method type, with one null row.