fix(components): Adjust Clearable Positioning#2925
Open
Conversation
Deploying atlantis with
|
| Latest commit: |
00debe5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1cd766ac.atlantis.pages.dev |
| Branch Preview URL: | https://adjust-clearable-position-lo.atlantis.pages.dev |
Contributor
Author
|
something else I've thought about while looking into this is why do we have each instance of if you have a value, and you press clear to remove it or all values, then the clear button goes away since there's nothing to clear. because the element that just had focus is gone, focus has to go somewhere. the most sensible place would be the input associated with the clear button. |
Contributor
Author
|
@jdeichert this is the PR that should go into master first |
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.
Motivations
while trying to implement Clearable on AutocompleteRebuilt, I was encountering an issue where the clearable button is not centered. even if I apply something to try to give the parent a relative, flex, attribute - the
transformstill gets in the way.I don't believe the transform is necessary. we have a container that becomes the height of the input - why not let it center itself?
the only case I can immediately think of that might have unexpected results is a multiline inputText, however we don't currently support clearable on multiline inputs so that's not an issue. interestingly I think we'll encounter the same "problem" that has on the Autocomplete I'm making but to be honest I'm not sure it's that bad to have the button still be centered.
MUI does the exact same thing
Changes
Added
Changed
functionally it should be identical. hopefully the visual tests confirm that.
all that is different is now we center the button with a more flexible mechanism rather than the
transform: 50%which doesn't always work and is a bit more complicated thanalign-items: centerDeprecated
Removed
Fixed
Security
Testing
Changes can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.