[SpeedDial] Fix tooltip placement for horizontal directions#48377
Open
sandeshdamkondwar wants to merge 1 commit into
Open
[SpeedDial] Fix tooltip placement for horizontal directions#48377sandeshdamkondwar wants to merge 1 commit into
sandeshdamkondwar wants to merge 1 commit into
Conversation
Fixes mui#41067 For direction="left"/"right", the default tooltipPlacement was "top" which caused the tooltip label to overlap the action buttons. Changed the default to "bottom" for horizontal directions, and added CSS variants to SpeedDialActionStaticTooltip to support "bottom" and "top" placements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bundle size
Deploy previewhttps://deploy-preview-48377--material-ui.netlify.app/ Check out the code infra dashboard for more information about this PR. |
mj12albert
reviewed
Apr 27, 2026
| childSlotProps; | ||
|
|
||
| const defaultPlacement = getOrientation(direction) === 'vertical' ? 'left' : 'top'; | ||
| const tooltipPlacementByDirection = { up: 'left', down: 'right', left: 'bottom', right: 'bottom' }; |
Member
There was a problem hiding this comment.
Your PR description says:
direction="up" and direction="down" are unaffected
but down has changed from being mapped to right instead of left
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
Closes #41067
When
SpeedDialusesdirection="left"ordirection="right", the static tooltip label (viatooltipOpen) was defaulting totooltipPlacement="top", which caused the label to overlap the action buttons instead of appearing above or below them.Fix:
SpeedDial, changeddefaultPlacementfor horizontal directions from"top"to"bottom"using a direction→placement mapSpeedDialAction, added CSS variants fortooltipPlacement="bottom"and"top"onSpeedDialActionStaticTooltipso the label renders correctly below or above the buttonTest plan
SpeedDialwithdirection="right"andtooltipOpenon actions — tooltip labels should appear below the buttons, not overlapping themdirection="left"direction="up"anddirection="down"are unaffected🤖 Generated with Claude Code