Skip to content

Refactor: GUI#285

Merged
rubentalstra merged 5 commits intomainfrom
refactor/GUI
Jan 26, 2026
Merged

Refactor: GUI#285
rubentalstra merged 5 commits intomainfrom
refactor/GUI

Conversation

@rubentalstra
Copy link
Owner

This pull request introduces several improvements and refactors to the dialog management system and UI components in the tss-gui crate. The most significant change is the migration from the dialog_windows structure to a unified dialog_registry for managing dialog state, which simplifies dialog handling and improves maintainability. Additionally, the PR includes various UI component cleanups, such as removing unnecessary clones, using pattern destructuring, and improving code clarity.

Dialog Management Refactor:

  • Replaced the legacy dialog_windows system with a new dialog_registry for unified dialog state management. All dialog-related operations (opening, closing, updating state, and querying dialog type) now use dialog_registry, resulting in cleaner and more maintainable code. [1] [2] [3] [4] [5] [6]

UI Component Cleanups and Improvements:

  • Refactored UI components (ActionButton, SelectableRow, data_table, domain_badge, etc.) to use pattern destructuring instead of field clones, reducing unnecessary allocations and improving code clarity. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Made ActionButtonStyle derive Copy to enable more ergonomic usage.

Minor API & Style Updates:

  • Changed the sidebar badge API from .with_badge() to .badge() for consistency.
  • Updated the text field selection alpha value to use ALPHA_LIGHT constant for consistency across the theme. [1] [2]

These changes collectively modernize the dialog state handling and improve the maintainability and performance of UI components.

@rubentalstra rubentalstra merged commit 785e528 into main Jan 26, 2026
11 checks passed
@rubentalstra rubentalstra deleted the refactor/GUI branch January 26, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment