Skip to content

[material-ui][SpeedDial] Fix navigation with arrow keys when slotProps.fab is defined #46508

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jul 12, 2025

@sai6855 sai6855 marked this pull request as draft July 12, 2025 06:10
@mui-bot
Copy link

mui-bot commented Jul 12, 2025

Netlify deploy preview

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

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 🔺+73B(+0.01%) 🔺+40B(+0.03%)
@mui/lab 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

Generated by 🚫 dangerJS against cd806bd

@@ -424,6 +424,191 @@ describe('<SpeedDial />', () => {
});
});

describe('dial focus with slotProps.fab', () => {
Copy link
Contributor Author

@sai6855 sai6855 Jul 13, 2025

Choose a reason for hiding this comment

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

copied this entire describe block and just replaced FabProps with slotProps.fab here, newly added tests serves as proof that whatever tests were passing with FabProps are now passing with slotProps.fab

@sai6855 sai6855 marked this pull request as ready for review July 13, 2025 17:09
@sai6855 sai6855 requested a review from DiegoAndai July 13, 2025 17:10
@zannager zannager added the component: speed dial This is the name of the generic UI component, not the React module! label Jul 14, 2025
@sai6855 sai6855 added bug 🐛 Something doesn't work package: material-ui Specific to @mui/material labels Jul 15, 2025
@sai6855 sai6855 requested a review from siriwatknp July 16, 2025 11:04
Copy link

@OrangeDoro OrangeDoro left a comment

Choose a reason for hiding this comment

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

Hi! I'm a grad student working on a research project about using large language models to automate code review. Based on your commit cd806bd and the changes in packages/mui-material/src/SpeedDial/SpeedDial.js, my tool generated this comment:

  1. Since fabSlotOrigButtonRef is marked as React.RefObject?, ensure that the rest of the code that interacts with this parameter handles it correctly, especially if it is optional. This includes checking for null or undefined values before using it.
    1. Since fabSlotOrigButtonRef is marked as an optional parameter, there should be a null check to ensure that it is not null before attempting to use it.
    1. If fabSlotOrigButtonRef is intended to be used in the function, update the function's implementation accordingly. If it is not needed, consider removing it from the parameter list.
    1. Ensure that the new parameter fabSlotOrigButtonRef is actually used within the function. If it is not used, it may lead to confusion for future developers.
    1. Add unit tests to verify the function's behavior with and without the fabSlotOrigButtonRef parameter.
    1. Adjust or add tests to cover changes in behavior due to the new parameter, including edge cases like null or undefined values.
    1. The comment should explain what fabSlotOrigButtonRef is used for, similar to how the other parameters are described. This will help future developers understand its role in the function.
    1. Ensure that the newly added parameter fabSlotOrigButtonRef follows the same format as the existing parameters.

As part of my research, I'm trying to understand how useful these comments are in real-world development. If you have a moment, I'd be super grateful if you could quickly reply to these two yes/no questions:

  1. Does this comment provide suggestions from a dimension you hadn’t considered?

  2. Do you find this comment helpful?

Thanks a lot for your time and feedback! And sorry again if this message is a bother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: speed dial This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][SpeedDial] cannot navigate with arrow keys with slotProps.fab defined
4 participants