Skip to content

Refactor the Network Window Panel#173

Closed
gmmcosta15 wants to merge 34 commits intodevfrom
ref/network_window
Closed

Refactor the Network Window Panel#173
gmmcosta15 wants to merge 34 commits intodevfrom
ref/network_window

Conversation

@gmmcosta15
Copy link
Collaborator

Description

Select the type:

  • Feature
  • Bug fix
  • Code refactor
  • Documentation

**BlocksScreen/lib/network.py:**´

  • Added method get_device_ip_by_interface to get IPv4 address for a specific interface via NetworkManager D-Bus.

BlocksScreen/lib/panels/networkWindow.py

  • Programmatically creates the UI instead of needed the wifiConnectivityWindow file.
  • Added a page to handle hidden networks.
  • The refresh is now a QRunnable task emittedto the threadpool.
  • Added Constants as global variable to improve maintainability.
  • Changed the use from QtWidgets.QListWidgetItem to use our custom EntryDelegate and each network is a EntryList.
  • Added a separator between saved and unsaved networks.
  • Improved error handling.
  • All changes to the WiFi and Hotspot toggle button are protected by QtCore.QSignalBlocker to make them always sync.
  • Stop showing the password field on open networks.

BlocksScreen/lib/ui/resources/icon_resources.qrc:

  • Added new icons for different signal types and security types.

BlocksScreen/lib/utils/list_model.py:

  • Added a flag to the entrylist to make a item not clickable.

BlocksScreen/lib/utils/blocks_Scrollbar.py:

  • Fixed behaviour of scrollbar at edges.

BlocksScreen/lib/utils/blocks_linedit.py:

  • Pre-allocated elements used by Qt for better performance.

Motivation

  • Improve Responsiveness: Perform network refreshes off the main thread to avoid UI freezes.
  • Increase Usability: Support hidden networks and separate saved/unsaved networks visually.
  • Enhance Maintainability: Use constants and programmatic UI to simplify future updates.
  • Increase Stability: Add robust error handling and synchronized toggle state.

Improve UX: Update icons to reflect signal and security types and streamline network list behavior.

Screenshots

Before

Captura de ecrã 2025-12-12 125550

After

Captura de ecrã 2025-12-12 152508

Tests

Tested on RF50,
Missing Unit and Integration Tests,

Co-Authors

Co‑author: @Robert0Mart
Co‑author: @claudiobrinca

gmmcosta15 and others added 30 commits December 11, 2025 17:37
wifiConnectivityWindow.ui: change horizontalLayout to a vertical layout with a listview and a vertical scrollbar
wifiConnectivityWindow.py: generated file from QtDesigner with some optimizations

Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
Signed-off-by: Guilherme Costa <guiherme.costa@blockstec.com>
@gmmcosta15 gmmcosta15 requested a review from HugoCLSC February 3, 2026 13:09
@gmmcosta15 gmmcosta15 self-assigned this Feb 3, 2026
@gmmcosta15 gmmcosta15 added UI/UX User Interface what changed with this code Refactor Enhancing code's readability, maintainability, and extensibility while addressing technical debt. labels Feb 3, 2026
@gmmcosta15 gmmcosta15 changed the title Ref/network window Refactor the Network Window Panel Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Enhancing code's readability, maintainability, and extensibility while addressing technical debt. UI/UX User Interface what changed with this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants