Skip to content

Conversation

@ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Nov 29, 2025

  • examples-gallery Flet app is a simple app which contains routes to each control's examples.
  • It gets packaged (by flet publish) at docs runtime, and is hosted along with the docs at /apps/examples-gallery/dist/
  • in each control documentation, a macro is used to embed the corresponding live-example as an iframe.
  • corresponding images have been removed in favour of the live demo.

OwenMcDonnell and others added 30 commits November 26, 2025 23:39
# Conflicts:
#	sdk/python/examples/poc/README.md
#	sdk/python/packages/flet/docs/apps/examples-gallery/pyproject.toml
@ndonkoHenri ndonkoHenri requested a review from Copilot November 29, 2025 20:43
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request #5867 has too many files changed.

The GitHub API will only let us fetch up to 300 changed files, and this pull request has 737.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR transitions the Flet documentation from static images to live, interactive examples by creating an examples gallery app that's packaged and embedded via iframes. The changes primarily add if __name__ == "__main__": guards to all example files to enable them to run as standalone scripts, along with various code improvements including import reordering, simplified logic, and removal of unused dependencies.

Key Changes

  • Added if __name__ == "__main__": guards to 100+ example files for standalone execution
  • Standardized import ordering (flet first, then third-party packages)
  • Inlined external data dependencies (e.g., desserts data in datatable examples)
  • Refactored code for improved clarity (e.g., disabled instead of visible for web-specific buttons)

Reviewed changes

Copilot reviewed 128 out of 737 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/python/examples/controls/**/*.py Added if __name__ == "__main__" guards to enable standalone execution
sdk/python/examples/controls/geolocator/example_1.py Reordered imports, changed visible=not page.web to disabled=page.web
sdk/python/examples/controls/file_picker/pick_and_upload.py Converted comments to module docstring, improved documentation
sdk/python/examples/controls/datatable2/example_2.py Inlined desserts data from external file, refactored code structure
sdk/python/examples/controls/audio/example_1.py Updated audio URL, improved logging with snackbar display
sdk/python/examples/controls/charts/matplotlib_chart/*.py Removed unnecessary logging configuration
.github/workflows/docs.yml Added new workflow for building documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 30, 2025

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5af8f37
Status: ✅  Deploy successful!
Preview URL: https://70420380.flet-docs.pages.dev
Branch Preview URL: https://embed-examples-publish.flet-docs.pages.dev

View logs

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.

3 participants