annie.pages.tabs¶
Lazily built tab panels: a tab’s content is built the first time it is opened (UI helper).
Building every tab on each page load used to cost the full Browse first page, the Annotator
task, the Dataset config scan and more, before the user had even looked. LazyTabs
creates the empty panels up front and fills each one on its first visit.
Classes¶
Tab panels whose content is built on first open. |
Module Contents¶
- class annie.pages.tabs.LazyTabs(builders: collections.abc.Mapping[str, collections.abc.Callable[[], None]])[source]¶
Tab panels whose content is built on first open.
Must be created inside the page (a NiceGUI client context), under
ui.tab_panels.- Parameters:
builders – Tab name → function that builds the tab’s content (called once, inside its panel), in display order.