-
Notifications
You must be signed in to change notification settings - Fork 667
TextInput: Update TextInput.Action internal component to use Tooltip v2 #4097
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7ad2a86
Use Tooltip 2 for TextInput.Action
broccolinisoup 0944f24
add changeset
broccolinisoup 03773e6
snaps and update default direction
broccolinisoup f0a40f6
update tooltip direction and type casting
broccolinisoup 8f40f8e
Merge branch 'main' into bs/textinput-tooltip2
broccolinisoup a9da0e5
accidently removed - bring it back
broccolinisoup b2a912e
Merge branch 'main' into bs/textinput-tooltip2
mperrotti c24979c
Merge branch 'main' into bs/textinput-tooltip2
broccolinisoup 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': minor | ||
| --- | ||
|
|
||
| TextInput: Update TextInput.Action internal component to use Tooltip v2 |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text={ariaLabel as unknown as string}this is not great but some sort of type conversion or "hack" is needed here becausetextis a required prop for Tooltip but I see we can't makeariaLabelrequired for TextInput's trailing action because it could be an icon button or a text button. I am open to feedback if we want to handle this in another wayThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be a little easier to read/understand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that reads better. Thank you. Although both options will end up rendering an empty tooltip. I wonder if we should conditionally render the tooltip for icon button too? Though this solution will only work until we bring the tooltip to icon buttons by default #2008. What are your thoughts on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Yea, I think we can keep what you have then.