Classes
ShellMenuItem
7
▼
A menu item rendered inside a shell action dropdown.
ShellMenuItem
7
▼
A menu item rendered inside a shell action dropdown.
Attributes
| Name | Type | Description |
|---|---|---|
label |
str
|
— |
href |
str | None
|
— |
action |
str | None
|
— |
variant |
ShellActionVariant
|
— |
icon |
str | None
|
— |
divider |
bool
|
— |
Methods
get
2
object
▼
Mapping-like accessor so templates can use dict-style lookups.
get
2
object
▼
def get(self, key: str, default: object = None) -> object
Parameters
| Name | Type | Description |
|---|---|---|
key |
— |
|
default |
— |
Default:None
|
Returns
object
ShellAction
21
▼
A single action contribution for a shell region.
ShellAction
21
▼
A single action contribution for a shell region.
Attributes
| Name | Type | Description |
|---|---|---|
id |
str
|
— |
label |
str
|
— |
kind |
ShellActionKind
|
— |
href |
str | None
|
— |
action |
str | None
|
— |
variant |
ShellActionVariant
|
— |
icon |
str | None
|
— |
size |
str
|
— |
disabled |
bool
|
— |
menu_items |
tuple[ShellMenuItem, ...]
|
— |
form_action |
str | None
|
— |
form_method |
str
|
— |
hidden_fields |
tuple[tuple[str, str], ...]
|
— |
include_csrf |
bool
|
— |
hx_post |
str | None
|
— |
hx_target |
str | None
|
— |
hx_swap |
str | None
|
— |
hx_disinherit |
str | None
|
— |
submit_surface |
ShellSubmitSurface
|
— |
attrs |
str
|
— |
Methods
as_menu_item
0
ShellMenuItem
▼
Convert a button/link action to a dropdown-compatible menu item.
as_menu_item
0
ShellMenuItem
▼
def as_menu_item(self) -> ShellMenuItem
Returns
ShellMenuItem
ShellActionZone
5
▼
A zone contribution with explicit merge semantics.
ShellActionZone
5
▼
A zone contribution with explicit merge semantics.
Attributes
| Name | Type | Description |
|---|---|---|
items |
tuple[ShellAction, ...]
|
— |
remove |
tuple[str, ...]
|
— |
mode |
ShellActionZoneMode
|
— |
Methods
overflow_items
0
tuple[ShellMenuItem, ...]
▼
Dropdown-compatible items for overflow rendering.
property
overflow_items
0
tuple[ShellMenuItem, ...]
▼
def overflow_items(self) -> tuple[ShellMenuItem, ...]
Returns
tuple[ShellMenuItem, ...]
Internal Methods 1 ▼
__bool__
0
bool
▼
__bool__
0
bool
▼
def __bool__(self) -> bool
Returns
bool
ShellActions
7
▼
Resolved shell actions for persistent chrome regions.
ShellActions
7
▼
Resolved shell actions for persistent chrome regions.
Attributes
| Name | Type | Description |
|---|---|---|
primary |
ShellActionZone
|
— |
controls |
ShellActionZone
|
— |
overflow |
ShellActionZone
|
— |
target |
str
|
— |
Methods
has_items
0
bool
▼
Whether any zone currently contains rendered actions.
property
has_items
0
bool
▼
def has_items(self) -> bool
Returns
bool
Internal Methods 2 ▼
__post_init__
0
▼
__post_init__
0
▼
def __post_init__(self) -> None
__bool__
0
bool
▼
__bool__
0
bool
▼
def __bool__(self) -> bool
Returns
bool
Functions
merge_shell_actions
2
ShellActions | None
▼
Merge route-scoped shell actions from parent to child.
merge_shell_actions
2
ShellActions | None
▼
def merge_shell_actions(parent: ShellActions | None, child: ShellActions | None) -> ShellActions | None
Parameters
| Name | Type | Description |
|---|---|---|
parent |
ShellActions | None |
|
child |
ShellActions | None |
Returns
ShellActions | None
normalize_shell_actions
1
ShellActions | None
▼
Normalize a context value into ``ShellActions``.
normalize_shell_actions
1
ShellActions | None
▼
def normalize_shell_actions(value: Any) -> ShellActions | None
Parameters
| Name | Type | Description |
|---|---|---|
value |
Any |
Returns
ShellActions | None
shell_actions_fragment
1
tuple[str, str, str] | N…
▼
Return the template, block, and target for shell OOB rendering.
shell_actions_fragment
1
tuple[str, str, str] | N…
▼
def shell_actions_fragment(actions: ShellActions | None) -> tuple[str, str, str] | None
Parameters
| Name | Type | Description |
|---|---|---|
actions |
ShellActions | None |
Returns
tuple[str, str, str] | None
validate_shell_actions
1
None
▼
Validate zone contents and stable action ids.
validate_shell_actions
1
None
▼
def validate_shell_actions(actions: ShellActions) -> None
Parameters
| Name | Type | Description |
|---|---|---|
actions |
ShellActions |