refactor(sensitive-input): rewrite on InputGroup + anchored toast#501
Open
mattrothenberg wants to merge 7 commits intomainfrom
Open
refactor(sensitive-input): rewrite on InputGroup + anchored toast#501mattrothenberg wants to merge 7 commits intomainfrom
mattrothenberg wants to merge 7 commits intomainfrom
Conversation
Replace 500+ lines of hand-rolled layout with InputGroup composition. Copy confirmation now uses an anchored Base UI Toast positioned above the copy button instead of icon-swapping with a timeout. Action button tooltips use an inverted dark style (bg-kumo-contrast/text-kumo-base) that adapts to light/dark mode. - 503 → ~396 lines, drastically simpler logic - Removes: manual mask overlay, role="button" container, execCommand fallback, per-size padding duplication, custom focus management - Adds: anchored toast for copy feedback, inverted tooltips - Keeps: mask-on-blur, Escape to re-mask, all sizes, Field wrapper - No public API changes
Formik usage in stratus passes onBlur for field touch tracking. Previously onBlur fell into ...inputProps but was overridden by our internal handleBlur. Now explicitly destructured and called before the mask-on-blur logic.
commit: |
Contributor
Docs PreviewCommit: |
Contributor
- Copy button only renders when onCopy is provided (backwards-compatible) - Add labels prop (SensitiveInputLabels) for i18n following the Pagination/ClipboardText pattern — all 7 strings customizable - Export SensitiveInputLabels type - Update docs: Basic, With Copy Button, i18n, and all existing sections - Hero demo shows full experience with copy + anchored toast
Collaborator
Author
|
/bonk what do you think about these changes |
Contributor
|
UnknownError: ProviderInitError |
Contributor
|
@mattrothenberg Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
Collaborator
Author
|
/bonk |
Collaborator
|
good addition with the |
Contributor
|
UnknownError: ProviderInitError |
Collaborator
Collaborator
Author
|
@pedromenezes1 Yep, I think the double button will be controversial, so I wanted to put this up and get feedback :) |
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.































Summary
role="button"container,execCommandfallback) with composable primitivesbg-kumo-contrast/text-kumo-base) that adapts to light/dark modeonBluris properly forwarded before masking logic (verified against stratus Formik usage)onChange,onValueChange,onBlur,error,onCopy, etc.) continue to workAudited against real-world usage in
cloudflare/stratus(CustomHeaders.tsx, ImportVariablesSecretsDialog.tsx) — no breaking changes.