-
Notifications
You must be signed in to change notification settings - Fork 607
v1: Custom docs template, "types" docs using macros, "Button" as a control docs example #5673
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reorganized mkdocs navigation for better clarity, grouping controls and CLI reference separately, and adding extension documentation. Removed deprecated and unused policy documentation files (deprecation, license, versioning). Minor formatting updates in mkdocs.yml and added a heading to controls/index.md.
Updated image path in DateRangePicker docs and improved references in CupertinoTextField docstrings. Removed changelog and migration guide markdown files and their navigation entries from mkdocs.yml. Cleaned up mkdocs.yml navigation, removing external links and redundant entries. Added FormFieldControl to __init__.py exports. Minor docstring clarifications in Card and VerticalDivider controls.
Introduces custom Jinja templates for mkdocstrings Python XRef handler to improve documentation rendering, including grouping of properties and events, enhanced class and attribute display, and English language macro. Adds a macros plugin with helper macros for class documentation, updates the animation type doc to use a macro, and adjusts mkdocs.yml to use the new templates and macros. Also updates the logo SVG and tweaks theme palette and features for better appearance. Adds mkdocs-macros-plugin to documentation dependencies.
Replaces direct ':::' directives in type documentation with new macro helpers (class_all_options, class_summary, etc.) for consistency and maintainability. Updates macros in __init__.py to support more flexible options and rendering. No functional changes to documented classes, only documentation formatting improvements.
Removed unused or redundant documentation files, including contributing guidelines and support information. Updated type documentation for colors, Cupertino colors, Cupertino icons, and icons to hide the table of contents and suppress attribute/function summaries. Deleted the types index file to streamline the documentation structure.
Enhanced the Button documentation with a new example image and improved macro handling for images and captions. Added a screenshot test for enabled and disabled buttons, and updated the Button control docstrings for clarity.
Refactored button example scripts to use `if __name__ == "__main__"` for execution and removed unnecessary page setup code. Updated documentation to use new example images and code references, and added/updated golden images for button examples. Introduced a new integration test suite for button examples, moved and expanded screenshot tests, and improved FletTestApp with screenshot helper methods. Added Python path configuration for pytest.
The 'examples' suite is now included in the matrix for macOS integration tests, ensuring coverage for example projects alongside existing test suites.
Updated screenshot capture calls in button integration tests to use the pixel_ratio argument from flet_app_function.screenshots_pixel_ratio for consistency and improved screenshot accuracy.
Updated the wrap_page_controls_in_screenshot method to accept a margin parameter, allowing tests to specify screenshot margins. Adjusted test_animate_on_hover to use a margin of 20 and updated related golden images to reflect the new margin.
Updated FletTestApp.assert_screenshot to accept an optional similarity_threshold parameter, allowing tests to specify custom thresholds. Modified test_button.py to use this feature for the animate_on_hover test.
The similarity_threshold parameter in the screenshot assertion for the animate_on_hover test has been commented out, possibly to use the default threshold or to temporarily disable strict similarity checking.
Uncommented the similarity_threshold parameter in the screenshot assertion for the animate_on_hover test to enforce image comparison accuracy.
Contributor
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 #5673 has too many files changed.
The GitHub API will only let us fetch up to 300 changed files, and this pull request has 314.
Included mkdocs-macros-plugin>=1.4.0 in the docs dependency group in pyproject.toml to support macro functionality in documentation builds.
Refactored page route navigation to use async methods and asyncio tasks. Updated event handlers and button callbacks to await route changes, improving compatibility with asynchronous workflows.
Deploying flet-docs with
|
| Latest commit: |
c1a1b0a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fdf319e6.flet-docs.pages.dev |
| Branch Preview URL: | https://v1-docs-improv-p2.flet-docs.pages.dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.