-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ui.fragment, ui.tabs, ui.tab_list, ui.tab_panels (#138)
- When decoding the JSON document, convert the element nodes right to their components then - Eliminates wrapper components like `ElementView`, which was causing some issues when used within components that expected children of a certain type (such as Tabs/TabPanels/TabList from spectrum) - Wraps exported objects in the `ObjectView` only when they are rendered as children of an element - Still checks for mixed panel/non-panels at root, and implicitly wraps root if no panels - Wrap children elements of spectrum components that are just `string` type to a `Text` element - Fixes up padding issues within Spectrum components - Fix styling on table to `display: contents` - Now it sizes correctly by default when used within tabs - Use a context (ReactPanelManagerContext) to handle the opening/closing of react panels within a document - Concept can be extended for opening/closing dashboards as well - Add an example for `Tabs`/`ui.tabs` - Looked into automatically mapping `ui.item`, but was annoying with setting the keys, not bothering to deviate right now - Handle exported object lifecycle more correctly - Now the `WidgetHandler` handles closing all the exported objects - This will conflict with #129, and needs further discussion on how best to handle this, as some objects can't be copied (only `Table` can be) and we may have the same object twice in a document - Fixes #127
- Loading branch information
Showing
32 changed files
with
566 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
from ..elements import BaseElement | ||
|
||
|
||
def fragment(*children: Any): | ||
""" | ||
A React.Fragment: https://react.dev/reference/react/Fragment. | ||
Used to group elements together without a wrapper node. | ||
Args: | ||
children: The children in the fragment. | ||
""" | ||
return BaseElement("deephaven.ui.components.Fragment", children=children) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.