exlab_wizard.ui.components.banner_stack#

Banner stack component (Frontend Spec §2.2.3).

Renders the active banners for a container. Stacking is capped at 2; a 3rd active banner collapses into a “…and N more issues” link.

Reads from exlab_wizard.ui.notifications instead of taking the banner list as a constructor argument so any caller of show_banner() automatically updates the stack on next render.

Functions

banner_stack([container])

Build the banner stack UI for a container.

banner_stack_props(container)

Compute the visible / overflow split for a container.

class exlab_wizard.ui.components.banner_stack.BannerId(*values)[source]#

Bases: StrEnum

Closed-set banner triggers (Frontend §2.2.3).

Adding a new banner is a deliberate spec change: update §2.2.3 and add a value here. Unknown ids are rejected at runtime in show_banner().

LIMS_UNREACHABLE = 'lims_unreachable'#
NAS_UNREACHABLE = 'nas_unreachable'#
RECONNECTING = 'reconnecting'#
SETUP_INCOMPLETE = 'setup_incomplete'#
SYNC_BLOCKED_ON_SUCCESS_CARD = 'sync_blocked_on_success_card'#
class exlab_wizard.ui.components.banner_stack.ContainerId(*values)[source]#

Bases: StrEnum

Banner placement scopes (Frontend §2.2.3).

GLOBAL = 'global'#
SETTINGS = 'settings'#
WIZARD = 'wizard'#
class exlab_wizard.ui.components.banner_stack.Severity(*values)[source]#

Bases: StrEnum

Banner severity (Frontend §2.2.3).

DANGER = 'danger'#
INFO = 'info'#
SUCCESS = 'success'#
WARNING = 'warning'#
exlab_wizard.ui.components.banner_stack.banner_stack(container=ContainerId.GLOBAL)[source]#

Build the banner stack UI for a container.

Parameters:

container (ContainerId)

Return type:

Any

exlab_wizard.ui.components.banner_stack.banner_stack_props(container)[source]#

Compute the visible / overflow split for a container.

Returns a dict with visible (list of (BannerId, record) tuples capped at 2) and overflow_count (int).

Parameters:

container (ContainerId)

Return type:

dict[str, Any]