-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Introducing Mouse region config for RailDestination #161381
Introducing Mouse region config for RailDestination #161381
Conversation
ff559b9
to
7888987
Compare
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.
Thanks for this contribution, including the documentation & test updates!
This looks to be an effective solution for #160834, but I am a bit concerned about the potential confusion between MouseRegion
and MouseRegionConfig
. I left a comment in the linked issue; in my opinion it'd be nice to have a more high-level discussion about which solution would be ideal before we move forward with this pull request.
|
||
/// This data class is passed to [NavigationRail]'s [NavigationRailDestination] | ||
/// through MouseRegion to configure the hover effect. | ||
class MouseRegionConfig { |
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.
I feel a bit uneasy about the name "mouse region config", primarily because configuring a mouse region is what the existing MouseRegion widget already does, by definition.
If I understand correctly, this class is being introduced as a workaround, since a NavigationRailDestination isn't a widget and thus cannot be wrapped with a MouseRegion.
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.
Thank you @nate-thegrate
Yes, that's correct. I have created MouseRegionConfig to support all MouseRegion parameters. This approach ensures scalability and avoids breaking changes. Do you have any specific suggestions or feedback?
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.
As of now, I believe the best way to solve #160834 would be to rework the navigation rail destinations
so it accepts a widget list. If you're interested in pursuing that, that'd be awesome, or feel free to let me know whatever thoughts you have about it :)
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.
I'll outline my implementation plan and would appreciate your feedback before I begin.
Please note that I believe this may result in a breaking change.
a5407b5
to
b79ee92
Compare
Closes #160834
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.