Skip to content

refactor: reorganize examples by plugin and improve ui typing integration - #7

Merged
onclefranck merged 3 commits into
developfrom
active_development
Mar 27, 2026
Merged

refactor: reorganize examples by plugin and improve ui typing integration#7
onclefranck merged 3 commits into
developfrom
active_development

Conversation

@onclefranck

Copy link
Copy Markdown
Owner

Summary

This PR continues the cleanup and usability work around examples and NiceGUI integration.

Included changes

  • move plugin-specific examples into plugin-owned example packages
    • nicegui_builder.plugins.pydantic.examples
    • nicegui_builder.plugins.pandas.examples
  • keep core examples in nicegui_builder.examples
  • teach the CLI to discover examples automatically from core and plugin example packages
  • group nicegui-builder examples list output by example family / plugin
  • add a direct ui.datetime_input(...) example
  • align the VS Code launch template and example documentation with the new example locations

NiceGUI ui integration

  • keep runtime extensions on nicegui.ui
    • ui.builder(...)
    • ui.datetime_input(...)
    • ui.form_builder(...)
    • ui.table_builder(...)
  • improve editor completion support for from nicegui import ui
  • generate the local typings/nicegui/ui.pyi stub from NiceGUI's own ui module
  • verify the generated stub in CI to avoid drift

Why

This makes examples easier to own and evolve with the plugins that actually provide the behavior.
It also keeps the CLI user experience simple while improving internal organization.

On the typing side, it preserves native NiceGUI signatures while still exposing nicegui-builder additions on ui.

Validation

  • full test suite passed locally: 266 passed
  • known residual warning: pytest Windows cache warning for .pytest_tmp/cache

Notes

The nicegui.ui extension remains a package-owned convenience layer, not an upstream NiceGUI extension point.
Editor completion for from nicegui import ui still depends on the local partial stub setup used by this repository.

@onclefranck
onclefranck merged commit 7522334 into develop Mar 27, 2026
6 checks passed
@onclefranck
onclefranck deleted the active_development branch March 27, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant