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

Docstrings for radix components #2407

Merged
merged 12 commits into from
Jan 24, 2024
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components/avatar.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class Avatar(CommonMarginProps, RadixThemesComponent):
"""A toggle switch alternative to the checkbox."""
"""An image element with a fallback for representing the user."""

tag = "Avatar"

Expand Down
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components/badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
"""A toggle switch alternative to the checkbox."""
"""A stylized badge element."""

tag = "Badge"

Expand Down
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent):
variant: Var[LiteralVariant]

# Override theme color for button
color: Var[LiteralAccentColor]
color_scheme: Var[LiteralAccentColor]

# Whether to render the button with higher contrast color against background
high_contrast: Var[bool]
Expand Down
10 changes: 5 additions & 5 deletions reflex/components/radix/themes/components/radiogroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A set of interactive radio buttons where only one can be selected at a time."""

tag = "RadioGroup.Root"

Expand All @@ -29,12 +29,12 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
variant: Var[Literal["classic", "surface", "soft"]]

# The color of the radio group
color: Var[LiteralAccentColor]
color_scheme: Var[LiteralAccentColor]

# Whether to render the radio group with higher contrast color against background
high_contrast: Var[bool]

# The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
# The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
value: Var[str]

# The initial value of checked radio item. Should be used in conjunction with onValueChange.
Expand Down Expand Up @@ -68,11 +68,11 @@ def get_event_triggers(self) -> Dict[str, Any]:


class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""An item in the group that can be checked."""

tag = "RadioGroup.Item"

# The value of the radio item to check. Should be used in conjunction with onCheckedChange.
# The value of the radio item to check. Should be used in conjunction with on_value_change.
value: Var[str]

# When true, prevents the user from interacting with the radio item.
Expand Down
10 changes: 5 additions & 5 deletions reflex/components/radix/themes/components/radiogroup.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
size: The size of the radio group: "1" | "2" | "3"
variant: The variant of the radio group
high_contrast: Whether to render the radio group with higher contrast color against background
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
value: The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
disabled: Whether the radio group is disabled
name: The name of the group. Submitted with its owning form as part of a name/value pair.
Expand Down Expand Up @@ -427,7 +427,7 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
*children: Child components.
color: map to CSS default color property.
color_scheme: map to radix color property.
value: The value of the radio item to check. Should be used in conjunction with onCheckedChange.
value: The value of the radio item to check. Should be used in conjunction with on_value_change.
disabled: When true, prevents the user from interacting with the radio item.
required: When true, indicates that the user must check the radio item before the owning form can be submitted.
m: Margin: "0" - "9"
Expand Down Expand Up @@ -478,7 +478,7 @@ class HighLevelRadioGroup(RadioGroupRoot):
Literal["classic", "surface", "soft"],
]
] = None,
color: Optional[
color_scheme: Optional[
Union[
Var[
Literal[
Expand Down Expand Up @@ -660,9 +660,9 @@ class HighLevelRadioGroup(RadioGroupRoot):
gap: The gap between the items of the radio group.
size: The size of the radio group: "1" | "2" | "3"
variant: The variant of the radio group
color: The color of the radio group
color_scheme: The color of the radio group
high_contrast: Whether to render the radio group with higher contrast color against background
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
value: The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
disabled: Whether the radio group is disabled
name: The name of the group. Submitted with its owning form as part of a name/value pair.
Expand Down
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components/scrollarea.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class ScrollArea(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""Custom styled, cross-browser scrollable area using native functionality."""

tag = "ScrollArea"

Expand Down
14 changes: 7 additions & 7 deletions reflex/components/radix/themes/components/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


class SelectRoot(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""Displays a list of options for the user to pick from, triggered by a button."""

tag = "Select.Root"

Expand Down Expand Up @@ -58,7 +58,7 @@ def get_event_triggers(self) -> Dict[str, Any]:


class SelectTrigger(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""The button that toggles the select."""

tag = "Select.Trigger"

Expand All @@ -76,7 +76,7 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent):


class SelectContent(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""The component that pops out when the select is open."""

tag = "Select.Content"

Expand Down Expand Up @@ -119,13 +119,13 @@ def get_event_triggers(self) -> Dict[str, Any]:


class SelectGroup(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""Used to group multiple items."""

tag = "Select.Group"


class SelectItem(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""The component that contains the select items."""

tag = "Select.Item"

Expand All @@ -137,13 +137,13 @@ class SelectItem(CommonMarginProps, RadixThemesComponent):


class SelectLabel(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""Used to render the label of a group, it isn't focusable using arrow keys."""

tag = "Select.Label"


class SelectSeparator(CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""Used to visually separate items in the Select."""

tag = "Select.Separator"

Expand Down
14 changes: 7 additions & 7 deletions reflex/components/radix/themes/components/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A semantic table for presenting tabular data."""

tag = "Table.Root"

Expand All @@ -23,13 +23,13 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent):


class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""The header of the table defines column names and other non-data elements."""

tag = "Table.Header"


class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A row containing table cells."""

tag = "Table.Row"

Expand All @@ -38,7 +38,7 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent):


class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A table cell that is semantically treated as a column header."""

tag = "Table.ColumnHeaderCell"

Expand All @@ -50,13 +50,13 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):


class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""The body of the table contains the data rows."""

tag = "Table.Body"


class TableCell(el.Td, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A cell containing data."""

tag = "Table.Cell"

Expand All @@ -68,7 +68,7 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent):


class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
"""A table cell that is semantically treated as a row header."""

tag = "Table.RowHeaderCell"

Expand Down
2 changes: 1 addition & 1 deletion scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ if [ -f /proc/$pid/winpid ]; then
echo "Windows detected, passing winpid $pid to port waiter"
fi

python scripts/wait_for_listening_port.py $check_ports --timeout=600 --server-pid "$pid"
python scripts/wait_for_listening_port.py $check_ports --timeout=900 --server-pid "$pid"