Skip to content

Conversation

@kalisp
Copy link
Member

@kalisp kalisp commented Nov 19, 2025

Changelog Description

Contains set of QT components that should look similar to components on AYON server frontend.

Additional review information

PR just to help testing ayon-review-desktop

Testing steps:

Most basic and haxor way how to install it:

  • go to the installed .venv that my ayon-launcher is using
  • go to subfolder Scripts there
  • run pip install --upgrade git+https://github.com/ynput/ayon-ui-qt.git@feature/prototype
  • running same command each time I want to update with latest code from the branch

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Refactored the status selection component by renaming `StatusSelect` to `AYComboBox` for consistency with AYon UI naming conventions. Added helper functions for text color calculation and icon colorization. Improved the item delegate with better hover handling and color management. Updated imports and test code accordingly.

BREAKING CHANGE: Renamed StatusSelect class to AYComboBox, which may affect external usages.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Remove the "state" field from status definitions and rename the Status dataclass to Item for better clarity and simplicity. Update all related type hints and variable references accordingly.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Enhance AYComboBox with an inverted mode that swaps background and foreground colors for better visual contrast in different themes. This includes conditional color application in paint events, a new set_inverted method, and updated item data handling to support dynamic styling based on the inverted state.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Refactor status field names from short_name to short_text for consistency.
Add set_size method and sizeHint override to support full, short, and icon display modes.
Enhance paintEvent to dynamically render based on selected size.
Update test interface to include size selector for demonstration.
Remove unused colorize_icon function and simplify internal state management.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Improve type safety by using Literal for size variants instead of a plain tuple. This change enhances code maintainability and leverages Python's type system for better validation of size options in AYComboBox.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Modify icon text spacing to be zero when no text is present for better layout.
Update total height calculation to use self._height instead of fixed 32 for consistency.
Added commented debug prints for potential future use.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
- Replace VARIANTS tuple with ButtonVariant Literal type alias for better type safety
- Add type hints to AYButton constructor parameters using __future__ annotations
- Remove set_label method and update test function to use get_args for dynamic variants
- Prepare properties for CSS implementation removal

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Replaced the custom `colorize_icon` function with `get_icon` from `qtmaterialsymbols`.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
…ter metrics

Signed-off-by: Philippe Leprince <philippe@ynput.io>
…rics handling

- Changed "button" to "QPushButton" and "frame" to "QFrame" in style definitions for consistency with Qt naming conventions
- Added `register_metrics` and `get_metric` methods to `ButtonDrawer` to handle pixel metrics, improving separation of responsibilities
- Removed redundant metric handling from `AYONStyle` class to centralize logic in `ButtonDrawer`
- Updated function signatures and cache keys to include widget context for better specificity

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Updated AYONStyle to use a base_classes dictionary and widget_key method for improved widget-specific drawer, sizer, and metric registration. This refactoring allows for better type handling and extensibility in styling QPushButton, QFrame, and QCheckBox widgets.

- Added base_class properties to drawer classes
- Introduced widget_key method to identify widget types
- Modified enum_to_str calls to include widget context
- Reorganized imports for consistency

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Enhance text editing widgets with rich text formatting capabilities:
- Replace QPlainTextEdit with QTextEdit/QTextBrowser for rich content
- Add styling configuration for QTextEdit with color palette support
- Implement formatting toolbar actions (bold, italic, headers, links)
- Add comment submission signal with markdown content export
- Improve checkbox toggle rendering with smoother QRectF-based drawing
- Update widget styling with new text-color-link theme color

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Replace custom color tokens with Material Design 3 color tokens across
the style configuration. Centralize palette management by creating a
base QPalette in StyleData that is applied during widget polishing,
eliminating the need for manual palette configuration in individual
widgets.

- Replace custom tokens (e.g., button-surface-base-bg) with MD3 tokens
  (e.g., --md-sys-color-surface-container-highest-dark)
- Add comprehensive MD3 color palette with reference and system colors
- Implement hsl_to_html_color() for HSL color format support
- Create base_palette in StyleData for consistent color application
- Remove manual palette configuration from AYTextEditor widget
- Add Qt palette role mappings for native widget styling

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Extract markdown content initialization from AYTextEditor constructor
and add a public set_markdown() method to AYTextBox. This removes
hardcoded default content and provides a cleaner, more flexible API
for setting markdown content programmatically.

Updated examples and test code to use the new method.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Replace hardcoded ALL_STATUSES with configurable items parameter in
AYComboBox constructor. Add add_item() method with overloads for both
dict and Item types to support dynamic item addition. Rename set_data()
to update_items() for better clarity.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
…able names

- Remove QPushButton-only restriction for hover and mouse tracking
- Rename variables in drawControl method for better code clarity

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Move QComboBox rendering from AYComboBox widget to AYONStyle system.
Introduce ComboBoxDrawer and ComboBoxItemDelegate classes to handle
custom rendering. Remove paintEvent and sizeHint overrides from
widget, delegating all visual rendering to the style.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Move all UI component modules from ayon_ui_qt/ to ayon_ui_qt/components/
for better code organization. Panel modules (activity_stream,
comments_panel, detail_panel) moved to project root. Legacy CSS/QSS
files and web styles relocated to ayon_ui_qt/old/ directory.

Update all import statements throughout the codebase to reflect new
structure. Remove public API exports from ayon_ui_qt/__init__.py.

BREAKING CHANGE: Import paths for all components have changed. Update imports from `ayon_ui_qt.<component>` to `ayon_ui_qt.components.<component>`. The ayon_ui_qt package no longer exports components directly from __init__.py.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
Signed-off-by: Philippe Leprince <philippe@ynput.io>
Rename CommentsPanel class to ActivityPanel to align with the previous
file rename. Add ActivityPanelSignals class with signals for comment
actions (submit, edit, delete) and state changes (priority, assignee,
status). Connect internal editor signals to enable event propagation.

Signed-off-by: Philippe Leprince <philippe@ynput.io>
@kalisp kalisp assigned philippe-ynput and unassigned kalisp Nov 28, 2025
@iLLiCiTiT
Copy link
Member

If this is an addon now we can remove the vendor as that is what ayon-core already does contain.

moonyuet and others added 7 commits December 6, 2025 20:10
Signed-off-by: philippe-ynput <philippe@ynput.io>
Signed-off-by: philippe-ynput <philippe@ynput.io>
The font styling logic for buttons has been extracted into a new `_style_font` function to improve code reusability and maintainability.

Added debug utility function `_debug_rect` for visual debugging of UI elements during development.

Signed-off-by: philippe-ynput <philippe@ynput.io>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants