-
Notifications
You must be signed in to change notification settings - Fork 1.1k
refactor: replace MUI Tooltip with MiniTooltip #20027
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3e71889
refactor: replace MUI Tooltip with MiniTooltip
aqandrew 262df48
refactor: replace MUI Tooltip with MiniTooltip in Badges
aqandrew 8cbcb7b
chore: lint:fix
aqandrew 062dc85
fix: add aria-label to MiniTooltip trigger
aqandrew 9438da7
refactor: replace MUI Tooltip in components which pass JSX to title
aqandrew f2e21a8
style: format
aqandrew e0e2bcd
style: sort imports
aqandrew fd62277
style: check:fix
aqandrew 2991d90
fix: use open prop as default isOpen
aqandrew d843fa9
Merge branch 'main' into aqandrew/replace-mui-tooltip
aqandrew 9398e0d
fix: prevent infinite renders in CreateWorkspacePageView by replacing…
aqandrew 8b1e512
test: add story including OverflowRolePill (nested tooltip)
aqandrew dc2adf8
fix: keep loading Latency tooltip from moving when opened
aqandrew bfb263d
Revert "fix: prevent infinite renders in CreateWorkspacePageView by r…
aqandrew 0e100ba
test: revert NoLatency play function back to checking name instead of
aqandrew 2da4f52
chore: rm unused import
aqandrew 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
Next
Next commit
refactor: replace MUI Tooltip with MiniTooltip
- Loading branch information
commit 3e71889702af5e86c09391ba4de2b6fcf7fe2f4e
Some comments aren't visible on the classic Files Changed page.
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
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,41 @@ | ||
| import { | ||
| Tooltip, | ||
| TooltipArrow, | ||
| TooltipContent, | ||
| TooltipContentProps, | ||
| TooltipProvider, | ||
| TooltipTrigger, | ||
| } from "components/Tooltip/Tooltip"; | ||
| import type { FC } from "react"; | ||
| import { cn } from "utils/cn"; | ||
|
|
||
| type MiniTooltipProps = TooltipContentProps & { | ||
| title: string; | ||
| arrow?: boolean; | ||
| }; | ||
|
|
||
| const MiniTooltip: FC<MiniTooltipProps> = (props) => { | ||
| const { title, children, arrow, ...contentProps } = props; | ||
|
|
||
| return ( | ||
| <TooltipProvider> | ||
| <Tooltip delayDuration={0}> | ||
| <TooltipTrigger asChild>{children}</TooltipTrigger> | ||
| <TooltipContent | ||
| collisionPadding={16} | ||
| side="bottom" | ||
| {...contentProps} | ||
| className={cn( | ||
| "max-w-[300px] bg-surface-secondary border-surface-quaternary text-content-primary text-xs", | ||
| contentProps.className, | ||
| )} | ||
| > | ||
| {title} | ||
| {arrow && <TooltipArrow className="fill-surface-quaternary" />} | ||
| </TooltipContent> | ||
| </Tooltip> | ||
| </TooltipProvider> | ||
| ); | ||
| }; | ||
|
|
||
| export default MiniTooltip; |
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
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.