Fix device and app dropdown width and click areas#481
Fix device and app dropdown width and click areas#481florent37 merged 5 commits intoopenflocon:mainfrom
Conversation
Summary of ChangesHello @snappdevelopment, 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 addresses user interface issues within the network view's device and app dropdown menus. The primary goal is to improve the visual presentation and interactivity of these dropdowns by ensuring their content is fully visible regardless of item name length and by optimizing the clickable areas for better user experience. These changes prevent content truncation and make dropdown selections more intuitive. Highlights
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 effectively addresses the width and click area issues in the device and app dropdown menus. The solution to set matchAnchorWidth = false is correctly applied, and expanding the clickable area of items is a good user experience improvement. I've added one comment regarding a potential visual regression in the device dropdown due to some styling properties being lost during a refactoring. Overall, these are solid improvements to the UI.
| FloconExposedDropdownMenu( | ||
| expanded = expanded, | ||
| onDismissRequest = { expanded = false }, | ||
| containerColor = FloconTheme.colorPalette.primary, | ||
| shadowElevation = 0.dp, | ||
| shape = RoundedCornerShape(topStart = 12.dp, topEnd = 12.dp), | ||
| modifier = Modifier.exposedDropdownSize(), | ||
| modifier = Modifier.exposedDropdownSize(matchAnchorWidth = false), | ||
| ) { |
There was a problem hiding this comment.
When refactoring from ExposedDropdownMenu to FloconExposedDropdownMenu, the shadowElevation = 0.dp and custom shape properties were lost. This might result in an unintended visual change, such as a shadow appearing where there was none before. If the original appearance should be preserved, consider adding these properties to the FloconExposedDropdownMenu component or passing them through.
|
CI is not passing, but that's my falt, I'm fixing it and merge yours then #488 |
|
thanks for the fix, I'm merging it and deploy a new version |
Fixes the width, click area and paddings of the device and app dropdown menus.
When selecting a device with a short name, then the delete buttons of the devices with longer names were cut off because the dropdown was forced to have the same width as the anchor. Same for the app dropdown. I had to apply
matchAnchorWidth = falseon the Modifier as well as the ExpandedDropdownMenu itself to make it work.For devices the short names the click area was also too short, so I adjusted the layouts and padding to improve that. I also aligned the implementation of
TopBarDeviceViewwithTopBarAppViewto make them almost identical.The last thing I did was add the alpha from the device connection icon on the text as well. That makes it easier to distinguish between connected and disconnected devices.
Let me know what you think :)
Before (delete button was cut off):


After: