-
Notifications
You must be signed in to change notification settings - Fork 3
[Dls 680] refactor(BaseInput): Add status and helperText
#653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aammami-ledger
wants to merge
21
commits into
main
Choose a base branch
from
DLS-680-text-input
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7161a95
refactor(input): replace errorMessage with helperText and add status …
aammami-ledger 1b50aa0
feat(Input): update feedback API to use helperText and status for Rea…
aammami-ledger c44cdc6
refactor(inputs): standardize error handling to use helperText and st…
aammami-ledger 988328c
fix typo
aammami-ledger 5b915e2
refactor(TextInput.test): simplify renderWithProvider function and re…
aammami-ledger 99aa601
fix(AmountInput.stories): format error message display for better rea…
aammami-ledger 927d0ee
feat(TextInput): add support for label and placeholder together, enha…
aammami-ledger 62af655
refactor(inputs): standardize error handling by removing aria-invalid…
aammami-ledger 21cd970
fix typo
aammami-ledger e5d15b4
feat(inputs): auto-set aria-invalid on error status for improved acce…
aammami-ledger c0281da
refactor(inputs): update documentation to clarify auto-setting of ari…
aammami-ledger 7181b5b
fix docs for better readability
aammami-ledger a47c80b
feat(TextInput): add status prop for error and success states to enha…
aammami-ledger f472e28
review comments
aammami-ledger e97f4c4
fix(BaseInput): apply typography styles to enhance input appearance
aammami-ledger ac81200
feat(BaseInput): add floated label variant for improved placeholder b…
aammami-ledger df5c167
refactor(BaseInput): simplify helper text rendering and consolidate s…
aammami-ledger d053d88
refactor(BaseInput): streamline helper text condition for improved cl…
aammami-ledger 9bc97c3
feat(AddressInput, TextInput): enhance status handling by adding dyna…
aammami-ledger 181469d
Update version plan guidelines to enforce `patch` bump type
aammami-ledger 92d8742
fix(MediaImage): wrap onError calls in act to ensure proper handling …
aammami-ledger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| description: Nx version plans must always use `patch` bump type, regardless of change | ||
| globs: | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| # Release plan bump type | ||
|
|
||
| When generating an Nx version plan in `.nx/version-plans/`, the bump type | ||
| in the frontmatter MUST always be `patch` — never `minor`, never `major` — | ||
| regardless of the nature of the change (new feature, new component, new prop, | ||
| breaking change, refactor, fix, etc.). | ||
|
|
||
| ```markdown | ||
| --- | ||
| '@ledgerhq/lumen-ui-rnative': patch | ||
| --- | ||
|
|
||
| feat(Select): add render prop and SelectButtonTrigger | ||
| ``` | ||
|
|
||
| - Do not infer `minor` from `feat(...)` commits. | ||
| - Do not infer `major` from breaking changes. | ||
|
|
||
| ## One package per file | ||
|
|
||
| Each release plan file MUST list a single package in its frontmatter — never | ||
| group multiple packages in the same file. If a change affects N packages, | ||
| create N separate `version-plan-<timestamp>-<pkg>.md` files, one per package. | ||
|
|
||
| ```markdown | ||
| --- | ||
| '@ledgerhq/lumen-ui-react': patch | ||
| --- | ||
|
|
||
| feat(Select): add render prop and SelectButtonTrigger | ||
| ``` | ||
|
|
||
| ```markdown | ||
| --- | ||
| '@ledgerhq/lumen-ui-rnative': patch | ||
| --- | ||
|
|
||
| feat(Select): add render prop and SelectButtonTrigger | ||
| ``` | ||
|
|
||
| Do NOT do this: | ||
|
|
||
| ```markdown | ||
| --- | ||
| '@ledgerhq/lumen-ui-react': patch | ||
| '@ledgerhq/lumen-ui-rnative': patch | ||
| --- | ||
| ``` | ||
|
|
||
| This applies to all packages, including but not limited to: | ||
|
|
||
| - `@ledgerhq/lumen-ui-react` | ||
| - `@ledgerhq/lumen-ui-rnative` | ||
| - `@ledgerhq/lumen-ui-react-visualization` | ||
| - `@ledgerhq/lumen-ui-rnative-visualization` | ||
| - `@ledgerhq/lumen-design-core` | ||
| - `@ledgerhq/lumen-utils-shared` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| '@ledgerhq/lumen-ui-react': patch | ||
| --- | ||
|
aammami-ledger marked this conversation as resolved.
|
||
|
|
||
| feat(Input): replace `errorMessage` with `helperText` and `status` across react inputs | ||
|
|
||
| ## Breaking change | ||
|
aammami-ledger marked this conversation as resolved.
|
||
|
|
||
| The input feedback API changed across React input components. | ||
|
|
||
| - Removed: `errorMessage` | ||
| - Added: `helperText` | ||
| - Added: `status` with `error | success` | ||
|
aammami-ledger marked this conversation as resolved.
|
||
|
|
||
| This affects `TextInput`, `SearchInput`, `AddressInput`, `BaseInput`, and `SelectSearch`. | ||
|
|
||
| ## Migration guide | ||
|
|
||
| ### Error feedback | ||
|
|
||
| ```diff | ||
| - <TextInput errorMessage="Please enter a valid email address" /> | ||
| + <TextInput | ||
| + helperText="Please enter a valid email address" | ||
| + status="error" | ||
| + /> | ||
| ``` | ||
|
|
||
| ### Error feedback — `aria-invalid` is now auto-set | ||
|
|
||
| `aria-invalid={true}` is automatically set on the input when `status="error"`. You no longer need to pass it explicitly. | ||
|
|
||
| ```diff | ||
| - <SearchInput | ||
| - aria-invalid={!isValid} | ||
| - errorMessage="Search failed. Please try again." | ||
| - /> | ||
| + <SearchInput | ||
| + helperText="Search failed. Please try again." | ||
| + status="error" | ||
| + /> | ||
| ``` | ||
|
|
||
| ## New addition: | ||
|
|
||
| ### Neutral helper copy | ||
|
|
||
| ```diff | ||
| - <AddressInput errorMessage="Enter a valid address" /> | ||
| + <AddressInput helperText="Enter a valid address" /> | ||
| ``` | ||
|
|
||
| ### Success feedback | ||
|
|
||
| ```diff | ||
| - <TextInput helperText="Address verified" /> | ||
| + <TextInput helperText="Address verified" status="success" /> | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| '@ledgerhq/lumen-ui-rnative': patch | ||
| --- | ||
|
|
||
| feat(Input): replace `errorMessage` with `helperText` and `status` across native inputs | ||
|
|
||
| ## Breaking change | ||
|
|
||
| The input feedback API changed across React Native input components. | ||
|
|
||
| - Removed: `errorMessage` | ||
| - Added: `helperText` | ||
| - Added: `status` with `error | success` | ||
|
|
||
| This affects `TextInput`, `SearchInput`, `AddressInput`, and `BaseInput`. | ||
|
|
||
| ## Migration guide | ||
|
|
||
| ### Error feedback | ||
|
|
||
| ```diff | ||
| - <TextInput errorMessage="Username must be at least 3 characters" /> | ||
| + <TextInput | ||
| + helperText="Username must be at least 3 characters" | ||
| + status="error" | ||
| + /> | ||
| ``` | ||
|
|
||
| ### Search validation feedback | ||
|
|
||
| ```diff | ||
| - <SearchInput errorMessage="Search term is invalid" /> | ||
| + <SearchInput | ||
| + helperText="Search term is invalid" | ||
| + status="error" | ||
| + /> | ||
| ``` | ||
|
|
||
| ## New addition: | ||
|
|
||
| ### Neutral helper copy | ||
|
|
||
| ```diff | ||
| - <AddressInput errorMessage="Enter address or ENS" /> | ||
| + <AddressInput helperText="Enter address or ENS" /> | ||
| ``` | ||
|
|
||
| ### Success feedback | ||
|
|
||
| ```diff | ||
| - <TextInput helperText="Address verified" /> | ||
| + <TextInput helperText="Address verified" status="success" /> | ||
| ``` |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.