-
Notifications
You must be signed in to change notification settings - Fork 32
✨ nicegui rendering aids #8427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ nicegui rendering aids #8427
Conversation
…-dy-scheduler-part4
…-dy-scheduler-part4
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8427 +/- ##
===========================================
- Coverage 87.84% 63.84% -24.01%
===========================================
Files 1957 824 -1133
Lines 76126 36585 -39541
Branches 1342 175 -1167
===========================================
- Hits 66875 23357 -43518
- Misses 8847 13171 +4324
+ Partials 404 57 -347
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🧪 CI InsightsHere's what we observed from your CI run for c45096b. ✅ Passed Jobs With Interesting Signals
|
…-dy-scheduler-part4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new NiceGUI rendering aids to improve UI component management. The changes add a BaseUpdatableComponent and BaseUpdatableDisplayModel architecture that enables dynamic UI rendering based on model changes, along with an UpdatableComponentStack for automatic component lifecycle management.
- Introduces
BaseUpdatableDisplayModelwith subscription capabilities for type and value changes - Adds
BaseUpdatableComponentas a base class for UI components that can be dynamically updated - Implements
UpdatableComponentStackfor automatic rendering and removal of UI components
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
services/dynamic-scheduler/tests/unit/api_frontend/helpers.py |
Refactored screenshot handling by extracting common functionality and adding screenshot cleanup |
services/dynamic-scheduler/tests/unit/api_frontend/conftest.py |
Added fixtures for screenshot cleanup and converted utility function to fixture |
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_updatable_component.py |
Comprehensive integration tests for the new updatable component system |
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_base_display_model.py |
Unit tests for the base display model functionality |
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/stack.py |
Implementation of UpdatableComponentStack for managing multiple UI components |
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py |
Core BaseUpdatableDisplayModel with subscription and update capabilities |
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_component.py |
BaseUpdatableComponent abstract base class for UI components |
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/_mixins.py |
Common mixins for display and parent element management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_base_display_model.py
Outdated
Show resolved
Hide resolved
...c-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py
Outdated
Show resolved
Hide resolved
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_updatable_component.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
PS: for a moment I read "rendering Ads" :-D
...ices/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/_mixins.py
Show resolved
Hide resolved
...ices/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/_mixins.py
Show resolved
Hide resolved
...namic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_component.py
Show resolved
Hide resolved
...c-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...c-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py
Show resolved
Hide resolved
...c-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py
Show resolved
Hide resolved
|
@GitHK Please fill "Related issue/s" and "Labels" ... it helps connecting and classifying issues. e.g. to build the release notes. thx |
|



What do these changes do?
In order to more easily define and maintain layouts in NiceGUI a
BaseUpdatableComponentand aBaseUpdatableDisplayModelwere added.BaseUpdatableDisplayModelallows theBaseUpdatableComponentto subscribe to type and value changes on some attributes. With this techniques different UI layouts can be rendered (swapped)UpdatableComponentStackwhich allows to automatically render aBaseUpdatableComponentwhen aBaseUpdatableDisplayModelis added and also removes the UI component when the model is removed.Related issue/s
How to test
Dev-ops