fix(persona): a label that repeats its own value is not drawn twice - #205
Merged
Conversation
From a live pane: a `company` attribute labelled "Affinidi" holding "Affinidi" drew **Affinidi · Affinidi**. A label is a note to self — "work mobile", "the flat" — and it earns its place beside the value; when it *is* the value it earns nothing, and the separator makes one fact read as two. Compared case- and space-insensitively, because "affinidi" beside "Affinidi" is the same stutter with a different shift key. Only a string value is compared: a JSON object rendered beside a label never repeats it, and stringifying one here to find out would be work in aid of a case that cannot arise. Three tests, and the middle one is the reason this is a comparison rather than "hide the label": "work mobile" beside a number is exactly what a label is for. The fixtures carry `sensitivity: "normal"`, which is not incidental — `company` is unregistered and would otherwise be masked, and the first test passed for the wrong reason until they did: there was no value on the card to be repeated. It is also how the pane the report came from was set up. 392 extension tests pass (3 new), 578 core; `tsc -b` and `npm run build` clean. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.
From a live pane: a
companyattribute labelled Affinidi holding"Affinidi"drewA label is a note to self — work mobile, the flat — and it earns its place beside the value. When it is the value it earns nothing, and the separator makes one fact read as two.
The comparison
Case- and space-insensitive, because
affinidibesideAffinidiis the same stutter with a different shift key. Only a string value is compared: a JSON object rendered beside a label never repeats it, and stringifying one here to find out would be work in aid of a case that cannot arise.Three tests, and the middle one is the point
A fixture detail worth reading
The stutter fixtures carry
sensitivity: "normal". Not incidental:companyis unregistered, so without the holder's decision it is masked — and the first test passed for the wrong reason until the fixture had it, because there was no value on the card to be repeated. It is also how the pane this was reported from is set up.392 extension tests pass (3 new), 578 core;
tsc -bandnpm run buildclean.