-
Notifications
You must be signed in to change notification settings - Fork 600
docs: show live examples in favor of static images #5867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # sdk/python/examples/poc/README.md # sdk/python/packages/flet/docs/apps/examples-gallery/pyproject.toml
…prove modification time calculation
# Conflicts: # sdk/python/packages/flet/docs/controls/row.md # sdk/python/packages/flet/docs/controls/searchbar.md # sdk/python/packages/flet/docs/controls/slider.md
There was a problem hiding this 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.
There was a problem hiding this 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.,
disabledinstead ofvisiblefor 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.
Deploying flet-docs with
|
| 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 |
….8.0 <4.0.0" and ">=3.32.0"
flet publish) at docs runtime, and is hosted along with the docs at/apps/examples-gallery/dist/