Skip to content
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

fix: Remove tooltip prop #334

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 0 additions & 24 deletions plugins/ui/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,6 @@ ui.picker(
selected_key: Key | None = None,
on_selection_change: Callable[[Key], None] | None = None,
on_change: Callable[[Key], None] | None = None,
tooltip: bool | TooltipOptions | None = None,
**props: Any
) -> ItemElement
```
Expand All @@ -1088,7 +1087,6 @@ ui.picker(
| `selected_key` | `Key \| None` | The currently selected key in the collection (controlled). |
| `on_selection_change` | `Callable[[Key], None] \| None` | Handler that is called when the selection changes. |
| `on_change` | `Callable[[Key], None] \| None` | Alias of `on_selection_change`. Handler that is called when the selection changes. |
| `tooltip` | `bool \| TooltipOptions \| None` | Whether to show a tooltip on hover. If `True`, the tooltip will show. If `TooltipOptions`, the tooltip will be created with the specified options. |
| `**props` | `Any` | Any other [Picker](https://react-spectrum.adobe.com/react-spectrum/Picker.html) prop, with the exception of `items`, `validate`, `errorMessage` (as a callback) and `onLoadMore` |

```py
Expand Down Expand Up @@ -1705,23 +1703,6 @@ TransformedData = Any
Stringable = str | int | float | bool
PickerItem = Stringable | ItemElement
Key = Stringable
PlacementOptions = Literal[
'auto',
'auto-start',
'auto-end',
'top',
'top-start',
'top-end',
'bottom',
'bottom-start',
'bottom-end',
'right',
'right-start',
'right-end',
'left',
'left-start',
'left-end'
]

T = TypeVar("T")
Combination: TypeAlias = T | set[T] | Sequence[T]
Expand Down Expand Up @@ -1767,11 +1748,6 @@ class LinkPoint(TypedDict):

# Column to link to
column: str

# Typed dictionaty for tooltip options
# https://popper.js.org/docs/v2/constructors/#options
class TooltipOptions(TypedDict):
placement: Optional[PlacementOptions]
```

#### Context
Expand Down
7 changes: 1 addition & 6 deletions plugins/ui/src/deephaven/ui/components/picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .section import SectionElement, PickerItem
from ..elements import BaseElement
from .._internal.utils import create_props
from ..types import ColumnName, Key, TooltipOptions
from ..types import ColumnName, Key

PickerElement = BaseElement

Expand All @@ -22,7 +22,6 @@ def picker(
selected_key: Key | None = None,
on_selection_change: Callable[[Key], None] | None = None,
on_change: Callable[[Key], None] | None = None,
tooltip: bool | TooltipOptions | None = None,
**props: Any,
) -> PickerElement:
"""
Expand Down Expand Up @@ -60,10 +59,6 @@ def picker(
Handler that is called when the selection changes.
on_change:
Alias of `on_selection_change`. Handler that is called when the selection changes.
tooltip:
Whether to show a tooltip on hover.
If `True`, the tooltip will show.
If `TooltipOptions`, the tooltip will be created with the specified options.
**props:
Any other Picker prop, except items.

Expand Down
22 changes: 0 additions & 22 deletions plugins/ui/src/deephaven/ui/types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,3 @@
# Stringable is a type that is naturally convertible to a string
Stringable = Union[str, int, float, bool]
Key = Stringable

PlacementOptions = Literal[
"auto",
"auto-start",
"auto-end",
"top",
"top-start",
"top-end",
"bottom",
"bottom-start",
"bottom-end",
"right",
"right-start",
"right-end",
"left",
"left-start",
"left-end",
]


class TooltipOptions(TypedDict):
placement: Optional[PlacementOptions]
Loading