feat(wifi): add search functionality for filtering WiFi networks#1592
feat(wifi): add search functionality for filtering WiFi networks#1592manascb1344 wants to merge 13 commits intopop-os:masterfrom
Conversation
|
@jacobgkau Please have a look! |
|
Since this isn't in our Figma design specs, it needs design approval by @maria-komarova first. |
Not sure about the frequency, but the reason they jump around is because they're currently sorted by signal strength, and signal strength of wireless networks often changes slightly (based on the environment) between different scans. Maybe quantizing the signal strength (e.g. chunking in groups of "5-bar, 4-bar," etc.) and then sorting alphabetically within those groups, or a similar solution, could prevent it from happening quite as much? (There would still be some networks going between the different bar groups, but it would prevent e.g. a 3.05-bar and 3.06-bar from swapping in the list constantly.) |
I like this idea, sounds like it would be an improvement. |
- Move search input from top-level to inside "Visible Networks" section - Only show search when 30+ visible networks exist (per designer spec) - Known Networks section now always unfiltered (search only applies to visible) - "No networks found" message only shown in visible section when search active - Addresses designer feedback from PR pop-os#1592
- Clear search_query in on_leave() to prevent stale filter on return - Apply cargo fmt formatting fixes
Updated implementation based on @maria-komarova's feedbackI've updated the implementation to match the design requirements: Changes made:
Screenshots:With fewer than 30 networks (search hidden): With search bar (I have reduced the threshold to 2 instead of 30 for testing): Note on testing:The 30+ threshold means the search bar won't appear in most home/small office environments. For testing, reviewers can temporarily change line 1007 in |
|
Hi @jacobgkau |
|
@jacobgkau any updates ? |
Resolved conflicts in wifi.rs by combining search functionality with master branch improvements: - Adopted conditional display of QR code and Forget buttons (only for known networks) - Updated popup styling to match master (width 200.0, Dropdown class, padding) - Preserved search functionality for filtering WiFi networks
d94af7b to
0dec524
Compare
|
This has conflicts now. Can you resolve those? Then we'll be able to test this once we have time. |
…ssage - Renamed variable for clarity in the connection logic. - Added a new translation for "no search results" in the i18n file. - Updated comments to better describe the search functionality in the devices view.
|
due to lack of 30+ wireless networks, i am unsure how to test this 30 networks is a lot.. |
The 30+ threshold means the search bar won't appear in most home/small office environments. For testing, reviewers can temporarily change line 1007 in wifi.rs: |
There was a problem hiding this comment.
this works very well
it allows you to search for strings nested inside of a network name, so if the network is called test_network_519 you can simply type in 519 and it still works.
i am guessing the 30 network limit will make this feature not work for most people and i suggest a lower limit.
EDIT:
passes regression testing
Testing
This document provides a regression testing checklist for COSMIC Settings and the COSMIC Settings Daemon. The checklist provides a starting point for Quality Assurance reviews.
Checklist
Network & Wireless
Wi-Fi
- Able to disconnect from and connect to a network.
Desktop
Wallpaper
- Clicking a different wallpaper switches to it immediately
- Leaving the page and coming back does not change the wallpaper
Appearance
- Open a COSMIC app and a GNOME app. When switching between Dark and Light mode, the COSMIC app switches immediately, and the GNOME app switches after restarting.
- Changing the accent color works.
- Changing the roundness style works and does not affect other aspects of the theme (e.g. color mode).
- Changing the interface density works.
Panel
- Enable tiling. "Automatically hide panel" takes effect immediately.
- Disable tiling; maximize a window. "Automatically hide panel" takes effect immediately.
Dock
- Enable tiling. "Automatically hide dock" takes effect immediately.
- Disable tiling; maximize a window. "Autommatically hide dock" takes effect immediately.
- Changing position on screen works.
- All Style settings take effect as expected.
Displays
- Plug in a second display. Displays can be rearranged via dragging.
Sound
TBD after devices/profiles are fixed.
Power & Battery
- Changing power mode takes effect and is reflected by top panel applet.
Input Devices
Touchpad
- All click behavior settings work as expected.
- All scrolling settings work as expected.
Applications
Default Applications
- Changing the default terminal affects Super-T shortcut.
X11 Applications Compatibility
- Global Shortcuts in X11 Applications works (in e.g. Discord).
Time & Language
Date & Time
- Changing time zome works.
- Toggling 24-hour time takes effect in Settings preview, on top panel, and on the lock screen.
- Toggling seconds takes effect in Settings preview and on top panel.
- Changing first day of week takes effect in Calendar applet.
- Turning date on/off for applet works.
System & Accounts
About
- Changing hostname works (check terminal prompt).
|
I’d suggest lowering the threshold to 15 (or even 10) so the feature is available when it’s actually useful, while still keeping it hidden in simpler setups. Happy to update the implementation accordingly if that sounds reasonable. |
|
@maria-komarova what do you think the threshold should be? I think 15 sounds good, myself. Although 10 might be useful on smaller displays. |
|
I wouldn't go below 15. It seems that 10 is easy enough to scan through so search might not be needed in this case. Sure, there are always people who prefer search but I'm not sure how much of an improvement it is between scanning through the list vs searching if we set the threshold to 10. |
7b285b3
|
@jacobgkau Ive fixed the merge conflicts |
leviport
left a comment
There was a problem hiding this comment.
Working great with a limit of 15. Thanks!
Regression testing passed again:
Network & Wireless
Wi-Fi
- Able to disconnect from and connect to a network.
Desktop
Wallpaper
- Clicking a different wallpaper switches to it immediately
- Leaving the page and coming back does not change the wallpaper
Appearance
- Open a COSMIC app and a GNOME app. When switching between Dark and Light mode, the COSMIC app switches immediately, and the GNOME app switches after restarting.
- Changing the accent color works.
- Changing the roundness style works and does not affect other aspects of the theme (e.g. color mode).
- Changing the interface density works.
Panel
- Enable tiling. "Automatically hide panel" takes effect immediately.
- Disable tiling; maximize a window. "Automatically hide panel" takes effect immediately.
Dock
- Enable tiling. "Automatically hide dock" takes effect immediately.
- Disable tiling; maximize a window. "Autommatically hide dock" takes effect immediately.
- Changing position on screen works.
- All Style settings take effect as expected.
Displays
- Plug in a second display. Displays can be rearranged via dragging.
Sound
TBD after devices/profiles are fixed.
Power & Battery
- Changing power mode takes effect and is reflected by top panel applet.
Input Devices
Touchpad
- All click behavior settings work as expected.
- All scrolling settings work as expected.
Applications
Default Applications
- Changing the default terminal affects Super-T shortcut.
X11 Applications Compatibility
- Global Shortcuts in X11 Applications works (in e.g. Discord).
Time & Language
Date & Time
- Changing time zome works.
- Toggling 24-hour time takes effect in Settings preview, on top panel, and on the lock screen.
- Toggling seconds takes effect in Settings preview and on top panel.
- Changing first day of week takes effect in Calendar applet.
- Turning date on/off for applet works.
System & Accounts
About
- Changing hostname works (check terminal prompt).



Description
This PR adds search/filter functionality to the WiFi settings page, allowing users to easily find WiFi networks when there are many available networks (50+). The search includes both currently visible networks and known/saved networks, even if they're not currently visible.
Fixes #1589
Problem
When there are many WiFi networks available, it becomes difficult to manually search through the list to find a specific SSID. Additionally, the interface reloads every 2-3 seconds, causing the network order to change, making it even harder to locate networks.
Screenshots
Related Issues
Closes #1589