Skip to content

[SpeedDial] Fix tooltip placement for horizontal directions#48377

Open
sandeshdamkondwar wants to merge 1 commit into
mui:masterfrom
sandeshdamkondwar:worktree-agent-a71df57c6bbfa83a3
Open

[SpeedDial] Fix tooltip placement for horizontal directions#48377
sandeshdamkondwar wants to merge 1 commit into
mui:masterfrom
sandeshdamkondwar:worktree-agent-a71df57c6bbfa83a3

Conversation

@sandeshdamkondwar
Copy link
Copy Markdown
Contributor

Summary

Closes #41067

When SpeedDial uses direction="left" or direction="right", the static tooltip label (via tooltipOpen) was defaulting to tooltipPlacement="top", which caused the label to overlap the action buttons instead of appearing above or below them.

Fix:

  • In SpeedDial, changed defaultPlacement for horizontal directions from "top" to "bottom" using a direction→placement map
  • In SpeedDialAction, added CSS variants for tooltipPlacement="bottom" and "top" on SpeedDialActionStaticTooltip so the label renders correctly below or above the button

Test plan

  • Render a SpeedDial with direction="right" and tooltipOpen on actions — tooltip labels should appear below the buttons, not overlapping them
  • Same for direction="left"
  • Verify direction="up" and direction="down" are unaffected

🤖 Generated with Claude Code

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>
@code-infra-dashboard
Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+344B(+0.07%) 🔺+69B(+0.05%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Deploy preview

https://deploy-preview-48377--material-ui.netlify.app/


Check out the code infra dashboard for more information about this PR.

childSlotProps;

const defaultPlacement = getOrientation(direction) === 'vertical' ? 'left' : 'top';
const tooltipPlacementByDirection = { up: 'left', down: 'right', left: 'bottom', right: 'bottom' };
Copy link
Copy Markdown
Member

@mj12albert mj12albert Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR description says:

direction="up" and direction="down" are unaffected

but down has changed from being mapped to right instead of left

@zannager zannager added the scope: speed dial Changes related to the speed dial. label Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: speed dial Changes related to the speed dial.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[material-ui][SpeedDial] Bug with right/left direction in persistent action tooltips

3 participants