Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions plugins/ui/src/deephaven/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
class UIRegistration(Registration):
@classmethod
def register_into(cls, callback: Callback) -> None:
callback.register(DashboardType)
callback.register(ElementType)
9 changes: 9 additions & 0 deletions plugins/ui/src/deephaven/ui/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
from .panel import panel
from .spectrum import *
from .table import table
from .dashboard import dashboard
from .row import row
from .column import column
from .stack import stack

from . import html


Expand All @@ -12,9 +17,11 @@
"button",
"button_group",
"checkbox",
"column",
"component",
"content",
"contextual_help",
"dashboard",
"flex",
"form",
"fragment",
Expand All @@ -28,8 +35,10 @@
"item",
"panel",
"range_slider",
"row",
"slider",
"spectrum_element",
"stack",
"switch",
"table",
"tab_list",
Expand Down
18 changes: 18 additions & 0 deletions plugins/ui/src/deephaven/ui/components/column.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from __future__ import annotations

from typing import Any
from ..elements import BaseElement


def column(*children: Any, width: float | None = None, **kwargs: Any):
"""
A column is a container that can be used to group elements.
Each element will be placed below its prior sibling.

Args:
children: Elements to render in the column.
width: The percent width of the column relative to other children of its parent. If not provided, the column will be sized automatically.
"""
return BaseElement(
"deephaven.ui.components.Column", *children, width=width, **kwargs
)
14 changes: 14 additions & 0 deletions plugins/ui/src/deephaven/ui/components/dashboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from __future__ import annotations

from typing import Any
from ..elements import DashboardElement


def dashboard(*children: Any, **kwargs: Any):
"""
A dashboard is the container for an entire layout.

Args:
children: Elements to render in the dashboard. Must have only 1 root element.
Comment thread
mattrunyon marked this conversation as resolved.
Outdated
"""
return DashboardElement(*children, **kwargs)
18 changes: 18 additions & 0 deletions plugins/ui/src/deephaven/ui/components/row.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from __future__ import annotations

from typing import Any
from ..elements import BaseElement


def row(*children: Any, height: float | None = None, **kwargs: Any):
"""
A row is a container that can be used to group elements.
Each element will be placed to the right of its prior sibling.

Args:
children: Elements to render in the row.
height: The percent height of the row relative to other children of its parent. If not provided, the row will be sized automatically.
"""
return BaseElement(
"deephaven.ui.components.Row", *children, height=height, **kwargs
)
Loading