Repository navigation
fix(form-engine): a read row with an object value names it and previews its keys - #125
Merged
Merged
Conversation
…ws its keys
A data-provider row in read mode summarised its value as "11 fields": a
count that reads like a string and says nothing about which provider the
value is. The hash row already drew a structured preview under its summary;
the data-provider row did not, because the preview was keyed on the declared
type rather than on the shape of the value.
The summary now names the provider ("datasource · omquser · /bb_local"), and
a row whose declared type holds a plain object — data-provider, options,
system-options, processor-mappings — gets the same structured preview a hash
row has, so the keys are one disclosure away.
|
📦 Prerelease published for this PR: Install it in a consumer (updates yarn add @qoretechnologies/reqraft@0.10.56-pr.125.g8140ccdPublished under the |
qlip visual regression🔍 1 changed, 1 new of 527 snapshots. |
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
FormEngineread row whose value is a data provider summarised it as11 fields— a count that reads like a string and says nothing about which provider the value is. Reported by Filip on qorus-ide Qlip builds #204–#208 (Components/Variables/Editor · Read Only Variable: "Initial value says11 fieldslike it's a string or something — we need to better visualize it's actually an object / a complex value").Two changes in the read-first engine:
readFirst.ts—formatDataProviderValuenames a provider the way the picker shows it: kind · name · path (datasource · omquser · /bb_local).formatOptionValueuses it for thedata-providertype before falling back to the key count.CompactRow.tsx— the hash row's structured preview now also applies to rows whose declared type holds a plain object:data-provider,options,system-options,processor-mappings. The list is explicit because aschemaorrichtextvalue is an object too and already has a preview of its own. Develop's rule that an expression stored as an AST is never previewed as a hash applies to these rows as well.A string row gets no preview — the preview follows the shape of the value, not the read mode.
Before / after
Before:
Initial value 11 fieldsAfter:
Initial value datasource · omquser · /bb_localwithtype / name / transaction_management / path / …one Show more away.Coverage
__tests__/readRowObjectValue.test.tsx— the reported case (names the provider, previews its keys, and the scalar row beside it stays one line).__tests__/readFirst.test.ts—formatDataProviderValueshapes.Version
0.10.56(last published beta is0.10.55).Follow-up in qorus-ide
Bump reqraft once this is released, then accept the Variables Read Only Variable capture that has carried Filip's rejection since build #204.