Fix/sensitive input UI#36
Merged
Merged
Conversation
barlipdev
approved these changes
Jun 10, 2026
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 does this PR do?
Makes the sensitive-field (PII) marker in forms overridable. Previously the 🔒
badge next to a sensitive field's label was rendered directly by
FormRendererwith no override slot — unlike input/select/checkbox/textarea/file/submitButton —
so consumers couldn't restyle or remove it without a global CSS hack (which can't
be scoped per use-case and risks stripping PII markers from forms that legitimately
want them).
FormRenderernow resolves the badge through the existing element-override systemunder a new
sensitiveIndicatorkey. Consumers can swap in their own marker, orreturn
nullto opt a given form scope out of the badge entirely — no CSS hacks,fully scoped. Default rendering is unchanged (opt-out via override).
Also exports
FormSensitiveIndicatorElementProps(the new override's props) andFormFileElementProps(previously imported by the demo but not actually exported).The demo wires up a custom
PIIchip indicator to demonstrate the slot.Closes #
Type of Change
Packages Affected
@mobile-reality/mdma-spec@mobile-reality/mdma-parser@mobile-reality/mdma-runtime@mobile-reality/mdma-attachables-core@mobile-reality/mdma-renderer-react@mobile-reality/mdma-prompt-packChecklist
pnpm formatandpnpm lintpass).pnpm test).pnpm typecheck).pnpm changeset) if this change affects published packages.sensitive: truewhere appropriate.How to Test
pnpm install && pnpm --filter @mobile-reality/mdma-renderer-react buildformwith asensitive: truefield. With the demo customizations active, the default 🔒 badge is replaced by
the custom
PIIchip (GlassSensitiveIndicator) — confirming the slot resolves.sensitiveIndicatorfrom the demo'sform.elementsoverrides → thedefault 🔒 badge renders, proving the default is unchanged.
sensitiveIndicator: () => null→ the badge disappears entirely(the opt-out path consumers will use).