Skip to content

Commit d1d7e00

Browse files
authored
docs: DOC-759: warnings when building deephaven UI docs (#1182)
Fixes Doc-759. Resolves indentation and block quote formatting issues in the UI docs. Also, removes references to `selection` and `thread` in the API reference to prevent build warnings as modules are not defined.
1 parent 542cb81 commit d1d7e00

7 files changed

Lines changed: 64 additions & 23 deletions

File tree

plugins/ui/docs/components/dialog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,11 @@ my_large_example = large_example()
320320

321321
## API Reference
322322

323+
323324
```{eval-rst}
324325
.. dhautofunction:: deephaven.ui.dialog
326+
325327
.. dhautofunction:: deephaven.ui.content
328+
326329
.. dhautofunction:: deephaven.ui.footer
327330
```

plugins/ui/docs/components/dialog_trigger.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,5 +364,14 @@ my_event_example = event_example()
364364
## API Reference
365365

366366
```{eval-rst}
367+
.. dhautofunction:: deephaven.ui.dialog_trigger
368+
367369
.. dhautofunction:: deephaven.ui.dialog
370+
:no-index:
371+
372+
.. dhautofunction:: deephaven.ui.content
373+
:no-index:
374+
375+
.. dhautofunction:: deephaven.ui.footer
376+
:no-index:
368377
```

plugins/ui/docs/components/html.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,64 @@ html = ui.html.div(ui.html.h1("Component inside html"), ui.text("this is a compo
6767

6868
```{eval-rst}
6969
.. dhautofunction:: deephaven.ui.html.html_element
70+
7071
.. dhautofunction:: deephaven.ui.html.a
72+
7173
.. dhautofunction:: deephaven.ui.html.button
74+
7275
.. dhautofunction:: deephaven.ui.html.code
76+
7377
.. dhautofunction:: deephaven.ui.html.div
78+
7479
.. dhautofunction:: deephaven.ui.html.form
80+
7581
.. dhautofunction:: deephaven.ui.html.h1
82+
7683
.. dhautofunction:: deephaven.ui.html.h2
84+
7785
.. dhautofunction:: deephaven.ui.html.h3
86+
7887
.. dhautofunction:: deephaven.ui.html.h4
88+
7989
.. dhautofunction:: deephaven.ui.html.h5
90+
8091
.. dhautofunction:: deephaven.ui.html.h6
92+
8193
.. dhautofunction:: deephaven.ui.html.i
94+
8295
.. dhautofunction:: deephaven.ui.html.img
96+
8397
.. dhautofunction:: deephaven.ui.html.input
98+
8499
.. dhautofunction:: deephaven.ui.html.label
100+
85101
.. dhautofunction:: deephaven.ui.html.li
102+
86103
.. dhautofunction:: deephaven.ui.html.ol
104+
87105
.. dhautofunction:: deephaven.ui.html.option
106+
88107
.. dhautofunction:: deephaven.ui.html.p
108+
89109
.. dhautofunction:: deephaven.ui.html.pre
90-
.. dhautofunction:: deephaven.ui.html.selection
110+
111+
.. dhautofunction:: deephaven.ui.html.select
112+
91113
.. dhautofunction:: deephaven.ui.html.span
114+
92115
.. dhautofunction:: deephaven.ui.html.table
116+
93117
.. dhautofunction:: deephaven.ui.html.tbody
118+
94119
.. dhautofunction:: deephaven.ui.html.td
120+
95121
.. dhautofunction:: deephaven.ui.html.textarea
122+
96123
.. dhautofunction:: deephaven.ui.html.th
97-
.. dhautofunction:: deephaven.ui.html.thread
124+
125+
.. dhautofunction:: deephaven.ui.html.thead
126+
98127
.. dhautofunction:: deephaven.ui.html.tr
128+
99129
.. dhautofunction:: deephaven.ui.html.ul
100130
```

plugins/ui/src/deephaven/ui/components/combo_box.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def combo_box(
132132
) -> ComboBoxElement:
133133
"""
134134
A combo box that can be used to search or select from a list. Children should be one of five types:
135+
135136
1. If children are of type `Item`, they are the dropdown options.
136137
2. If children are of type `SectionElement`, they are the dropdown sections.
137138
3. If children are of type `Table`, the values in the table are the dropdown options.

plugins/ui/src/deephaven/ui/components/dialog_trigger.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def dialog_trigger(
2929
) -> Element:
3030
"""
3131
A dialog_trigger serves as a wrapper around a dialog and its associated trigger.
32+
3233
Args:
3334
*children: The Dialog and its trigger element.
3435
type: The type of Dialog that should be rendered.

plugins/ui/src/deephaven/ui/components/list_view.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def list_view(
103103
) -> ListViewElement:
104104
"""
105105
A list view that can be used to create a list of items. Children should be one of three types:
106+
106107
1. If children are of type `Item`, they are the list items.
107108
2. If children are of type `Table`, the values in the table are the list items.
108109
There can only be one child, the `Table`.
@@ -120,21 +121,21 @@ def list_view(
120121
overflow_mode: The behaviour of the text when it overflows the cell.
121122
render_empty_state: Sets what the `list_view` should render when there is no content to display.
122123
disabled_behavior: Whether disabled_keys applies to all interactions or just selection.
123-
disabled_keys: The keys that should be disabled. These cannot be selected, focused, or interacted with
124+
disabled_keys: The keys that should be disabled. These cannot be selected, focused, or interacted with.
124125
selection_mode: By default `"MULTIPLE"`, which allows multiple selection. May also be `"SINGLE"` to allow only single selection, or `"None"`/`None` to allow no selection.
125126
disallow_empty_selection: Whether the ListView should disallow empty selection.
126127
selected_keys: The currently selected keys in the collection (controlled).
127128
default_selected_keys: The initial selected keys in the collection (uncontrolled).
128129
selection_style: How the selection should be displayed.
129130
on_action: Handler that is called when the user performs an action on an item. The user event depends on the collection's selection_style and interaction modality.
130131
on_change: Handler that is called when the selection changes.
131-
on_selection_change: Deprecated. Use on_change instead.Handler that is called when the selection changes.
132+
on_selection_change: Deprecated. Use on_change instead. Handler that is called when the selection changes.
132133
flex: When used in a flex layout, specifies how the element will grow or shrink to fit the space available.
133134
flex_grow: When used in a flex layout, specifies how the element will grow to fit the space available.
134135
flex_shrink: When used in a flex layout, specifies how the element will shrink to fit the space available.
135136
flex_basis: When used in a flex layout, specifies the initial main size of the element.
136137
align_self: Overrides the alignItems property of a flex or grid container.
137-
justify_self: Species how the element is justified inside a flex or grid container.
138+
justify_self: Specifies how the element is justified inside a flex or grid container.
138139
order: The layout order for the element within a flex or grid container.
139140
grid_area: When used in a grid layout, specifies the named grid area that the element should be placed in within the grid.
140141
grid_row: When used in a grid layout, specifies the row the element should be placed in within the grid.
@@ -163,7 +164,7 @@ def list_view(
163164
right: The right position of the element.
164165
start: The logical start position of the element, depending on layout direction.
165166
end: The logical end position of the element, depending on layout direction.
166-
z_index: The stacking order for the element
167+
z_index: The stacking order for the element.
167168
is_hidden: Hides the element.
168169
id: The unique identifier of the element.
169170
aria_label: Defines a string value that labels the current element.

plugins/ui/src/deephaven/ui/components/picker.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,31 +121,28 @@ def picker(
121121
) -> PickerElement:
122122
"""
123123
A picker that can be used to select from a list. Children should be one of five types:
124+
124125
1. If children are of type `Item`, they are the dropdown options.
125126
2. If children are of type `SectionElement`, they are the dropdown sections.
126127
3. If children are of type `Table`, the values in the table are the dropdown options.
127-
There can only be one child, the `Table`.
128-
The first column is used as the key and label by default.
128+
There can only be one child, the `Table`.
129+
The first column is used as the key and label by default.
129130
4. If children are of type `PartitionedTable`, the values in the table are the dropdown options
130-
and the partitions create multiple sections. There can only be one child, the `PartitionedTable`.
131-
The first column is used as the key and label by default.
131+
and the partitions create multiple sections. There can only be one child, the `PartitionedTable`.
132+
The first column is used as the key and label by default.
132133
5. If children are of type `ItemTableSource`, complex items are created from the source.
133-
There can only be one child, the `ItemTableSource`.
134-
Supported ItemTableSource arguments are `key_column`, `label_column`, `description_column`,
135-
`icon_column`, and `title_column`.
134+
There can only be one child, the `ItemTableSource`.
135+
Supported ItemTableSource arguments are `key_column`, `label_column`, `description_column`,
136+
`icon_column`, and `title_column`.
136137
137138
Args:
138139
*children: The options to render within the picker.
139-
default_selected_key:
140-
The initial selected key in the collection (uncontrolled).
141-
selected_key:
142-
The currently selected key in the collection (controlled).
143-
on_selection_change:
144-
Handler that is called when the selection changes.
145-
on_change:
146-
Alias of `on_selection_change`. Handler that is called when the selection changes.
140+
default_selected_key: The initial selected key in the collection (uncontrolled).
141+
selected_key: The currently selected key in the collection (controlled).
142+
on_selection_change: Handler that is called when the selection changes.
143+
on_change: Alias of `on_selection_change`. Handler that is called when the selection changes.
147144
148-
is_quiet: Whether the TextField should be displayed with a quiet style
145+
is_quiet: Whether the TextField should be displayed with a quiet style.
149146
align: Alignment of the menu relative to the input target.
150147
direction: Direction in which the menu should open relative to the Picker.
151148
should_flip: Whether the menu should flip when it reaches the viewport boundaries.
@@ -220,7 +217,6 @@ def picker(
220217
UNSAFE_style: A CSS style to apply to the element.
221218
key: A unique identifier used by React to render elements in a list.
222219
223-
224220
Returns:
225221
The rendered Picker.
226222
"""

0 commit comments

Comments
 (0)