Fix: Dropdown menu overlayed in Inference UI Model Cards not being scrollable on Linux.#1566
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a user experience issue on Linux where dropdown menus within the Inference UI's Model Cards were not scrollable via mouse wheel. The fix involves adjusting how pointer wheel events are handled within FAComboBox popups to ensure that internal ScrollViewer components can correctly respond to scroll input. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where dropdown menus in model cards were not scrollable on Linux. The fix involves adding a tunnel event handler to the popup's ScrollViewer to reset the Handled property of pointer wheel events, allowing them to be processed correctly. The implementation is sound and directly addresses the described problem. I've added one suggestion to improve robustness against potential memory leaks and reduce code duplication.
Refactor subscription cleanup into a separate method.
ionite34
left a comment
There was a problem hiding this comment.
Hi, thanks for the PR. Since this seems to be Linux only, maybe we can add a Compat.IsLinux condition for attaching the event handlers? And perhaps adding a comment linking the issue. Since it might not be clear in the future what this handler is for.
|
done.
|
On Linux, FAComboBox popups are rendered as overlay popups that share the same TopLevel visual root as the main window.
FAComboBox.OnPopupOpened adds a TopLevel tunnel handler that marks ALL pointer-wheel events as handled (when dropdown is open and source.VisualRoot == TopLevel) to prevent parent ScrollViewers from stealing the event. The side-effect is that the popup's own internal ScrollViewer also never receives the event. Causing the dropdown in the Model cards in the Inference UI (HiResFix, Upscaler, etc) to not be able to scroll with the mousewheel, leaving the user to have to click and drag the scroll bar.
Fix: Add a tunnel handler directly on the popup ScrollViewer, which runs after the TopLevel handler in tunnel order, that resets e.Handled = false, allowing the ScrollViewer's normal bubble handler to process the scroll and move the dropdown list.