feat: introduced 'tab' component for more organized UI (fixes issue #520) #667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Fixes #520
Description of Changes
This PR implements a
TabWidget
component for rendering grouped UI elements within tabbed interfaces. It solves the issue where components passed totab()
were being rendered both inside the tab and again outside, causing duplication and incorrect layout behavior.TabWidget.jsx
, raw string components like"Welcome to the Iris app"
are normalized totext
components with proper structure.App.jsx
, added logic to filter out components that belong to a tab to prevent them from appearing both inside and outside the tab.DynamicComponents
.onComponentUpdate
to ensure tab-internal widgets update state correctly.Files added/updated:
src/components/widgets/TabWidget.jsx
(new)DynamicComponents.jsx
–case 'tab'
addedpackage.json
– added shadCN dependenciesApp.jsx
– filterscomponents.rows
based on tab-owned IDscomponents.py
– addedtab()
component__init__.py
– imported tab fromcomponents.py
Type of Change
Testing
iris
example with the following configuration:Checklist