From 3b92c3d86885dce6af88a90874fbb76986b2ca8c Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 11:37:50 -0700 Subject: [PATCH 01/35] docs: inject example section headings dynamically from pyproject.toml Replace static ### headers before blocks with a Docusaurus remark plugin (remark-inject-example-headings) that reads titles from examples-metadata.json at build time. The metadata generator (generate.py) now includes the title from [tool.flet.metadata] in each example's entry. Running in beforeDefaultRemarkPlugins so injected headings are picked up by Docusaurus TOC extraction. Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/scripts/update_example_headers.py | 38 ++++++++++++ tools/crocodocs/src/crocodocs/generate.py | 19 ++++-- website/docs/controls/alertdialog.md | 2 - website/docs/controls/animatedswitcher.md | 6 -- website/docs/controls/appbar.md | 4 -- website/docs/controls/autocomplete.md | 2 - website/docs/controls/autofillgroup.md | 2 - website/docs/controls/banner.md | 2 - website/docs/controls/bottomappbar.md | 4 -- website/docs/controls/bottomsheet.md | 4 -- website/docs/controls/button.md | 14 ----- website/docs/controls/checkbox.md | 6 -- website/docs/controls/circleavatar.md | 2 - website/docs/controls/column.md | 8 --- website/docs/controls/container.md | 20 ------ website/docs/controls/contextmenu.md | 6 -- .../controls/cupertinoactivityindicator.md | 2 - website/docs/controls/cupertinoalertdialog.md | 4 -- website/docs/controls/cupertinoappbar.md | 4 -- website/docs/controls/cupertinobottomsheet.md | 2 - website/docs/controls/cupertinobutton.md | 2 - website/docs/controls/cupertinocheckbox.md | 4 -- website/docs/controls/cupertinodatepicker.md | 2 - .../docs/controls/cupertinofilledbutton.md | 2 - website/docs/controls/cupertinolisttile.md | 2 - .../docs/controls/cupertinonavigationbar.md | 4 -- website/docs/controls/cupertinopicker.md | 2 - website/docs/controls/cupertinoradio.md | 2 - .../docs/controls/cupertinosegmentedbutton.md | 4 -- website/docs/controls/cupertinoslider.md | 2 - .../cupertinoslidingsegmentedbutton.md | 2 - website/docs/controls/cupertinoswitch.md | 2 - website/docs/controls/cupertinotextfield.md | 6 -- website/docs/controls/cupertinotimerpicker.md | 2 - website/docs/controls/datepicker.md | 4 -- website/docs/controls/daterangepicker.md | 4 -- website/docs/controls/dismissible.md | 2 - website/docs/controls/divider.md | 2 - website/docs/controls/draggable.md | 8 +-- website/docs/controls/dropdownm2.md | 8 --- website/docs/controls/expansionpanellist.md | 2 - website/docs/controls/expansiontile.md | 10 --- website/docs/controls/filledbutton.md | 2 - website/docs/controls/filledtonalbutton.md | 2 - website/docs/controls/floatingactionbutton.md | 2 - website/docs/controls/gesturedetector.md | 6 -- website/docs/controls/gridview.md | 2 - website/docs/controls/hero.md | 4 -- website/docs/controls/icon.md | 2 - website/docs/controls/iconbutton.md | 6 -- website/docs/controls/image.md | 12 ---- website/docs/controls/interactiveviewer.md | 4 -- website/docs/controls/keyboardlistener.md | 2 - website/docs/controls/layoutcontrol.md | 10 --- website/docs/controls/listtile.md | 2 - website/docs/controls/listview.md | 2 - website/docs/controls/markdown.md | 6 -- website/docs/controls/menubar.md | 2 - website/docs/controls/menuitembutton.md | 2 - website/docs/controls/outlinedbutton.md | 8 --- website/docs/controls/page.md | 8 --- website/docs/controls/pagelet.md | 2 - website/docs/controls/pageview.md | 4 -- website/docs/controls/placeholder.md | 2 - website/docs/controls/popupmenubutton.md | 2 - website/docs/controls/progressbar.md | 2 - website/docs/controls/progressring.md | 4 -- website/docs/controls/radio.md | 6 -- website/docs/controls/rangeslider.md | 4 -- .../docs/controls/reorderabledraghandle.md | 2 - website/docs/controls/reorderablelistview.md | 2 - website/docs/controls/responsiverow.md | 4 -- website/docs/controls/router.md | 12 ---- website/docs/controls/row.md | 8 --- website/docs/controls/safearea.md | 2 - website/docs/controls/screenshot.md | 2 - website/docs/controls/searchbar.md | 2 - website/docs/controls/selectionarea.md | 2 - website/docs/controls/semantics.md | 2 - website/docs/controls/shadermask.md | 6 -- website/docs/controls/shimmer.md | 6 -- website/docs/controls/slider.md | 8 --- website/docs/controls/snackbar.md | 6 -- website/docs/controls/stack.md | 4 -- website/docs/controls/submenubutton.md | 4 -- website/docs/controls/switch.md | 4 -- website/docs/controls/text.md | 12 ---- website/docs/controls/textbutton.md | 8 --- website/docs/controls/textfield.md | 18 ------ website/docs/controls/timepicker.md | 6 -- website/docs/controls/verticaldivider.md | 2 - website/docs/controls/windowdragarea.md | 2 - website/docusaurus.config.js | 1 + .../plugins/remark-inject-example-headings.js | 62 +++++++++++++++++++ 94 files changed, 117 insertions(+), 409 deletions(-) create mode 100644 sdk/python/scripts/update_example_headers.py create mode 100644 website/plugins/remark-inject-example-headings.js diff --git a/sdk/python/scripts/update_example_headers.py b/sdk/python/scripts/update_example_headers.py new file mode 100644 index 0000000000..4488d850b8 --- /dev/null +++ b/sdk/python/scripts/update_example_headers.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +"""Remove static ### headers before tags in control docs. + +The headers are now injected dynamically by the remark-inject-example-headings +plugin from examples-metadata.json (sourced from pyproject.toml titles). +""" + +import re +from pathlib import Path + +DOCS_DIR = Path(__file__).parent.parent.parent.parent / "website/docs/controls" + +# Matches: ### Header\n\n bool: + content = md_file.read_text() + new_content = PATTERN.sub(r"\1", content) + if new_content != content: + md_file.write_text(new_content) + return True + return False + + +def main() -> None: + changed = 0 + for md_file in sorted(DOCS_DIR.glob("*.md")): + if process_file(md_file): + changed += 1 + print(f"Updated {changed} files.") + + +if __name__ == "__main__": + main() diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index aa38e22907..e4928014ff 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -148,15 +148,19 @@ def _generate_code_examples(examples_root: Path, output_path: Path) -> int: return len(mapping) +def _read_pyproject(pyproject_path: Path) -> dict[str, Any]: + try: + return tomllib.loads(pyproject_path.read_text(encoding="utf-8")) + except (OSError, ValueError): + return {} + + def _example_web_supported(pyproject_path: Path) -> bool: """Return True when the example at pyproject_path supports the web platform. Web is supported when [tool.flet].platforms is absent, empty, or contains "web". """ - try: - data = tomllib.loads(pyproject_path.read_text(encoding="utf-8")) - except (OSError, ValueError): - return True + data = _read_pyproject(pyproject_path) platforms = data.get("tool", {}).get("flet", {}).get("platforms") if not platforms: return True @@ -183,7 +187,12 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: if example_dir == examples_root: continue relative = example_dir.relative_to(examples_root).as_posix() - mapping[relative] = {"webSupported": _example_web_supported(pyproject_path)} + data = _read_pyproject(pyproject_path) + meta: dict[str, Any] = {"webSupported": _example_web_supported(pyproject_path)} + title = data.get("tool", {}).get("flet", {}).get("metadata", {}).get("title") + if title: + meta["title"] = title + mapping[relative] = meta output_path.write_text( json.dumps(mapping, indent=2, sort_keys=True), encoding="utf-8" diff --git a/website/docs/controls/alertdialog.md b/website/docs/controls/alertdialog.md index 97491df20c..6ab8ba267b 100644 --- a/website/docs/controls/alertdialog.md +++ b/website/docs/controls/alertdialog.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Modal and non-modal dialogs - Modal and non-modal dialogs diff --git a/website/docs/controls/animatedswitcher.md b/website/docs/controls/animatedswitcher.md index 3e1680fc4a..e2b873b700 100644 --- a/website/docs/controls/animatedswitcher.md +++ b/website/docs/controls/animatedswitcher.md @@ -11,18 +11,12 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Animated switching between two containers with scale effect - scale-effect -### Animate Image switch - -### Animate Image switch buffered - diff --git a/website/docs/controls/appbar.md b/website/docs/controls/appbar.md index 563dcc14ef..0ca0940ad8 100644 --- a/website/docs/controls/appbar.md +++ b/website/docs/controls/appbar.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Actions and Popup Menu - actions-and-popup-menu -### Theme and Material Mode Toggles - theme-and-material-mode-toggles diff --git a/website/docs/controls/autocomplete.md b/website/docs/controls/autocomplete.md index bbe577c467..f90f788238 100644 --- a/website/docs/controls/autocomplete.md +++ b/website/docs/controls/autocomplete.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### AutoComplete - auto-complete-basic-example diff --git a/website/docs/controls/autofillgroup.md b/website/docs/controls/autofillgroup.md index 2cccc83441..1de1cfa077 100644 --- a/website/docs/controls/autofillgroup.md +++ b/website/docs/controls/autofillgroup.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### AutofillGroup - basic diff --git a/website/docs/controls/banner.md b/website/docs/controls/banner.md index ad24a3175a..a5e67a6039 100644 --- a/website/docs/controls/banner.md +++ b/website/docs/controls/banner.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Banner - basic diff --git a/website/docs/controls/bottomappbar.md b/website/docs/controls/bottomappbar.md index 4a92dc7223..1c748d0e6f 100644 --- a/website/docs/controls/bottomappbar.md +++ b/website/docs/controls/bottomappbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Notched `FloatingActionButton` - -### Custom border radius - diff --git a/website/docs/controls/bottomsheet.md b/website/docs/controls/bottomsheet.md index a8b3d4451d..fbc1f537fd 100644 --- a/website/docs/controls/bottomsheet.md +++ b/website/docs/controls/bottomsheet.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### BottomSheet - -### Fullscreen - diff --git a/website/docs/controls/button.md b/website/docs/controls/button.md index 0fcdc91915..ed05b75ae9 100644 --- a/website/docs/controls/button.md +++ b/website/docs/controls/button.md @@ -11,46 +11,32 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Button - Basic button -### Icons - Basic button -### Handling clicks - Handling clicks -### Custom content - Buttons with custom content -### Shapes - Buttons with different shapes -### Styling - Styled button - default state Styled button - hovered state -### Animate on hover - Unhovered button diff --git a/website/docs/controls/checkbox.md b/website/docs/controls/checkbox.md index 7401b0a76f..a35f7de7d4 100644 --- a/website/docs/controls/checkbox.md +++ b/website/docs/controls/checkbox.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Checkbox - basic -### Handling events - handling-events -### Styled checkboxes - Styled checkboxes diff --git a/website/docs/controls/circleavatar.md b/website/docs/controls/circleavatar.md index 37ba943f9d..7ebaf04842 100644 --- a/website/docs/controls/circleavatar.md +++ b/website/docs/controls/circleavatar.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### User avatars - user-avatars diff --git a/website/docs/controls/column.md b/website/docs/controls/column.md index 46efc639d3..1a8a69d6e7 100644 --- a/website/docs/controls/column.md +++ b/website/docs/controls/column.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Column `spacing` - spacing -### Column wrapping - wrap -### Column vertical alignments - alignment -### Column horizontal alignments - horizontal-alignment diff --git a/website/docs/controls/container.md b/website/docs/controls/container.md index e297fbdb7b..0c3930acbe 100644 --- a/website/docs/controls/container.md +++ b/website/docs/controls/container.md @@ -12,58 +12,38 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Clickable container - -### Handling clicks - -### Handling hovers - -### Animate size and color - -### Animate gradient and shape - -### Animated slide-in menu - -### Nested themes 1 - -### Nested themes 2 - -### Nested themes 3 - -### Size aware - diff --git a/website/docs/controls/contextmenu.md b/website/docs/controls/contextmenu.md index 87f81047a4..bc8336a2c6 100644 --- a/website/docs/controls/contextmenu.md +++ b/website/docs/controls/contextmenu.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Triggers - -### Programmatic open - -### Programmatic open with custom trigger - diff --git a/website/docs/controls/cupertinoactivityindicator.md b/website/docs/controls/cupertinoactivityindicator.md index 80d0e63f6d..ce3b13878a 100644 --- a/website/docs/controls/cupertinoactivityindicator.md +++ b/website/docs/controls/cupertinoactivityindicator.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoActivityIndicator - basic diff --git a/website/docs/controls/cupertinoalertdialog.md b/website/docs/controls/cupertinoalertdialog.md index 53cc3b2ff9..c608d049fa 100644 --- a/website/docs/controls/cupertinoalertdialog.md +++ b/website/docs/controls/cupertinoalertdialog.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### File deletion confirmation - file-deletion-confirmation -### Cupertino, material and adaptive alert dialogs - diff --git a/website/docs/controls/cupertinoappbar.md b/website/docs/controls/cupertinoappbar.md index 77bf20ebae..903319e3a0 100644 --- a/website/docs/controls/cupertinoappbar.md +++ b/website/docs/controls/cupertinoappbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoAppBar - basic -### App bar with theme mode toggle - diff --git a/website/docs/controls/cupertinobottomsheet.md b/website/docs/controls/cupertinobottomsheet.md index 2f7d37b7df..71e963e79f 100644 --- a/website/docs/controls/cupertinobottomsheet.md +++ b/website/docs/controls/cupertinobottomsheet.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Displaying a `CupertinoActionSheet` - cupertinoactionsheet diff --git a/website/docs/controls/cupertinobutton.md b/website/docs/controls/cupertinobutton.md index 4dbe6070f9..763b62c3b8 100644 --- a/website/docs/controls/cupertinobutton.md +++ b/website/docs/controls/cupertinobutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoButton - basic diff --git a/website/docs/controls/cupertinocheckbox.md b/website/docs/controls/cupertinocheckbox.md index 3b64837ab4..eb7c34e9ff 100644 --- a/website/docs/controls/cupertinocheckbox.md +++ b/website/docs/controls/cupertinocheckbox.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Checkboxes - cupertino-material-and-adaptive -### Styled checkboxes - diff --git a/website/docs/controls/cupertinodatepicker.md b/website/docs/controls/cupertinodatepicker.md index f39f5bc223..1bb6dcb4a8 100644 --- a/website/docs/controls/cupertinodatepicker.md +++ b/website/docs/controls/cupertinodatepicker.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoDatePicker - basic diff --git a/website/docs/controls/cupertinofilledbutton.md b/website/docs/controls/cupertinofilledbutton.md index 6681a4013d..ab186de8b5 100644 --- a/website/docs/controls/cupertinofilledbutton.md +++ b/website/docs/controls/cupertinofilledbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoFilledButton - basic diff --git a/website/docs/controls/cupertinolisttile.md b/website/docs/controls/cupertinolisttile.md index d26d2d473f..bc1615d833 100644 --- a/website/docs/controls/cupertinolisttile.md +++ b/website/docs/controls/cupertinolisttile.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Notched and non-notched list tiles - notched diff --git a/website/docs/controls/cupertinonavigationbar.md b/website/docs/controls/cupertinonavigationbar.md index 157fe6ad82..a4a5894e29 100644 --- a/website/docs/controls/cupertinonavigationbar.md +++ b/website/docs/controls/cupertinonavigationbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoNavigationBar - basic -### Wired navigation bar - diff --git a/website/docs/controls/cupertinopicker.md b/website/docs/controls/cupertinopicker.md index a7705eee2e..817533414c 100644 --- a/website/docs/controls/cupertinopicker.md +++ b/website/docs/controls/cupertinopicker.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Fruit selection - fruit-selection diff --git a/website/docs/controls/cupertinoradio.md b/website/docs/controls/cupertinoradio.md index e3c449b883..45a841baf8 100644 --- a/website/docs/controls/cupertinoradio.md +++ b/website/docs/controls/cupertinoradio.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Radios - cupertino-material-and-adaptive diff --git a/website/docs/controls/cupertinosegmentedbutton.md b/website/docs/controls/cupertinosegmentedbutton.md index 6841188b63..5c1e9d574b 100644 --- a/website/docs/controls/cupertinosegmentedbutton.md +++ b/website/docs/controls/cupertinosegmentedbutton.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoSegmentedButton - basic -### Adjusting segments padding - diff --git a/website/docs/controls/cupertinoslider.md b/website/docs/controls/cupertinoslider.md index 1ce4a27bc3..17bcf45e11 100644 --- a/website/docs/controls/cupertinoslider.md +++ b/website/docs/controls/cupertinoslider.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling events - handling-events diff --git a/website/docs/controls/cupertinoslidingsegmentedbutton.md b/website/docs/controls/cupertinoslidingsegmentedbutton.md index 17afec8baa..b5924a255f 100644 --- a/website/docs/controls/cupertinoslidingsegmentedbutton.md +++ b/website/docs/controls/cupertinoslidingsegmentedbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoSlidingSegmentedButton - basic diff --git a/website/docs/controls/cupertinoswitch.md b/website/docs/controls/cupertinoswitch.md index d25225165b..bb13775a69 100644 --- a/website/docs/controls/cupertinoswitch.md +++ b/website/docs/controls/cupertinoswitch.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Switches - cupertino-material-and-adaptive diff --git a/website/docs/controls/cupertinotextfield.md b/website/docs/controls/cupertinotextfield.md index 1a82390a44..34d0a9f151 100644 --- a/website/docs/controls/cupertinotextfield.md +++ b/website/docs/controls/cupertinotextfield.md @@ -12,18 +12,12 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoTextField - cupertino-material-and-adaptive -### Handling selection changes - -### Background image - diff --git a/website/docs/controls/cupertinotimerpicker.md b/website/docs/controls/cupertinotimerpicker.md index 70aa4d097b..00aa001399 100644 --- a/website/docs/controls/cupertinotimerpicker.md +++ b/website/docs/controls/cupertinotimerpicker.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoTimerPicker - basic diff --git a/website/docs/controls/datepicker.md b/website/docs/controls/datepicker.md index a5f3910c60..7b7503e775 100644 --- a/website/docs/controls/datepicker.md +++ b/website/docs/controls/datepicker.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DatePicker - basic -### Custom locale - custom-locale diff --git a/website/docs/controls/daterangepicker.md b/website/docs/controls/daterangepicker.md index b03e51242b..7a67422bc5 100644 --- a/website/docs/controls/daterangepicker.md +++ b/website/docs/controls/daterangepicker.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DateRangePicker - basic -### Custom locale - custom-locale diff --git a/website/docs/controls/dismissible.md b/website/docs/controls/dismissible.md index 21da8a490e..58e3289553 100644 --- a/website/docs/controls/dismissible.md +++ b/website/docs/controls/dismissible.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Dismissible `ListTile`s - dismissible-list-tiles diff --git a/website/docs/controls/divider.md b/website/docs/controls/divider.md index 710b34c366..f5a23b4fdb 100644 --- a/website/docs/controls/divider.md +++ b/website/docs/controls/divider.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Divider - basic diff --git a/website/docs/controls/draggable.md b/website/docs/controls/draggable.md index 588f889cfd..a66f4411d6 100644 --- a/website/docs/controls/draggable.md +++ b/website/docs/controls/draggable.md @@ -13,13 +13,9 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ### Drag and drop Containers -#### Imperative +# - - -#### Declarative - - +# drag-and-drop-containers diff --git a/website/docs/controls/dropdownm2.md b/website/docs/controls/dropdownm2.md index 67d76bdcab..9df8a394f0 100644 --- a/website/docs/controls/dropdownm2.md +++ b/website/docs/controls/dropdownm2.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DropdownM2 - basic -### Dropdown with label and hint - label-and-hint -### Handling events - handling-events -### Add and delete options - add-and-delete-options diff --git a/website/docs/controls/expansionpanellist.md b/website/docs/controls/expansionpanellist.md index c8e8fe7f33..11c45519cd 100644 --- a/website/docs/controls/expansionpanellist.md +++ b/website/docs/controls/expansionpanellist.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ExpansionPanelList - diff --git a/website/docs/controls/expansiontile.md b/website/docs/controls/expansiontile.md index 45c900556a..f5b6f6d463 100644 --- a/website/docs/controls/expansiontile.md +++ b/website/docs/controls/expansiontile.md @@ -11,30 +11,20 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ExpansionTile - -### Programmatic expansion/collapse - -### Custom animations - -### Theme mode toggle - -### Borders - diff --git a/website/docs/controls/filledbutton.md b/website/docs/controls/filledbutton.md index 4a995e017e..2d6eeda835 100644 --- a/website/docs/controls/filledbutton.md +++ b/website/docs/controls/filledbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### FilledButton - basic diff --git a/website/docs/controls/filledtonalbutton.md b/website/docs/controls/filledtonalbutton.md index ed9a2ed08c..6775ace4b6 100644 --- a/website/docs/controls/filledtonalbutton.md +++ b/website/docs/controls/filledtonalbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### FilledTonalButton - basic diff --git a/website/docs/controls/floatingactionbutton.md b/website/docs/controls/floatingactionbutton.md index bcbb35dd82..0be0daf253 100644 --- a/website/docs/controls/floatingactionbutton.md +++ b/website/docs/controls/floatingactionbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling clicks - handling-clicks diff --git a/website/docs/controls/gesturedetector.md b/website/docs/controls/gesturedetector.md index 6c684f7078..c2cce83911 100644 --- a/website/docs/controls/gesturedetector.md +++ b/website/docs/controls/gesturedetector.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen [Solitaire game tutorial](https://flet.dev/docs/tutorials/python-solitaire) -### Handling events - ### Draggable containers @@ -28,12 +26,8 @@ inside another control (yellow container) giving the same results. draggable-containers -### Window drag area - -### Mouse Cursors - diff --git a/website/docs/controls/gridview.md b/website/docs/controls/gridview.md index 2eb36753fa..09fe24f8b3 100644 --- a/website/docs/controls/gridview.md +++ b/website/docs/controls/gridview.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Photo gallery - photo-gallery diff --git a/website/docs/controls/hero.md b/website/docs/controls/hero.md index c6ed2f58b4..6ce29a28fc 100644 --- a/website/docs/controls/hero.md +++ b/website/docs/controls/hero.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Hero - -### Gallery - diff --git a/website/docs/controls/icon.md b/website/docs/controls/icon.md index fe773eefb3..0daa1ff3f5 100644 --- a/website/docs/controls/icon.md +++ b/website/docs/controls/icon.md @@ -15,8 +15,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen To browse and visualize all available icons, visit our [icons browser](https://flet.app/gallery/run/apps/icons_browser/) -### Icon - basic diff --git a/website/docs/controls/iconbutton.md b/website/docs/controls/iconbutton.md index 5361a8f956..05365cb0b6 100644 --- a/website/docs/controls/iconbutton.md +++ b/website/docs/controls/iconbutton.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling clicks - handling-clicks -### Selected icon - selected-icon -### Variants - variants diff --git a/website/docs/controls/image.md b/website/docs/controls/image.md index 7b1431cf11..da8dc8ef08 100644 --- a/website/docs/controls/image.md +++ b/website/docs/controls/image.md @@ -12,30 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Image gallery - -### Fade-in images with a placeholder - -### Displaying images from base64 strings and byte data - -### Displaying a static SVG image - -### Displaying a dynamic SVG image - -### Displaying a Lucide icon - ### Gapless playback when changing image sources diff --git a/website/docs/controls/interactiveviewer.md b/website/docs/controls/interactiveviewer.md index 4bd6431f35..f43542b790 100644 --- a/website/docs/controls/interactiveviewer.md +++ b/website/docs/controls/interactiveviewer.md @@ -10,12 +10,8 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Handling events - -### Programmatic transformations - diff --git a/website/docs/controls/keyboardlistener.md b/website/docs/controls/keyboardlistener.md index c730a871b9..887426b716 100644 --- a/website/docs/controls/keyboardlistener.md +++ b/website/docs/controls/keyboardlistener.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Press any keys - diff --git a/website/docs/controls/layoutcontrol.md b/website/docs/controls/layoutcontrol.md index cbbaef7a97..2dcf853263 100644 --- a/website/docs/controls/layoutcontrol.md +++ b/website/docs/controls/layoutcontrol.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Flip - -### Rotate - @@ -30,20 +26,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Scale - -### Offset - -### Matrix4 Transform - diff --git a/website/docs/controls/listtile.md b/website/docs/controls/listtile.md index 48cef1d00f..aaf7936c8f 100644 --- a/website/docs/controls/listtile.md +++ b/website/docs/controls/listtile.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ListTile - basic diff --git a/website/docs/controls/listview.md b/website/docs/controls/listview.md index 3bcf5d553d..859dc1f9e8 100644 --- a/website/docs/controls/listview.md +++ b/website/docs/controls/listview.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Auto-scrolling and dynamical items addition - autoscroll-and-dynamic-items diff --git a/website/docs/controls/markdown.md b/website/docs/controls/markdown.md index b55155a7c6..78f80c4b68 100644 --- a/website/docs/controls/markdown.md +++ b/website/docs/controls/markdown.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Markdown - basic -### Code syntax highlight - code-syntax-highlight -### Custom text theme - diff --git a/website/docs/controls/menubar.md b/website/docs/controls/menubar.md index cabf8a010a..ccacf51eaa 100644 --- a/website/docs/controls/menubar.md +++ b/website/docs/controls/menubar.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### `MenuBar` with Nested Submenus - diff --git a/website/docs/controls/menuitembutton.md b/website/docs/controls/menuitembutton.md index b9701ab883..ede56de2ec 100644 --- a/website/docs/controls/menuitembutton.md +++ b/website/docs/controls/menuitembutton.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### MenuItemButton - basic diff --git a/website/docs/controls/outlinedbutton.md b/website/docs/controls/outlinedbutton.md index 6922f96596..f4053db6e2 100644 --- a/website/docs/controls/outlinedbutton.md +++ b/website/docs/controls/outlinedbutton.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### OutlinedButton - basic -### Handling clicks - handling-clicks -### Icons - icons -### Custom content - custom-content diff --git a/website/docs/controls/page.md b/website/docs/controls/page.md index 215822b7e0..b3d5a9714b 100644 --- a/website/docs/controls/page.md +++ b/website/docs/controls/page.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Listening to keyboard events - ### Mobile device orientation configuration @@ -22,8 +20,6 @@ Shows how to lock your app to specific device orientations -### App exit confirmation - ### Hidden app window on startup @@ -39,12 +35,8 @@ In the example below, the window is resized and centered before becoming visible If you need this feature when packaging a desktop app using [`flet build`](../cli/flet-build.md), see [this](../publish/index.md#hidden-app-window-on-startup). -### Toggle semantics debugger - -### Get device locales - diff --git a/website/docs/controls/pagelet.md b/website/docs/controls/pagelet.md index eca42ed8bb..67f678ad48 100644 --- a/website/docs/controls/pagelet.md +++ b/website/docs/controls/pagelet.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pagelet - diff --git a/website/docs/controls/pageview.md b/website/docs/controls/pageview.md index a37182a16e..25aceb54d2 100644 --- a/website/docs/controls/pageview.md +++ b/website/docs/controls/pageview.md @@ -10,12 +10,8 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### PageView - -### Programmatic Swipes - diff --git a/website/docs/controls/placeholder.md b/website/docs/controls/placeholder.md index 9947174e93..48c3814c58 100644 --- a/website/docs/controls/placeholder.md +++ b/website/docs/controls/placeholder.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Placeholder - basic diff --git a/website/docs/controls/popupmenubutton.md b/website/docs/controls/popupmenubutton.md index 8477d50fce..53db44678a 100644 --- a/website/docs/controls/popupmenubutton.md +++ b/website/docs/controls/popupmenubutton.md @@ -13,8 +13,6 @@ import {ClassAll, ClassMembers, ClassSummary, CodeExample, Image} from '@site/sr ## Examples -### PopupMenuButton - basic diff --git a/website/docs/controls/progressbar.md b/website/docs/controls/progressbar.md index b710ca8c3f..d86865b590 100644 --- a/website/docs/controls/progressbar.md +++ b/website/docs/controls/progressbar.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Determinate and indeterminate progress bars - determinate-and-indeterminate diff --git a/website/docs/controls/progressring.md b/website/docs/controls/progressring.md index c88f3eae1e..973406924d 100644 --- a/website/docs/controls/progressring.md +++ b/website/docs/controls/progressring.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Determinate and indeterminate progress rings - determinate-and-indeterminate -### Gauge with progress - determinate-and-indeterminate diff --git a/website/docs/controls/radio.md b/website/docs/controls/radio.md index 8a38aff136..3e20ee9ec3 100644 --- a/website/docs/controls/radio.md +++ b/website/docs/controls/radio.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Radio - basic -### Handling selection changes - handling-selection-changes -### Styled radio buttons - styled diff --git a/website/docs/controls/rangeslider.md b/website/docs/controls/rangeslider.md index 6547a30bd3..d80f6d11f7 100644 --- a/website/docs/controls/rangeslider.md +++ b/website/docs/controls/rangeslider.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### RangeSlider - basic -### RangeSlider with events - handling_events diff --git a/website/docs/controls/reorderabledraghandle.md b/website/docs/controls/reorderabledraghandle.md index 11885cb044..ba225d31b8 100644 --- a/website/docs/controls/reorderabledraghandle.md +++ b/website/docs/controls/reorderabledraghandle.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ReorderableDragHandle - basic diff --git a/website/docs/controls/reorderablelistview.md b/website/docs/controls/reorderablelistview.md index 0458b78456..a5c8617859 100644 --- a/website/docs/controls/reorderablelistview.md +++ b/website/docs/controls/reorderablelistview.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Horizontal and Vertical - horizontal-and-vertical diff --git a/website/docs/controls/responsiverow.md b/website/docs/controls/responsiverow.md index 2857c2b6a4..60abcc8f23 100644 --- a/website/docs/controls/responsiverow.md +++ b/website/docs/controls/responsiverow.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ResponsiveRow - -### Custom breakpoints - diff --git a/website/docs/controls/router.md b/website/docs/controls/router.md index 60148d6aab..0096fa43b7 100644 --- a/website/docs/controls/router.md +++ b/website/docs/controls/router.md @@ -15,28 +15,16 @@ Navigation is done via [page.navigate()](../controls/page.md#flet.Page.navigate) ## Examples -### Basic - -### Layout with outlet - -### Dynamic segments - -### Loaders - -### Active links - -### Featured - ### Managed views — nested routes diff --git a/website/docs/controls/row.md b/website/docs/controls/row.md index e6ec3cf7d4..4dacb66953 100644 --- a/website/docs/controls/row.md +++ b/website/docs/controls/row.md @@ -11,26 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Spacing children - spacing -### Wrapping children - wrap -### Setting horizontal alignment - alignment -### Setting vertical alignment - vertical-alignment diff --git a/website/docs/controls/safearea.md b/website/docs/controls/safearea.md index 65c4dea2a7..4912b0e8c8 100644 --- a/website/docs/controls/safearea.md +++ b/website/docs/controls/safearea.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Example -### SafeArea - diff --git a/website/docs/controls/screenshot.md b/website/docs/controls/screenshot.md index 3e0be32a61..0d8736b7b8 100644 --- a/website/docs/controls/screenshot.md +++ b/website/docs/controls/screenshot.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Taking control screenshot - diff --git a/website/docs/controls/searchbar.md b/website/docs/controls/searchbar.md index 11f3a23249..837a522a08 100644 --- a/website/docs/controls/searchbar.md +++ b/website/docs/controls/searchbar.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SearchBar - basic diff --git a/website/docs/controls/selectionarea.md b/website/docs/controls/selectionarea.md index 675f0edbd4..05a596daba 100644 --- a/website/docs/controls/selectionarea.md +++ b/website/docs/controls/selectionarea.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SelectionArea - basic diff --git a/website/docs/controls/semantics.md b/website/docs/controls/semantics.md index 7514ce968a..24df4d934c 100644 --- a/website/docs/controls/semantics.md +++ b/website/docs/controls/semantics.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Semantics - diff --git a/website/docs/controls/shadermask.md b/website/docs/controls/shadermask.md index 490a28da14..d7dc38b2b2 100644 --- a/website/docs/controls/shadermask.md +++ b/website/docs/controls/shadermask.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pink glow around image edges - pink-radial-glow -### Fade out bottom edge of an image - fade-out-image-bottom -### Applying linear and radial gradients/shaders - fade-out-image-bottom diff --git a/website/docs/controls/shimmer.md b/website/docs/controls/shimmer.md index a97f9ec2f0..d08fdadd67 100644 --- a/website/docs/controls/shimmer.md +++ b/website/docs/controls/shimmer.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Basic - custom-label -### Skeleton list placeholders - custom-label -### Custom gradients and directions - custom-label diff --git a/website/docs/controls/slider.md b/website/docs/controls/slider.md index a9758375b9..cdda69ce5d 100644 --- a/website/docs/controls/slider.md +++ b/website/docs/controls/slider.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Slider - basic -### Setting a custom label - custom-label -### Handling events - handling-events -### Random values - random-values diff --git a/website/docs/controls/snackbar.md b/website/docs/controls/snackbar.md index afc9dd0e83..d8fb139886 100644 --- a/website/docs/controls/snackbar.md +++ b/website/docs/controls/snackbar.md @@ -12,20 +12,14 @@ import {ClassAll, ClassMembers, ClassSummary, CodeExample, Image} from '@site/sr ## Examples -### SnackBar - basic -### Counter - Snack bar with counter -### Action - Snack bar with a simple action diff --git a/website/docs/controls/stack.md b/website/docs/controls/stack.md index 1930545977..796f7a8b48 100644 --- a/website/docs/controls/stack.md +++ b/website/docs/controls/stack.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Avatar with online status - online-avatar -### Absolute positioning - absolute-positioning diff --git a/website/docs/controls/submenubutton.md b/website/docs/controls/submenubutton.md index d335ef9928..e754e14f07 100644 --- a/website/docs/controls/submenubutton.md +++ b/website/docs/controls/submenubutton.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SubmenuButton - basic -### Standalone Example - standalone diff --git a/website/docs/controls/switch.md b/website/docs/controls/switch.md index 9d067e8236..99a9993f60 100644 --- a/website/docs/controls/switch.md +++ b/website/docs/controls/switch.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Switch - basic -### Handling change events - handling-events diff --git a/website/docs/controls/text.md b/website/docs/controls/text.md index 4b27fd87d1..246e513592 100644 --- a/website/docs/controls/text.md +++ b/website/docs/controls/text.md @@ -12,38 +12,26 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Custom text styles - -### Pre-defined theme text styles - -### Font with variable weight - -### Basic rich text example - -### Rich text with borders and stroke - -### Rich text with gradient - diff --git a/website/docs/controls/textbutton.md b/website/docs/controls/textbutton.md index 612a2848a4..cc1eb3c84b 100644 --- a/website/docs/controls/textbutton.md +++ b/website/docs/controls/textbutton.md @@ -11,26 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TextButton - basic -### Icons - icons -### Handling clicks - handling-clicks -### Custom content - custom-content diff --git a/website/docs/controls/textfield.md b/website/docs/controls/textfield.md index 52b3d4bb2c..acee47ee4b 100644 --- a/website/docs/controls/textfield.md +++ b/website/docs/controls/textfield.md @@ -12,56 +12,38 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TextField - basic -### Handling change events - handling-change-events -### Handling selection changes - selection-change -### Password with reveal button - password -### Multiline fields - multiline -### Underlined and borderless TextFields - underlined-and-borderless -### Setting prefixes and suffixes - prefix-and-suffix -### Styled TextField - styled -### Custom label, hint, helper, and counter texts and styles - label-hint-helper-counter diff --git a/website/docs/controls/timepicker.md b/website/docs/controls/timepicker.md index a6b714f018..6285e05dc5 100644 --- a/website/docs/controls/timepicker.md +++ b/website/docs/controls/timepicker.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TimePicker - -### Hour Formats - -### Custom Locale - diff --git a/website/docs/controls/verticaldivider.md b/website/docs/controls/verticaldivider.md index a4b63db0b7..17bc5cd2f2 100644 --- a/website/docs/controls/verticaldivider.md +++ b/website/docs/controls/verticaldivider.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### VerticalDivider - basic diff --git a/website/docs/controls/windowdragarea.md b/website/docs/controls/windowdragarea.md index 3d038f87df..d9e2d06c13 100644 --- a/website/docs/controls/windowdragarea.md +++ b/website/docs/controls/windowdragarea.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### No frame window - no-frame-window diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index dfcb1e3010..2b6d53c7ae 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -202,6 +202,7 @@ module.exports = { docs: { // It is recommended to set document id as docs home page (`docs/` path). sidebarPath: require.resolve('./sidebars.js'), + beforeDefaultRemarkPlugins: [require('./plugins/remark-inject-example-headings')], remarkPlugins: [require('./plugins/remark-api-links'), require('./plugins/remark-code-annotations')], editUrl: 'https://github.com/flet-dev/flet/website/edit/main/', diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js new file mode 100644 index 0000000000..787e04eea6 --- /dev/null +++ b/website/plugins/remark-inject-example-headings.js @@ -0,0 +1,62 @@ +/** + * Remark plugin that injects a ### heading before each element, + * sourcing the title from examples-metadata.json (built from pyproject.toml files). + * + * Relies on the MDX file having an `examples` frontmatter field (e.g. + * "controls/material/app_bar") and CodeExample path expressions of the form: + * path={frontMatter.examples + '/subfolder/main.py'} + */ + +const fs = require("fs"); +const path = require("path"); + +const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; + +module.exports = function remarkInjectExampleHeadings() { + const metadataPath = path.join(__dirname, "..", ".crocodocs", "examples-metadata.json"); + let metadata = {}; + if (fs.existsSync(metadataPath)) { + metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8")); + } + + return (tree, file) => { + const examplesPath = file.data?.frontMatter?.examples; + if (!examplesPath) return; + + const insertions = []; + + for (let i = 0; i < tree.children.length; i++) { + const node = tree.children[i]; + if (node.type !== "mdxJsxFlowElement" || node.name !== "CodeExample") continue; + + const pathAttr = node.attributes?.find((a) => a.name === "path"); + if (!pathAttr) continue; + + const attrValue = pathAttr.value; + const exprValue = + attrValue?.type === "mdxJsxAttributeValueExpression" + ? attrValue.value + : typeof attrValue === "string" + ? attrValue + : ""; + + const match = SUBFOLDER_RE.exec(exprValue); + if (!match) continue; + + const title = metadata[`${examplesPath}/${match[1]}`]?.title; + if (!title) continue; + + insertions.push({ index: i, title }); + } + + // Insert in reverse order so earlier indices stay valid + for (let i = insertions.length - 1; i >= 0; i--) { + const { index, title } = insertions[i]; + tree.children.splice(index, 0, { + type: "heading", + depth: 3, + children: [{ type: "text", value: title }], + }); + } + }; +}; From 1a52d279d9399a37729dc31f55a0d29e541ff8f0 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 11:39:55 -0700 Subject: [PATCH 02/35] docs: remove static example headers from subdirectory control docs The previous pass only covered website/docs/controls/*.md; this extends it to subdirectories (ads, colorpickers, camera, etc.) by switching to rglob. Also fixes the script itself to use rglob for future runs. Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/scripts/update_example_headers.py | 2 +- website/docs/controls/ads/bannerad.md | 2 -- website/docs/controls/ads/interstitialad.md | 2 -- website/docs/controls/canvas/index.md | 14 -------------- website/docs/controls/charts/barchart.md | 4 ---- website/docs/controls/charts/candlestickchart.md | 2 -- website/docs/controls/charts/linechart.md | 4 ---- .../controls/charts/matplotlibchartwithtoolbar.md | 6 ------ website/docs/controls/charts/piechart.md | 6 ------ website/docs/controls/charts/radarchart.md | 2 -- website/docs/controls/charts/scatterchart.md | 2 -- website/docs/controls/codeeditor/index.md | 4 ---- .../docs/controls/cupertinoactionsheet/index.md | 2 -- .../docs/controls/cupertinocontextmenu/index.md | 2 -- website/docs/controls/datatable/index.md | 4 ---- website/docs/controls/datatable2/index.md | 6 ------ website/docs/controls/dropdown/index.md | 10 ---------- website/docs/controls/map/index.md | 14 -------------- website/docs/controls/map/overlayimage.md | 2 -- website/docs/controls/map/overlayimagelayer.md | 2 -- website/docs/controls/map/rotatedoverlayimage.md | 2 -- website/docs/controls/navigationbar/index.md | 2 -- website/docs/controls/navigationdrawer/index.md | 6 ------ website/docs/controls/navigationrail/index.md | 2 -- website/docs/controls/segmentedbutton/index.md | 2 -- website/docs/controls/tabs/index.md | 10 ---------- website/docs/controls/video/index.md | 2 -- 27 files changed, 1 insertion(+), 117 deletions(-) diff --git a/sdk/python/scripts/update_example_headers.py b/sdk/python/scripts/update_example_headers.py index 4488d850b8..3db889171c 100644 --- a/sdk/python/scripts/update_example_headers.py +++ b/sdk/python/scripts/update_example_headers.py @@ -28,7 +28,7 @@ def process_file(md_file: Path) -> bool: def main() -> None: changed = 0 - for md_file in sorted(DOCS_DIR.glob("*.md")): + for md_file in sorted(DOCS_DIR.rglob("*.md")): if process_file(md_file): changed += 1 print(f"Updated {changed} files.") diff --git a/website/docs/controls/ads/bannerad.md b/website/docs/controls/ads/bannerad.md index d91c3b16d3..68e5fc3636 100644 --- a/website/docs/controls/ads/bannerad.md +++ b/website/docs/controls/ads/bannerad.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Example 1 - diff --git a/website/docs/controls/ads/interstitialad.md b/website/docs/controls/ads/interstitialad.md index 8e559976a9..d23579e260 100644 --- a/website/docs/controls/ads/interstitialad.md +++ b/website/docs/controls/ads/interstitialad.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Example 1 - diff --git a/website/docs/controls/canvas/index.md b/website/docs/controls/canvas/index.md index bc0498fb0b..48f5ec944c 100644 --- a/website/docs/controls/canvas/index.md +++ b/website/docs/controls/canvas/index.md @@ -14,42 +14,28 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Smiling face - smiling-face -### Flet logo - flet-logo -### Triangles - triangles -### Bezier curves - bezier-curves -### Text - text -### Free-hand drawing with image capture - -### Gradients - diff --git a/website/docs/controls/charts/barchart.md b/website/docs/controls/charts/barchart.md index 9888921ea0..777dc44d0a 100644 --- a/website/docs/controls/charts/barchart.md +++ b/website/docs/controls/charts/barchart.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Interactive bar chart - -### Bar chart with hover - diff --git a/website/docs/controls/charts/candlestickchart.md b/website/docs/controls/charts/candlestickchart.md index 0e342874f6..134dd928bf 100644 --- a/website/docs/controls/charts/candlestickchart.md +++ b/website/docs/controls/charts/candlestickchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Candlestick chart - diff --git a/website/docs/controls/charts/linechart.md b/website/docs/controls/charts/linechart.md index fb71caf3f6..c706f258e0 100644 --- a/website/docs/controls/charts/linechart.md +++ b/website/docs/controls/charts/linechart.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Multi-series line chart - -### Line chart with custom axes - diff --git a/website/docs/controls/charts/matplotlibchartwithtoolbar.md b/website/docs/controls/charts/matplotlibchartwithtoolbar.md index 41728d9833..25ac53ed6f 100644 --- a/website/docs/controls/charts/matplotlibchartwithtoolbar.md +++ b/website/docs/controls/charts/matplotlibchartwithtoolbar.md @@ -20,20 +20,14 @@ Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/ -### 3D chart - -### Handle events - -### Animated chart - diff --git a/website/docs/controls/charts/piechart.md b/website/docs/controls/charts/piechart.md index c538bcf0de..e2ac8b7f1f 100644 --- a/website/docs/controls/charts/piechart.md +++ b/website/docs/controls/charts/piechart.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pie chart with hover borders - -### Pie chart with hover sections - -### Pie chart with icon badges - diff --git a/website/docs/controls/charts/radarchart.md b/website/docs/controls/charts/radarchart.md index d5a3b81ce4..0ab6740c29 100644 --- a/website/docs/controls/charts/radarchart.md +++ b/website/docs/controls/charts/radarchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Radar chart - diff --git a/website/docs/controls/charts/scatterchart.md b/website/docs/controls/charts/scatterchart.md index 76005d3245..9c42c9838d 100644 --- a/website/docs/controls/charts/scatterchart.md +++ b/website/docs/controls/charts/scatterchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Scatter chart - diff --git a/website/docs/controls/codeeditor/index.md b/website/docs/controls/codeeditor/index.md index 53cc0e8714..e3758405c2 100644 --- a/website/docs/controls/codeeditor/index.md +++ b/website/docs/controls/codeeditor/index.md @@ -37,14 +37,10 @@ pip install flet-code-editor # (1)! code-editor-example-1 -### Selection handling - code-editor-example-2 -### Folding and initial selection - code-editor-example-3 diff --git a/website/docs/controls/cupertinoactionsheet/index.md b/website/docs/controls/cupertinoactionsheet/index.md index 291da1f306..72b354aadb 100644 --- a/website/docs/controls/cupertinoactionsheet/index.md +++ b/website/docs/controls/cupertinoactionsheet/index.md @@ -14,8 +14,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoActionSheet - basic diff --git a/website/docs/controls/cupertinocontextmenu/index.md b/website/docs/controls/cupertinocontextmenu/index.md index ae0c9a6790..db22f26b2c 100644 --- a/website/docs/controls/cupertinocontextmenu/index.md +++ b/website/docs/controls/cupertinocontextmenu/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoContextMenu - basic diff --git a/website/docs/controls/datatable/index.md b/website/docs/controls/datatable/index.md index 7b0241db26..6df17c3c33 100644 --- a/website/docs/controls/datatable/index.md +++ b/website/docs/controls/datatable/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DataTable - @@ -48,8 +46,6 @@ sortable string and numeric columns, and stable selection across sorts and refre -### Handling events - diff --git a/website/docs/controls/datatable2/index.md b/website/docs/controls/datatable2/index.md index 01f777461e..cad4fa73c9 100644 --- a/website/docs/controls/datatable2/index.md +++ b/website/docs/controls/datatable2/index.md @@ -43,20 +43,14 @@ pip install flet-datatable2 # (1)! ## Examples -### Empty state - -### Sortable and selectable - -### Column widths - diff --git a/website/docs/controls/dropdown/index.md b/website/docs/controls/dropdown/index.md index 2d19583db2..9efb68ecec 100644 --- a/website/docs/controls/dropdown/index.md +++ b/website/docs/controls/dropdown/index.md @@ -13,32 +13,22 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Color selection with filtering - color-selection-with-filtering -### Icon selection - icon-selection -### Declarative dropdown - declarative-dropdown -### Select and change events - select-and-change-events -### Styled dropdowns - styled-dropdowns diff --git a/website/docs/controls/map/index.md b/website/docs/controls/map/index.md index 30440ae55e..ee2ec2ae92 100644 --- a/website/docs/controls/map/index.md +++ b/website/docs/controls/map/index.md @@ -45,32 +45,18 @@ More details [here](tilelayer.md). ## Examples -### Basic - -### Attributions - -### Camera Controls - -### Idle Camera - -### Interaction Flags - -### Multiple Layers - -### Overlay Images - ## Reference diff --git a/website/docs/controls/map/overlayimage.md b/website/docs/controls/map/overlayimage.md index 99a910c326..48ad52af5e 100644 --- a/website/docs/controls/map/overlayimage.md +++ b/website/docs/controls/map/overlayimage.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### OverlayImage - diff --git a/website/docs/controls/map/overlayimagelayer.md b/website/docs/controls/map/overlayimagelayer.md index c208176269..78d1d849f5 100644 --- a/website/docs/controls/map/overlayimagelayer.md +++ b/website/docs/controls/map/overlayimagelayer.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### OverlayImageLayer - diff --git a/website/docs/controls/map/rotatedoverlayimage.md b/website/docs/controls/map/rotatedoverlayimage.md index d12eb4e3c7..46f54bf8cc 100644 --- a/website/docs/controls/map/rotatedoverlayimage.md +++ b/website/docs/controls/map/rotatedoverlayimage.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### RotatedOverlayImage - diff --git a/website/docs/controls/navigationbar/index.md b/website/docs/controls/navigationbar/index.md index c022067060..3d06d89b24 100644 --- a/website/docs/controls/navigationbar/index.md +++ b/website/docs/controls/navigationbar/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### NavigationBar - basic diff --git a/website/docs/controls/navigationdrawer/index.md b/website/docs/controls/navigationdrawer/index.md index fa6560d339..5f0f09aa80 100644 --- a/website/docs/controls/navigationdrawer/index.md +++ b/website/docs/controls/navigationdrawer/index.md @@ -13,20 +13,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Start-aligned drawer - Start-aligned navigation drawer example -### End-aligned drawer - End-aligned navigation drawer example -### Theming - Themed navigation drawer example diff --git a/website/docs/controls/navigationrail/index.md b/website/docs/controls/navigationrail/index.md index 7c1a6a53d1..04048596b1 100644 --- a/website/docs/controls/navigationrail/index.md +++ b/website/docs/controls/navigationrail/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### NavigationRail - basic diff --git a/website/docs/controls/segmentedbutton/index.md b/website/docs/controls/segmentedbutton/index.md index d89f604260..75d8cf92e7 100644 --- a/website/docs/controls/segmentedbutton/index.md +++ b/website/docs/controls/segmentedbutton/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SegmentedButton - diff --git a/website/docs/controls/tabs/index.md b/website/docs/controls/tabs/index.md index 25a0ceabdf..1e9151e847 100644 --- a/website/docs/controls/tabs/index.md +++ b/website/docs/controls/tabs/index.md @@ -14,26 +14,16 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Tabs - -### Nesting tabs - -### Dynamic tab addition - -### Custom indicator - -### Programmatical Tab switch - diff --git a/website/docs/controls/video/index.md b/website/docs/controls/video/index.md index 78f8977bba..26b18dd985 100644 --- a/website/docs/controls/video/index.md +++ b/website/docs/controls/video/index.md @@ -97,8 +97,6 @@ sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so /usr/lib/libmpv.so.1 ## Examples -### Video - ### Playback From 03300f2156c3db4b16f1bf0200ec37174815dec3 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 11:43:17 -0700 Subject: [PATCH 03/35] docs: remove static example headers from types/ and services/ docs Extends the scan from website/docs/controls/ to all of website/docs/ so types/, services/, tutorials/, and cookbook/ are covered too. Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/scripts/update_example_headers.py | 2 +- website/docs/services/audio/index.md | 2 -- website/docs/services/audiorecorder/index.md | 2 -- website/docs/services/clipboard.md | 6 ------ website/docs/services/filepicker.md | 2 -- website/docs/services/hapticfeedback.md | 2 -- website/docs/services/semanticsservice.md | 2 -- website/docs/services/shakedetector.md | 2 -- website/docs/services/sharedpreferences.md | 2 -- website/docs/services/storagepaths.md | 2 -- website/docs/services/urllauncher.md | 2 -- website/docs/types/alignment.md | 2 -- website/docs/types/animatedswitchertransition.md | 2 -- website/docs/types/animationcurve.md | 2 -- website/docs/types/applifecyclestate.md | 2 -- website/docs/types/assertiveness.md | 2 -- website/docs/types/axis.md | 2 -- website/docs/types/badge.md | 2 -- website/docs/types/blendmode.md | 2 -- website/docs/types/blurstyle.md | 2 -- website/docs/types/blurtilemode.md | 2 -- website/docs/types/bordersidestrokealign.md | 2 -- website/docs/types/borderstyle.md | 2 -- website/docs/types/boxfit.md | 2 -- website/docs/types/boxshape.md | 2 -- website/docs/types/cardvariant.md | 2 -- website/docs/types/clipbehavior.md | 2 -- website/docs/types/contextmenutrigger.md | 2 -- website/docs/types/crossaxisalignment.md | 2 -- website/docs/types/cupertinobuttonsize.md | 2 -- website/docs/types/cupertinodatepickerdateorder.md | 2 -- website/docs/types/cupertinodatepickermode.md | 2 -- website/docs/types/cupertinotimerpickermode.md | 2 -- website/docs/types/datepickerentrymode.md | 2 -- website/docs/types/datepickermode.md | 2 -- website/docs/types/dismissdirection.md | 2 -- website/docs/types/filterquality.md | 2 -- website/docs/types/floatingactionbuttonlocation.md | 2 -- website/docs/types/fontweight.md | 2 -- website/docs/types/gradienttilemode.md | 2 -- website/docs/types/imagerepeat.md | 2 -- website/docs/types/labelposition.md | 2 -- website/docs/types/launchmode.md | 2 -- website/docs/types/listtilestyle.md | 2 -- website/docs/types/listtiletitlealignment.md | 2 -- website/docs/types/mainaxisalignment.md | 2 -- website/docs/types/mousecursor.md | 2 -- website/docs/types/navigationbarlabelbehavior.md | 2 -- website/docs/types/navigationraillabeltype.md | 2 -- website/docs/types/orientation.md | 2 -- website/docs/types/overlayvisibilitymode.md | 2 -- website/docs/types/paintingstyle.md | 2 -- website/docs/types/pointmode.md | 2 -- website/docs/types/popupmenuposition.md | 2 -- website/docs/types/scrollbar.md | 2 -- website/docs/types/scrollbarorientation.md | 2 -- website/docs/types/scrolldirection.md | 2 -- website/docs/types/scrollmode.md | 2 -- website/docs/types/scrolltype.md | 2 -- website/docs/types/sliderinteraction.md | 2 -- website/docs/types/snackbarbehavior.md | 2 -- website/docs/types/strokecap.md | 2 -- website/docs/types/strokejoin.md | 2 -- website/docs/types/tabalignment.md | 2 -- website/docs/types/tabbarindicatorsize.md | 2 -- website/docs/types/tabindicatoranimation.md | 2 -- website/docs/types/textalign.md | 2 -- website/docs/types/textcapitalization.md | 2 -- website/docs/types/textdecorationstyle.md | 2 -- website/docs/types/textoverflow.md | 2 -- website/docs/types/thememode.md | 2 -- website/docs/types/tileaffinity.md | 2 -- website/docs/types/timepickerentrymode.md | 2 -- website/docs/types/timepickerhourformat.md | 2 -- website/docs/types/urltarget.md | 2 -- website/docs/types/visualdensity.md | 2 -- website/docs/types/windoweventtype.md | 2 -- 77 files changed, 1 insertion(+), 157 deletions(-) diff --git a/sdk/python/scripts/update_example_headers.py b/sdk/python/scripts/update_example_headers.py index 3db889171c..daedd115cf 100644 --- a/sdk/python/scripts/update_example_headers.py +++ b/sdk/python/scripts/update_example_headers.py @@ -8,7 +8,7 @@ import re from pathlib import Path -DOCS_DIR = Path(__file__).parent.parent.parent.parent / "website/docs/controls" +DOCS_DIR = Path(__file__).parent.parent.parent.parent / "website/docs" # Matches: ### Header\n\n ## Description diff --git a/website/docs/services/audiorecorder/index.md b/website/docs/services/audiorecorder/index.md index 1426c9105e..a3167aa4ac 100644 --- a/website/docs/services/audiorecorder/index.md +++ b/website/docs/services/audiorecorder/index.md @@ -162,8 +162,6 @@ permissions = ["microphone"] ## Examples -### Basic recording - ### Stream chunks and save/download \{#stream-chunks-and-save-download} diff --git a/website/docs/services/clipboard.md b/website/docs/services/clipboard.md index 0cb0cd244c..78e244d84c 100644 --- a/website/docs/services/clipboard.md +++ b/website/docs/services/clipboard.md @@ -10,16 +10,10 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Text - -### Images - -### Files - diff --git a/website/docs/services/filepicker.md b/website/docs/services/filepicker.md index b5a67f0350..6173d86765 100644 --- a/website/docs/services/filepicker.md +++ b/website/docs/services/filepicker.md @@ -86,8 +86,6 @@ ft.Image(src="/uploads/") ## Examples -### Pick, save, and get directory paths - diff --git a/website/docs/services/hapticfeedback.md b/website/docs/services/hapticfeedback.md index 7a226dd05a..ebf93fed24 100644 --- a/website/docs/services/hapticfeedback.md +++ b/website/docs/services/hapticfeedback.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Haptic feedback - diff --git a/website/docs/services/semanticsservice.md b/website/docs/services/semanticsservice.md index 8bc11eec02..02825d344a 100644 --- a/website/docs/services/semanticsservice.md +++ b/website/docs/services/semanticsservice.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Retrieve accessibility features - diff --git a/website/docs/services/shakedetector.md b/website/docs/services/shakedetector.md index 23f482e9ec..3ee376e267 100644 --- a/website/docs/services/shakedetector.md +++ b/website/docs/services/shakedetector.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### ShakeDetector - diff --git a/website/docs/services/sharedpreferences.md b/website/docs/services/sharedpreferences.md index 53803b7f9a..f4123db8f0 100644 --- a/website/docs/services/sharedpreferences.md +++ b/website/docs/services/sharedpreferences.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Shared preferences - diff --git a/website/docs/services/storagepaths.md b/website/docs/services/storagepaths.md index 2aecaf2811..70d5c3b508 100644 --- a/website/docs/services/storagepaths.md +++ b/website/docs/services/storagepaths.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Storage paths - diff --git a/website/docs/services/urllauncher.md b/website/docs/services/urllauncher.md index bfa6ab6364..a89313e4b4 100644 --- a/website/docs/services/urllauncher.md +++ b/website/docs/services/urllauncher.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### URL launcher - diff --git a/website/docs/types/alignment.md b/website/docs/types/alignment.md index a6163ea06f..39003c41f3 100644 --- a/website/docs/types/alignment.md +++ b/website/docs/types/alignment.md @@ -10,8 +10,6 @@ import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -### Example 1 - diff --git a/website/docs/types/animatedswitchertransition.md b/website/docs/types/animatedswitchertransition.md index bfd9a8094b..3add4a1fb1 100644 --- a/website/docs/types/animatedswitchertransition.md +++ b/website/docs/types/animatedswitchertransition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/animationcurve.md b/website/docs/types/animationcurve.md index 80ce999868..f238518452 100644 --- a/website/docs/types/animationcurve.md +++ b/website/docs/types/animationcurve.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/applifecyclestate.md b/website/docs/types/applifecyclestate.md index 556ab0dab6..a28c868994 100644 --- a/website/docs/types/applifecyclestate.md +++ b/website/docs/types/applifecyclestate.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/assertiveness.md b/website/docs/types/assertiveness.md index c72d579069..62f4780972 100644 --- a/website/docs/types/assertiveness.md +++ b/website/docs/types/assertiveness.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/axis.md b/website/docs/types/axis.md index a65783f2c3..84b3b56cdc 100644 --- a/website/docs/types/axis.md +++ b/website/docs/types/axis.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/badge.md b/website/docs/types/badge.md index f75ac87ac8..02f56ba6f3 100644 --- a/website/docs/types/badge.md +++ b/website/docs/types/badge.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Badge decorating an icon on a NavigationBar - diff --git a/website/docs/types/blendmode.md b/website/docs/types/blendmode.md index 3cd941464e..b7da5e527f 100644 --- a/website/docs/types/blendmode.md +++ b/website/docs/types/blendmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/blurstyle.md b/website/docs/types/blurstyle.md index 60f7a7cd6b..2b87ac0af7 100644 --- a/website/docs/types/blurstyle.md +++ b/website/docs/types/blurstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/blurtilemode.md b/website/docs/types/blurtilemode.md index d912193195..09f3813515 100644 --- a/website/docs/types/blurtilemode.md +++ b/website/docs/types/blurtilemode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/bordersidestrokealign.md b/website/docs/types/bordersidestrokealign.md index 4db62b4a42..84c8844cba 100644 --- a/website/docs/types/bordersidestrokealign.md +++ b/website/docs/types/bordersidestrokealign.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/borderstyle.md b/website/docs/types/borderstyle.md index 7014a35447..66213ed0c3 100644 --- a/website/docs/types/borderstyle.md +++ b/website/docs/types/borderstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/boxfit.md b/website/docs/types/boxfit.md index d706d7e008..6005f160b8 100644 --- a/website/docs/types/boxfit.md +++ b/website/docs/types/boxfit.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/boxshape.md b/website/docs/types/boxshape.md index b7c58940ea..1a42c32eec 100644 --- a/website/docs/types/boxshape.md +++ b/website/docs/types/boxshape.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cardvariant.md b/website/docs/types/cardvariant.md index 9ed6f37eec..dea631c491 100644 --- a/website/docs/types/cardvariant.md +++ b/website/docs/types/cardvariant.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/clipbehavior.md b/website/docs/types/clipbehavior.md index 87f8deec34..cfa747de61 100644 --- a/website/docs/types/clipbehavior.md +++ b/website/docs/types/clipbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/contextmenutrigger.md b/website/docs/types/contextmenutrigger.md index 9c21a6dea7..2f8e6b5046 100644 --- a/website/docs/types/contextmenutrigger.md +++ b/website/docs/types/contextmenutrigger.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/crossaxisalignment.md b/website/docs/types/crossaxisalignment.md index d37c4e03ac..8c150b3c92 100644 --- a/website/docs/types/crossaxisalignment.md +++ b/website/docs/types/crossaxisalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinobuttonsize.md b/website/docs/types/cupertinobuttonsize.md index c03b70e5fd..09bcb33562 100644 --- a/website/docs/types/cupertinobuttonsize.md +++ b/website/docs/types/cupertinobuttonsize.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinodatepickerdateorder.md b/website/docs/types/cupertinodatepickerdateorder.md index 5dd29f6592..9291504bff 100644 --- a/website/docs/types/cupertinodatepickerdateorder.md +++ b/website/docs/types/cupertinodatepickerdateorder.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinodatepickermode.md b/website/docs/types/cupertinodatepickermode.md index 9c9952860a..ee02c7961c 100644 --- a/website/docs/types/cupertinodatepickermode.md +++ b/website/docs/types/cupertinodatepickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinotimerpickermode.md b/website/docs/types/cupertinotimerpickermode.md index d43dfbb406..a1ad7caac8 100644 --- a/website/docs/types/cupertinotimerpickermode.md +++ b/website/docs/types/cupertinotimerpickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/datepickerentrymode.md b/website/docs/types/datepickerentrymode.md index 7ca12bf60e..d20983ea87 100644 --- a/website/docs/types/datepickerentrymode.md +++ b/website/docs/types/datepickerentrymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/datepickermode.md b/website/docs/types/datepickermode.md index 67b681826d..1d32e82c2d 100644 --- a/website/docs/types/datepickermode.md +++ b/website/docs/types/datepickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/dismissdirection.md b/website/docs/types/dismissdirection.md index 8e769363e5..1ea6420893 100644 --- a/website/docs/types/dismissdirection.md +++ b/website/docs/types/dismissdirection.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/filterquality.md b/website/docs/types/filterquality.md index 8faf828b7d..9ca9d32e09 100644 --- a/website/docs/types/filterquality.md +++ b/website/docs/types/filterquality.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/floatingactionbuttonlocation.md b/website/docs/types/floatingactionbuttonlocation.md index 65e9219167..0526471ecf 100644 --- a/website/docs/types/floatingactionbuttonlocation.md +++ b/website/docs/types/floatingactionbuttonlocation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/fontweight.md b/website/docs/types/fontweight.md index 00de084014..0231498238 100644 --- a/website/docs/types/fontweight.md +++ b/website/docs/types/fontweight.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/gradienttilemode.md b/website/docs/types/gradienttilemode.md index 4c81a73c45..48b41d702d 100644 --- a/website/docs/types/gradienttilemode.md +++ b/website/docs/types/gradienttilemode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/imagerepeat.md b/website/docs/types/imagerepeat.md index 03dd068450..2d6cf1ea07 100644 --- a/website/docs/types/imagerepeat.md +++ b/website/docs/types/imagerepeat.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/labelposition.md b/website/docs/types/labelposition.md index 9164915cc0..622c48b6cf 100644 --- a/website/docs/types/labelposition.md +++ b/website/docs/types/labelposition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/launchmode.md b/website/docs/types/launchmode.md index acc76a0c2e..dead7c0376 100644 --- a/website/docs/types/launchmode.md +++ b/website/docs/types/launchmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/listtilestyle.md b/website/docs/types/listtilestyle.md index c69bdd3bd4..bdfa7a4edb 100644 --- a/website/docs/types/listtilestyle.md +++ b/website/docs/types/listtilestyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/listtiletitlealignment.md b/website/docs/types/listtiletitlealignment.md index f29883675b..6e62963f2d 100644 --- a/website/docs/types/listtiletitlealignment.md +++ b/website/docs/types/listtiletitlealignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/mainaxisalignment.md b/website/docs/types/mainaxisalignment.md index fdb4ec6745..25051f18ba 100644 --- a/website/docs/types/mainaxisalignment.md +++ b/website/docs/types/mainaxisalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/mousecursor.md b/website/docs/types/mousecursor.md index 8b4140766e..25d6632db0 100644 --- a/website/docs/types/mousecursor.md +++ b/website/docs/types/mousecursor.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/navigationbarlabelbehavior.md b/website/docs/types/navigationbarlabelbehavior.md index a6d7eb9b48..336497c536 100644 --- a/website/docs/types/navigationbarlabelbehavior.md +++ b/website/docs/types/navigationbarlabelbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/navigationraillabeltype.md b/website/docs/types/navigationraillabeltype.md index 1f70d7edef..32839e75f3 100644 --- a/website/docs/types/navigationraillabeltype.md +++ b/website/docs/types/navigationraillabeltype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/orientation.md b/website/docs/types/orientation.md index eae6e622e9..aa15195bbb 100644 --- a/website/docs/types/orientation.md +++ b/website/docs/types/orientation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/overlayvisibilitymode.md b/website/docs/types/overlayvisibilitymode.md index 6a93296f90..0c1d7bec97 100644 --- a/website/docs/types/overlayvisibilitymode.md +++ b/website/docs/types/overlayvisibilitymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/paintingstyle.md b/website/docs/types/paintingstyle.md index b734d7b80d..fa73094528 100644 --- a/website/docs/types/paintingstyle.md +++ b/website/docs/types/paintingstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/pointmode.md b/website/docs/types/pointmode.md index 89a4342545..143537b569 100644 --- a/website/docs/types/pointmode.md +++ b/website/docs/types/pointmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/popupmenuposition.md b/website/docs/types/popupmenuposition.md index 3192f9ab3f..36adc3f300 100644 --- a/website/docs/types/popupmenuposition.md +++ b/website/docs/types/popupmenuposition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollbar.md b/website/docs/types/scrollbar.md index 7f12e234a4..e6c57b204a 100644 --- a/website/docs/types/scrollbar.md +++ b/website/docs/types/scrollbar.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollbarorientation.md b/website/docs/types/scrollbarorientation.md index 99da18d614..895e826d2c 100644 --- a/website/docs/types/scrollbarorientation.md +++ b/website/docs/types/scrollbarorientation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrolldirection.md b/website/docs/types/scrolldirection.md index acaacd2f5f..8496ee6d2e 100644 --- a/website/docs/types/scrolldirection.md +++ b/website/docs/types/scrolldirection.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollmode.md b/website/docs/types/scrollmode.md index a5c63b05f3..271a9d0b83 100644 --- a/website/docs/types/scrollmode.md +++ b/website/docs/types/scrollmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrolltype.md b/website/docs/types/scrolltype.md index acc9053604..c3892b7615 100644 --- a/website/docs/types/scrolltype.md +++ b/website/docs/types/scrolltype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/sliderinteraction.md b/website/docs/types/sliderinteraction.md index 62f3a0f0f6..e3a97d817a 100644 --- a/website/docs/types/sliderinteraction.md +++ b/website/docs/types/sliderinteraction.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/snackbarbehavior.md b/website/docs/types/snackbarbehavior.md index 06e0193610..a4e2ee94d9 100644 --- a/website/docs/types/snackbarbehavior.md +++ b/website/docs/types/snackbarbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/strokecap.md b/website/docs/types/strokecap.md index 54314a27d0..aeddcc81c7 100644 --- a/website/docs/types/strokecap.md +++ b/website/docs/types/strokecap.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/strokejoin.md b/website/docs/types/strokejoin.md index bb68bd89a8..d7de1e8763 100644 --- a/website/docs/types/strokejoin.md +++ b/website/docs/types/strokejoin.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabalignment.md b/website/docs/types/tabalignment.md index 27984940cc..ceb7717e53 100644 --- a/website/docs/types/tabalignment.md +++ b/website/docs/types/tabalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabbarindicatorsize.md b/website/docs/types/tabbarindicatorsize.md index d0b856cc46..2008ea9e1f 100644 --- a/website/docs/types/tabbarindicatorsize.md +++ b/website/docs/types/tabbarindicatorsize.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabindicatoranimation.md b/website/docs/types/tabindicatoranimation.md index 4d5f4ffe29..b519c1a31b 100644 --- a/website/docs/types/tabindicatoranimation.md +++ b/website/docs/types/tabindicatoranimation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textalign.md b/website/docs/types/textalign.md index 4a6ea28135..067dceed2e 100644 --- a/website/docs/types/textalign.md +++ b/website/docs/types/textalign.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textcapitalization.md b/website/docs/types/textcapitalization.md index bb3952ea4a..ee41894281 100644 --- a/website/docs/types/textcapitalization.md +++ b/website/docs/types/textcapitalization.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textdecorationstyle.md b/website/docs/types/textdecorationstyle.md index f841742a3f..4c02b2ee79 100644 --- a/website/docs/types/textdecorationstyle.md +++ b/website/docs/types/textdecorationstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textoverflow.md b/website/docs/types/textoverflow.md index a964438fda..37acc02f44 100644 --- a/website/docs/types/textoverflow.md +++ b/website/docs/types/textoverflow.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/thememode.md b/website/docs/types/thememode.md index 13b124684b..30bade78fd 100644 --- a/website/docs/types/thememode.md +++ b/website/docs/types/thememode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tileaffinity.md b/website/docs/types/tileaffinity.md index 31a30cd368..1e0740b1af 100644 --- a/website/docs/types/tileaffinity.md +++ b/website/docs/types/tileaffinity.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/timepickerentrymode.md b/website/docs/types/timepickerentrymode.md index 1ba7a45b6e..ac8a363369 100644 --- a/website/docs/types/timepickerentrymode.md +++ b/website/docs/types/timepickerentrymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/timepickerhourformat.md b/website/docs/types/timepickerhourformat.md index 04c4058bfd..ba0d25e6f8 100644 --- a/website/docs/types/timepickerhourformat.md +++ b/website/docs/types/timepickerhourformat.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/urltarget.md b/website/docs/types/urltarget.md index 2aa2c12d24..a0ee30529f 100644 --- a/website/docs/types/urltarget.md +++ b/website/docs/types/urltarget.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/visualdensity.md b/website/docs/types/visualdensity.md index c6ae826f7c..db797d8ae8 100644 --- a/website/docs/types/visualdensity.md +++ b/website/docs/types/visualdensity.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/windoweventtype.md b/website/docs/types/windoweventtype.md index 79d6f2d656..ca22581cd3 100644 --- a/website/docs/types/windoweventtype.md +++ b/website/docs/types/windoweventtype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - From b3211fef46b6f64ef06291af8db239ce952d6fef Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 11:52:26 -0700 Subject: [PATCH 04/35] docs: inject example descriptions from pyproject.toml, fix duplicate chart headings Add [tool.flet.metadata].description to 6 chart examples (matplotlib bar chart, toolbar, plotly line/bar/pie/box). The remark plugin now injects a description paragraph after the heading when the metadata has one. Static ### headers and description paragraphs removed from matplotlibchart.md, matplotlibchartwithtoolbar.md, and plotlychart.md so they no longer duplicate the injected content. Co-Authored-By: Claude Sonnet 4.6 --- .../matplotlib_chart/bar_chart/pyproject.toml | 1 + .../matplotlib_chart/toolbar/pyproject.toml | 1 + .../plotly_chart/example_1/pyproject.toml | 1 + .../plotly_chart/example_2/pyproject.toml | 1 + .../plotly_chart/example_3/pyproject.toml | 1 + .../plotly_chart/example_4/pyproject.toml | 1 + tools/crocodocs/src/crocodocs/generate.py | 6 ++-- .../docs/controls/charts/matplotlibchart.md | 4 --- .../charts/matplotlibchartwithtoolbar.md | 4 --- website/docs/controls/charts/plotlychart.md | 16 --------- .../plugins/remark-inject-example-headings.js | 36 +++++++++++++++---- 11 files changed, 39 insertions(+), 33 deletions(-) diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml index e926721e7c..ede04f834a 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Bar Chart" +description = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml index d2ba114e9e..412e0247ea 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Toolbar" +description = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml index 2806044857..327daeeceb 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly line chart" +description = "Based on an official [Plotly example](https://plotly.com/python/line-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml index 6d3a8110a5..104da8b0be 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly bar chart" +description = "Based on an official [Plotly example](https://plotly.com/python/bar-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml index d25200d0f5..1b52df19df 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly pie chart" +description = "Based on an official [Plotly example](https://plotly.com/python/pie-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml index c9de9a7ed4..c1759d82f6 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly box plot" +description = "Based on an official [Plotly example](https://plotly.com/python/box-plots)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index e4928014ff..dc13346d22 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -189,9 +189,11 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: relative = example_dir.relative_to(examples_root).as_posix() data = _read_pyproject(pyproject_path) meta: dict[str, Any] = {"webSupported": _example_web_supported(pyproject_path)} - title = data.get("tool", {}).get("flet", {}).get("metadata", {}).get("title") - if title: + flet_metadata = data.get("tool", {}).get("flet", {}).get("metadata", {}) + if title := flet_metadata.get("title"): meta["title"] = title + if description := flet_metadata.get("description"): + meta["description"] = description mapping[relative] = meta output_path.write_text( diff --git a/website/docs/controls/charts/matplotlibchart.md b/website/docs/controls/charts/matplotlibchart.md index ad71b65565..cf3afc6437 100644 --- a/website/docs/controls/charts/matplotlibchart.md +++ b/website/docs/controls/charts/matplotlibchart.md @@ -12,10 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Bar chart - -Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py). - diff --git a/website/docs/controls/charts/matplotlibchartwithtoolbar.md b/website/docs/controls/charts/matplotlibchartwithtoolbar.md index 25ac53ed6f..1892808670 100644 --- a/website/docs/controls/charts/matplotlibchartwithtoolbar.md +++ b/website/docs/controls/charts/matplotlibchartwithtoolbar.md @@ -12,10 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Basic - -Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py). - diff --git a/website/docs/controls/charts/plotlychart.md b/website/docs/controls/charts/plotlychart.md index 6a1c7e13eb..9b768eabf8 100644 --- a/website/docs/controls/charts/plotlychart.md +++ b/website/docs/controls/charts/plotlychart.md @@ -11,34 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Plotly line chart - -Based on an official [Plotly example](https://plotly.com/python/line-charts). - -### Plotly bar chart - -Based on an official [Plotly example](https://plotly.com/python/bar-charts). - -### Plotly pie chart - -Based on an official [Plotly example](https://plotly.com/python/pie-charts). - -### Plotly box plot - -Based on an official [Plotly example](https://plotly.com/python/box-plots). - diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 787e04eea6..7fdb54d4cc 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -11,6 +11,25 @@ const fs = require("fs"); const path = require("path"); const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; +const LINK_RE = /\[([^\]]+)\]\(([^)]+)\)/g; + +function markdownToInlineAst(text) { + const children = []; + let lastIndex = 0; + let match; + LINK_RE.lastIndex = 0; + while ((match = LINK_RE.exec(text)) !== null) { + if (match.index > lastIndex) { + children.push({ type: "text", value: text.slice(lastIndex, match.index) }); + } + children.push({ type: "link", url: match[2], children: [{ type: "text", value: match[1] }] }); + lastIndex = match.index + match[0].length; + } + if (lastIndex < text.length) { + children.push({ type: "text", value: text.slice(lastIndex) }); + } + return children; +} module.exports = function remarkInjectExampleHeadings() { const metadataPath = path.join(__dirname, "..", ".crocodocs", "examples-metadata.json"); @@ -46,17 +65,20 @@ module.exports = function remarkInjectExampleHeadings() { const title = metadata[`${examplesPath}/${match[1]}`]?.title; if (!title) continue; - insertions.push({ index: i, title }); + const description = metadata[`${examplesPath}/${match[1]}`]?.description ?? null; + insertions.push({ index: i, title, description }); } // Insert in reverse order so earlier indices stay valid for (let i = insertions.length - 1; i >= 0; i--) { - const { index, title } = insertions[i]; - tree.children.splice(index, 0, { - type: "heading", - depth: 3, - children: [{ type: "text", value: title }], - }); + const { index, title, description } = insertions[i]; + const nodes = [ + { type: "heading", depth: 3, children: [{ type: "text", value: title }] }, + ]; + if (description) { + nodes.push({ type: "paragraph", children: markdownToInlineAst(description) }); + } + tree.children.splice(index, 0, ...nodes); } }; }; From 731948933d48b523e7600ae332f58472063cc187 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:05:49 -0700 Subject: [PATCH 05/35] docs: move chip example descriptions to pyproject.toml, fix duplicate headings Add multi-paragraph descriptions with inline-code links to assist_chips and filter_chips pyproject.toml files. Remove static ### headers and description paragraphs from chip.md. Upgrades the remark plugin's inline parser to handle [`code`](url) links and multi-paragraph descriptions (blank-line separated). Keeps hasPrecedingH3 as a safety net for any remaining static ### headers in other docs. Co-Authored-By: Claude Sonnet 4.6 --- .../material/chip/assist_chips/pyproject.toml | 6 ++ .../material/chip/filter_chips/pyproject.toml | 4 + website/docs/controls/chip.md | 16 ---- .../plugins/remark-inject-example-headings.js | 79 ++++++++++++++----- 4 files changed, 71 insertions(+), 34 deletions(-) diff --git a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml index 3f1b5da46d..0e411440f1 100644 --- a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml @@ -15,6 +15,12 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Assist chips" +description = """ +Assist chips are chips with [`leading`](chip.md#flet.Chip.leading) icon and [`on_click`](chip.md#flet.Chip.on_click) event specified. + +They represent smart or automated actions that appear dynamically and contextually in a UI. + +An alternative to assist chips are buttons, which should appear persistently and consistently.""" controls = ["SafeArea", "Row", "Chip", "Icon", "Text"] layout_pattern = "inline-actions" complexity = "basic" diff --git a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml index d0c2aea954..85d277fe01 100644 --- a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml @@ -15,6 +15,10 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Filter chips" +description = """ +Filter chips are chips with [`on_select`](chip.md#flet.Chip.on_select) event specified. + +They use tags or descriptive words provided in the [`label`](chip.md#flet.Chip.label) to filter content. They can be a good alternative to switches or checkboxes.""" controls = ["SafeArea", "Column", "Row", "Chip", "Icon", "Text"] layout_pattern = "filter-bar" complexity = "basic" diff --git a/website/docs/controls/chip.md b/website/docs/controls/chip.md index 650906e50b..88fee6d860 100644 --- a/website/docs/controls/chip.md +++ b/website/docs/controls/chip.md @@ -12,26 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Assist chips - -Assist chips are chips with [`leading`](chip.md#flet.Chip.leading) icon -and [`on_click`](chip.md#flet.Chip.on_click) event specified. - -They represent smart or automated actions that appear dynamically and contextually in a UI. - -An alternative to assist chips are buttons, which should appear persistently and consistently. - assist-chips -### Filter chips - -Filter chips are chips with [`on_select`](chip.md#flet.Chip.on_select) event specified. - -They use tags or descriptive words provided in the [`label`](chip.md#flet.Chip.label) to filter content. -They can be a good alternative to switches or checkboxes. - filter-chips diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 7fdb54d4cc..19531829d6 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -1,6 +1,7 @@ /** - * Remark plugin that injects a ### heading before each element, - * sourcing the title from examples-metadata.json (built from pyproject.toml files). + * Remark plugin that injects a ### heading (and optional description) before + * each element, sourcing content from examples-metadata.json + * (built from [tool.flet.metadata] in pyproject.toml files). * * Relies on the MDX file having an `examples` frontmatter field (e.g. * "controls/material/app_bar") and CodeExample path expressions of the form: @@ -11,24 +12,65 @@ const fs = require("fs"); const path = require("path"); const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; -const LINK_RE = /\[([^\]]+)\]\(([^)]+)\)/g; -function markdownToInlineAst(text) { - const children = []; +// Matches [text](url) or [`code`](url) or `code` +const INLINE_RE = /\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; + +// Returns true when an h3 heading already exists between the last section +// boundary (h1/h2 or another JSX flow element) and position `index`. +// Used as a safety net for docs that still carry a static ### header. +function hasPrecedingH3(children, index) { + for (let i = index - 1; i >= 0; i--) { + const n = children[i]; + if (n.type === "heading" && n.depth <= 2) return false; + if (n.type === "heading" && n.depth === 3) return true; + if (n.type === "mdxJsxFlowElement") return false; + } + return false; +} + +// Parse a single line of inline markdown into AST children. +// Handles: [text](url), [`code`](url), `code`, plain text. +function parseInline(text) { + const nodes = []; let lastIndex = 0; let match; - LINK_RE.lastIndex = 0; - while ((match = LINK_RE.exec(text)) !== null) { + INLINE_RE.lastIndex = 0; + while ((match = INLINE_RE.exec(text)) !== null) { if (match.index > lastIndex) { - children.push({ type: "text", value: text.slice(lastIndex, match.index) }); + nodes.push({ type: "text", value: text.slice(lastIndex, match.index) }); + } + if (match[1] !== undefined) { + // Link: [text](url) or [`code`](url) + const linkText = match[1]; + const url = match[2]; + const child = + linkText.startsWith("`") && linkText.endsWith("`") + ? { type: "inlineCode", value: linkText.slice(1, -1) } + : { type: "text", value: linkText }; + nodes.push({ type: "link", url, children: [child] }); + } else { + // Inline code: `code` + nodes.push({ type: "inlineCode", value: match[3] }); } - children.push({ type: "link", url: match[2], children: [{ type: "text", value: match[1] }] }); lastIndex = match.index + match[0].length; } if (lastIndex < text.length) { - children.push({ type: "text", value: text.slice(lastIndex) }); + nodes.push({ type: "text", value: text.slice(lastIndex) }); } - return children; + return nodes; +} + +// Parse a (possibly multi-paragraph) markdown description string into an array +// of paragraph AST nodes. Paragraphs are separated by blank lines. +function parseDescription(text) { + return text + .trim() + .split(/\n\n+/) + .map((para) => ({ + type: "paragraph", + children: parseInline(para.replace(/\n/g, " ")), + })); } module.exports = function remarkInjectExampleHeadings() { @@ -62,22 +104,23 @@ module.exports = function remarkInjectExampleHeadings() { const match = SUBFOLDER_RE.exec(exprValue); if (!match) continue; - const title = metadata[`${examplesPath}/${match[1]}`]?.title; + const entry = metadata[`${examplesPath}/${match[1]}`]; + const title = entry?.title; if (!title) continue; - const description = metadata[`${examplesPath}/${match[1]}`]?.description ?? null; - insertions.push({ index: i, title, description }); + // Skip if a static ### heading already exists in this section. + if (hasPrecedingH3(tree.children, i)) continue; + + insertions.push({ index: i, title, description: entry?.description ?? null }); } - // Insert in reverse order so earlier indices stay valid + // Insert in reverse order so earlier indices stay valid. for (let i = insertions.length - 1; i >= 0; i--) { const { index, title, description } = insertions[i]; const nodes = [ { type: "heading", depth: 3, children: [{ type: "text", value: title }] }, + ...( description ? parseDescription(description) : []), ]; - if (description) { - nodes.push({ type: "paragraph", children: markdownToInlineAst(description) }); - } tree.children.splice(index, 0, ...nodes); } }; From e01161d355a46d17e880e7f10236201ab3c61625 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:13:09 -0700 Subject: [PATCH 06/35] docs: move column scroll example descriptions to pyproject.toml Add descriptions for infinite_scrolling and programmatic_scroll examples. Also correct titles from verbose "Column infinite scrolling" / "Column programmatic scroll" to the shorter "Infinite scrolling" / "Scrolling programmatically" used as section headings. Co-Authored-By: Claude Sonnet 4.6 --- .../core/column/infinite_scrolling/pyproject.toml | 3 ++- .../core/column/programmatic_scroll/pyproject.toml | 3 ++- website/docs/controls/column.md | 9 --------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml index 943e45b564..20627036ae 100644 --- a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml +++ b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Column"] [tool.flet.metadata] -title = "Column infinite scrolling" +title = "Infinite scrolling" +description = "This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, creating the illusion of infinite list:" controls = ["Container", "Column", "Text"] layout_pattern = "infinite-list" complexity = "basic" diff --git a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml index 7a75ab126e..0bcd9a8d2d 100644 --- a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml +++ b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Column"] [tool.flet.metadata] -title = "Column programmatic scroll" +title = "Scrolling programmatically" +description = "This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column:" controls = ["Container", "Column", "Row", "Button", "Text"] layout_pattern = "control-panel" complexity = "basic" diff --git a/website/docs/controls/column.md b/website/docs/controls/column.md index 1a8a69d6e7..5605fedfb9 100644 --- a/website/docs/controls/column.md +++ b/website/docs/controls/column.md @@ -28,17 +28,8 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen horizontal-alignment -### Infinite scrolling - -This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, -creating the illusion of infinite list: - -### Scrolling programmatically - -This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column: - programmatic-scroll From c32982f0e20e8746cc241e8b9c60cc8ece8670bb Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:17:56 -0700 Subject: [PATCH 07/35] docs(container): rename nested theme example titles to be meaningful Nested themes 1 -> "Inherited and overridden theme" Nested themes 2 -> "Page, dark and light themes" Nested themes 3 -> "Theme mode toggle" Co-Authored-By: Claude Sonnet 4.6 --- .../controls/core/container/nested_themes_1/pyproject.toml | 2 +- .../controls/core/container/nested_themes_2/pyproject.toml | 2 +- .../controls/core/container/nested_themes_3/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml index 73c0393525..c7db272197 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 1" +title = "Inherited and overridden theme" controls = ["SafeArea", "Column", "Container", "Button"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml index 9ff856560c..38ddd5c998 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 2" +title = "Page, dark and light themes" controls = ["SafeArea", "Column", "Row", "Container", "Button", "TextButton", "Text"] layout_pattern = "stacked-sections" complexity = "basic" diff --git a/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml index 78d8336e09..9bf159e6ac 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 3" +title = "Theme mode toggle" controls = ["SafeArea", "Column", "Row", "Container", "Button", "Switch"] layout_pattern = "stacked-sections" complexity = "basic" From 6c0f29e3ac40bdd02c223e40a475278f5f3b1121 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:22:01 -0700 Subject: [PATCH 08/35] docs(cupertinodialogaction): replace 'see there' link with inline examples Inject the same CodeExample blocks from cupertinoalertdialog.md directly instead of linking to that page's Examples section. Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/cupertinodialogaction.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/website/docs/controls/cupertinodialogaction.md b/website/docs/controls/cupertinodialogaction.md index c54741d7b3..7155a0519a 100644 --- a/website/docs/controls/cupertinodialogaction.md +++ b/website/docs/controls/cupertinodialogaction.md @@ -1,12 +1,18 @@ --- class_name: "flet.CupertinoDialogAction" +examples: "controls/cupertino/cupertino_alert_dialog" +example_images: "examples/controls/cupertino/cupertino_alert_dialog/media" title: "CupertinoDialogAction" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -See [these](cupertinoalertdialog.md#examples). + + +file-deletion-confirmation + + From 180002acdcac7be7239fb1275fc4b11e6fd49bed Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:28:07 -0700 Subject: [PATCH 09/35] docs(datatable): move example descriptions to pyproject.toml Add titles and descriptions for spacing, adaptive_row_heights, and sortable_and_selectable examples. Title for spacing updated to "Horizontal margin and column spacing" and sortable_and_selectable to "Sortable columns and selectable rows" to match the former static headers. Static ### headers and descriptions removed from datatable/index.md. Co-Authored-By: Claude Sonnet 4.6 --- .../adaptive_row_heights/pyproject.toml | 1 + .../sortable_and_selectable/pyproject.toml | 3 ++- .../material/data_table/spacing/pyproject.toml | 3 ++- website/docs/controls/datatable/index.md | 17 ----------------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml index 819ec0f036..0cf1cb4a8f 100644 --- a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Layout/DataTable"] [tool.flet.metadata] title = "Adaptive row heights" +description = "Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` (infinity) will cause the `DataTable` to let each individual row adapt its height to its respective content, instead of all rows having the same height." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell"] layout_pattern = "table-view" complexity = "basic" diff --git a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml index 5a6031e82c..9a1e74a008 100644 --- a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/DataTable"] [tool.flet.metadata] -title = "Sortable and selectable" +title = "Sortable columns and selectable rows" +description = "This example demonstrates row selection (including select-all), sortable string and numeric columns, and stable selection across sorts and refreshes." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell", "Text"] layout_pattern = "table-view" complexity = "intermediate" diff --git a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml index cb2d259a87..9fbec5c747 100644 --- a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/DataTable"] [tool.flet.metadata] -title = "Spacing" +title = "Horizontal margin and column spacing" +description = "Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right edge spacing of the first and last columns. Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns." controls = ["SafeArea", "Column", "DataTable", "DataColumn", "DataRow", "DataCell", "Slider", "FilledButton", "OutlinedButton", "Container", "Text", "AppBar"] layout_pattern = "dashboard" complexity = "basic" diff --git a/website/docs/controls/datatable/index.md b/website/docs/controls/datatable/index.md index 6df17c3c33..773a45c748 100644 --- a/website/docs/controls/datatable/index.md +++ b/website/docs/controls/datatable/index.md @@ -17,31 +17,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Horizontal margin and column spacing - -Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right -edge spacing of the first and last columns. -Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns. - -### Adaptive row heights - -Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` -(infinity) will cause the `DataTable` to let each individual row adapt its height to its -respective content, instead of all rows having the same height. - -### Sortable columns and selectable rows - -This example demonstrates row selection (including select-all), -sortable string and numeric columns, and stable selection across sorts and refreshes. - From d732808460ec5a6f8a38fd19b8a2f793bc847b70 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 12:32:19 -0700 Subject: [PATCH 10/35] docs: inject DataTable examples into DataCell, DataRow, DataColumn pages Replace 'see these' links with inline CodeExample blocks matching datatable/index.md. The remark plugin will inject headings and descriptions from pyproject.toml automatically. Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/datacell.md | 24 ++++++++++++++++++++++-- website/docs/controls/datacolumn.md | 24 ++++++++++++++++++++++-- website/docs/controls/datarow.md | 24 ++++++++++++++++++++++-- 3 files changed, 66 insertions(+), 6 deletions(-) diff --git a/website/docs/controls/datacell.md b/website/docs/controls/datacell.md index e6151ca818..93009eaa15 100644 --- a/website/docs/controls/datacell.md +++ b/website/docs/controls/datacell.md @@ -1,12 +1,32 @@ --- class_name: "flet.DataCell" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataCell" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -See [these](datatable/index.md#examples). + + + + + + + + + + + + + + + + + + + diff --git a/website/docs/controls/datacolumn.md b/website/docs/controls/datacolumn.md index 5a048ba64a..4d23c7d310 100644 --- a/website/docs/controls/datacolumn.md +++ b/website/docs/controls/datacolumn.md @@ -1,12 +1,32 @@ --- class_name: "flet.DataColumn" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataColumn" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -See [these](datatable/index.md#examples). + + + + + + + + + + + + + + + + + + + diff --git a/website/docs/controls/datarow.md b/website/docs/controls/datarow.md index a88bc1b8f4..12e8a26ca8 100644 --- a/website/docs/controls/datarow.md +++ b/website/docs/controls/datarow.md @@ -1,12 +1,32 @@ --- class_name: "flet.DataRow" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataRow" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -See [these](datatable/index.md#examples). + + + + + + + + + + + + + + + + + + + From ee142736209e2ef291fb4ceebceb4ab43bfd1230 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 13:09:04 -0700 Subject: [PATCH 11/35] docs(dismissible): add static heading+description in md (hybrid approach); update title in pyproject.toml dismissible.md uses a static ### header with rich description (admonition, blockquote, bold text) which is complex to express in plain TOML strings. The pyproject.toml title is still set for gallery use; hasPrecedingH3 in the remark plugin skips auto-injection for this example. Co-Authored-By: Claude Sonnet 4.6 --- .../remove_on_dismiss_declarative/pyproject.toml | 2 +- website/docs/controls/dismissible.md | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml index a4f3eebd5b..2ccb48ba49 100644 --- a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml +++ b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Dismissible"] [tool.flet.metadata] -title = "Remove on dismiss declarative" +title = "Remove `Dismissible` `on_dismiss` inside component" controls = ["SafeArea", "ListView", "Dismissible", "ListTile"] layout_pattern = "list-detail" complexity = "basic" diff --git a/website/docs/controls/dismissible.md b/website/docs/controls/dismissible.md index 58e3289553..9bdb6fbb2e 100644 --- a/website/docs/controls/dismissible.md +++ b/website/docs/controls/dismissible.md @@ -15,7 +15,7 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen dismissible-list-tiles -### Remove Dismissible `on_dismiss` inside component +### Remove `Dismissible` `on_dismiss` inside component :::warning[Important] Always specify a key for `Dismissible` when using inside Flet component. @@ -23,19 +23,17 @@ Always specify a key for `Dismissible` when using inside Flet component. The issue you may encounter here is specific to the `Dismissible` control used inside Flet component (declarative UI). -When a user swipes (dismisses) an item, that widget is marked as “dismissed” on the Flutter side and effectively removed from the UI. +When a user swipes (dismisses) an item, that widget is marked as "dismissed" on the Flutter side and effectively removed from the UI. However, when Flet recalculates the UI diff on the Python side, it may attempt to reuse widgets in the list based on their order rather than their identity. -If no key is provided, Flet’s diffing algorithm can’t tell that a particular `Dismissible` corresponds to a specific item — so it assumes the items have merely shifted. +If no key is provided, Flet's diffing algorithm can't tell that a particular `Dismissible` corresponds to a specific item — so it assumes the items have merely shifted. That leads to update commands like: -> “Update text in items 0…N-1, then delete the last item (N).” +> "Update text in items 0…N-1, then delete the last item (N)." -On Flutter’s side, though, the already-dismissed `Dismissible` widget in the middle of the list can’t be updated — it’s gone — causing runtime errors. +On Flutter's side, though, the already-dismissed `Dismissible` widget in the middle of the list can't be updated — it's gone — causing runtime errors. -**Always assign a stable, unique key to each `Dismissible`, typically based on the item’s identifier or index.** - -Example: +**Always assign a stable, unique key to each `Dismissible`, typically based on the item's identifier or index.** From 9d31fcc0429700bdca32b880d6b1b2b521f25af9 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Mon, 1 Jun 2026 17:15:17 -0700 Subject: [PATCH 12/35] refactor(docs): replace hasPrecedingH3 heuristic with explicit display_title=false in pyproject.toml Title injection is now on by default for all examples. Set display_title=false in [tool.flet.metadata] to suppress injection for a specific example (used by dismissible/remove_on_dismiss_declarative which has a hand-written heading with rich description in the doc page). Co-Authored-By: Claude Sonnet 4.6 --- .../pyproject.toml | 1 + tools/crocodocs/src/crocodocs/generate.py | 2 ++ .../plugins/remark-inject-example-headings.js | 21 +++++-------------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml index 2ccb48ba49..16c4e8d0d6 100644 --- a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml +++ b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Layout/Dismissible"] [tool.flet.metadata] title = "Remove `Dismissible` `on_dismiss` inside component" +display_title = false controls = ["SafeArea", "ListView", "Dismissible", "ListTile"] layout_pattern = "list-detail" complexity = "basic" diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index dc13346d22..df6b7956ae 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -194,6 +194,8 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: meta["title"] = title if description := flet_metadata.get("description"): meta["description"] = description + if flet_metadata.get("display_title") is False: + meta["displayTitle"] = False mapping[relative] = meta output_path.write_text( diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 19531829d6..ff93021163 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -6,6 +6,9 @@ * Relies on the MDX file having an `examples` frontmatter field (e.g. * "controls/material/app_bar") and CodeExample path expressions of the form: * path={frontMatter.examples + '/subfolder/main.py'} + * + * Set `display_title = false` in [tool.flet.metadata] to suppress injection + * for a specific example (use when the doc page has a hand-written heading). */ const fs = require("fs"); @@ -16,19 +19,6 @@ const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; // Matches [text](url) or [`code`](url) or `code` const INLINE_RE = /\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; -// Returns true when an h3 heading already exists between the last section -// boundary (h1/h2 or another JSX flow element) and position `index`. -// Used as a safety net for docs that still carry a static ### header. -function hasPrecedingH3(children, index) { - for (let i = index - 1; i >= 0; i--) { - const n = children[i]; - if (n.type === "heading" && n.depth <= 2) return false; - if (n.type === "heading" && n.depth === 3) return true; - if (n.type === "mdxJsxFlowElement") return false; - } - return false; -} - // Parse a single line of inline markdown into AST children. // Handles: [text](url), [`code`](url), `code`, plain text. function parseInline(text) { @@ -108,8 +98,7 @@ module.exports = function remarkInjectExampleHeadings() { const title = entry?.title; if (!title) continue; - // Skip if a static ### heading already exists in this section. - if (hasPrecedingH3(tree.children, i)) continue; + if (entry.displayTitle === false) continue; insertions.push({ index: i, title, description: entry?.description ?? null }); } @@ -119,7 +108,7 @@ module.exports = function remarkInjectExampleHeadings() { const { index, title, description } = insertions[i]; const nodes = [ { type: "heading", depth: 3, children: [{ type: "text", value: title }] }, - ...( description ? parseDescription(description) : []), + ...(description ? parseDescription(description) : []), ]; tree.children.splice(index, 0, ...nodes); } From 323bdda2ef73fd4c06dcfbf69039d38ad5c1fcf1 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 11:20:45 -0700 Subject: [PATCH 13/35] Remove examples and extra heading in docs Remove the inline Examples sections from DataCell, DataColumn, and DataRow docs (deleted multiple CodeExample/Image blocks), leaving only the ClassAll component. Also remove a redundant "### CodeEditor" heading from the CodeEditor page. This cleans up duplicated example content and relies on centralized/example assets elsewhere. --- website/docs/controls/codeeditor/index.md | 1 - website/docs/controls/datacell.md | 22 ---------------------- website/docs/controls/datacolumn.md | 22 ---------------------- website/docs/controls/datarow.md | 22 ---------------------- 4 files changed, 67 deletions(-) diff --git a/website/docs/controls/codeeditor/index.md b/website/docs/controls/codeeditor/index.md index e3758405c2..3c98e83b7d 100644 --- a/website/docs/controls/codeeditor/index.md +++ b/website/docs/controls/codeeditor/index.md @@ -32,7 +32,6 @@ pip install flet-code-editor # (1)! ## Examples -### CodeEditor code-editor-example-1 diff --git a/website/docs/controls/datacell.md b/website/docs/controls/datacell.md index 93009eaa15..17bbba389e 100644 --- a/website/docs/controls/datacell.md +++ b/website/docs/controls/datacell.md @@ -7,26 +7,4 @@ title: "DataCell" import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; -## Examples - - - - - - - - - - - - - - - - - - - - - diff --git a/website/docs/controls/datacolumn.md b/website/docs/controls/datacolumn.md index 4d23c7d310..5f2ffbe741 100644 --- a/website/docs/controls/datacolumn.md +++ b/website/docs/controls/datacolumn.md @@ -7,26 +7,4 @@ title: "DataColumn" import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; -## Examples - - - - - - - - - - - - - - - - - - - - - diff --git a/website/docs/controls/datarow.md b/website/docs/controls/datarow.md index 12e8a26ca8..393e0749ba 100644 --- a/website/docs/controls/datarow.md +++ b/website/docs/controls/datarow.md @@ -7,26 +7,4 @@ title: "DataRow" import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; -## Examples - - - - - - - - - - - - - - - - - - - - - From 6249a203dd497681fc622231d4e88c4cf2ed4eb8 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 11:29:08 -0700 Subject: [PATCH 14/35] docs(drag): inject titles from metadata; restructure DragTarget page - draggable.md: uncomment CodeExample blocks, remove static ### header - dragtarget.md: replace 'see these' link with inline CodeExample blocks, add examples/example_images frontmatter, switch ClassAll to ClassSummary+ClassMembers so description appears above examples Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/draggable.md | 8 +++----- website/docs/controls/dragtarget.md | 14 +++++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/website/docs/controls/draggable.md b/website/docs/controls/draggable.md index a66f4411d6..f4cddc3654 100644 --- a/website/docs/controls/draggable.md +++ b/website/docs/controls/draggable.md @@ -11,12 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Drag and drop Containers - -# - -# + drag-and-drop-containers + + diff --git a/website/docs/controls/dragtarget.md b/website/docs/controls/dragtarget.md index c19cd87e5d..d9f23461bf 100644 --- a/website/docs/controls/dragtarget.md +++ b/website/docs/controls/dragtarget.md @@ -1,12 +1,20 @@ --- class_name: "flet.DragTarget" +examples: "controls/core/drag_target_and_draggable" +example_images: "examples/controls/core/drag_target_and_draggable/media" title: "DragTarget" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/components/crocodocs'; + + ## Examples -See [these](draggable.md#examples). + + +drag-and-drop-containers + + - + From 4af63c3330a63ca8ece211339a03041f8bc7fff4 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 11:35:33 -0700 Subject: [PATCH 15/35] docs(expansionpanellist): move Scrolling title+description to pyproject.toml, inject from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../material/expansion_panel_list/scrollable/pyproject.toml | 3 ++- website/docs/controls/expansionpanellist.md | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml index 0545271517..2ae180ecb4 100644 --- a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml +++ b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/ExpansionPanelList"] [tool.flet.metadata] -title = "Scrollable" +title = "Scrolling" +description = "`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property." controls = ["SafeArea", "ExpansionPanelList", "ExpansionPanel", "ListTile", "IconButton", "Text"] layout_pattern = "list-detail" complexity = "basic" diff --git a/website/docs/controls/expansionpanellist.md b/website/docs/controls/expansionpanellist.md index 11c45519cd..963114d5ea 100644 --- a/website/docs/controls/expansionpanellist.md +++ b/website/docs/controls/expansionpanellist.md @@ -16,10 +16,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Scrolling - -`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property. - From fa29e53027ed3d591e62a49747cdc5976804eeef Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 11:39:55 -0700 Subject: [PATCH 16/35] docs(gesturedetector): move Draggable containers title+description to pyproject.toml, inject from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../gesture_detector/draggable_containers/pyproject.toml | 4 ++++ website/docs/controls/gesturedetector.md | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml index b412691782..ac6d57b7d6 100644 --- a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml +++ b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml @@ -15,6 +15,10 @@ categories = ["Utility/GestureDetector"] [tool.flet.metadata] title = "Draggable containers" +description = """ +The following example demonstrates how a control can be freely dragged inside a Stack. + +The sample also shows that GestureDetector can have a child control (blue container) as well as be nested inside another control (yellow container) giving the same results.""" controls = ["SafeArea", "Stack", "Container", "GestureDetector"] layout_pattern = "canvas" complexity = "basic" diff --git a/website/docs/controls/gesturedetector.md b/website/docs/controls/gesturedetector.md index c2cce83911..73b0df45ac 100644 --- a/website/docs/controls/gesturedetector.md +++ b/website/docs/controls/gesturedetector.md @@ -15,13 +15,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Draggable containers - -The following example demonstrates how a control can be freely dragged inside a Stack. - -The sample also shows that GestureDetector can have a child control (blue container) as well as be nested -inside another control (yellow container) giving the same results. - draggable-containers From 394400cb278e4cfc3f9834951a6f67058c24bf20 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 11:43:49 -0700 Subject: [PATCH 17/35] docs(image): move gapless playback title+description to pyproject.toml, inject from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../controls/core/image/gapless_playback/pyproject.toml | 2 ++ website/docs/controls/image.md | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml index c2b1ef33b8..ff42ce3936 100644 --- a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml +++ b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml @@ -15,6 +15,8 @@ categories = ["Displays/Image"] [tool.flet.metadata] title = "Gapless playback when changing image sources" +description = """ +This example updates both images to a new network URL on each click. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `True`, the previous frame remains visible while the next image loads. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `False`, the image area can briefly be empty, causing a flicker/blink effect.""" controls = ["SafeArea", "Column", "Row", "Container", "Text", "Image", "FilledButton", "AppBar"] layout_pattern = "comparison" complexity = "basic" diff --git a/website/docs/controls/image.md b/website/docs/controls/image.md index da8dc8ef08..345137ed9c 100644 --- a/website/docs/controls/image.md +++ b/website/docs/controls/image.md @@ -26,13 +26,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Gapless playback when changing image sources - -This example updates both images to a new network URL on each click. With -[`gapless_playback`](image.md#flet.Image.gapless_playback) set to `True`, the previous frame remains visible while the next -image loads. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `False`, the image area can -briefly be empty, causing a flicker/blink effect. - From 4c06e9080dbdb3ca0eb10480ee6b353e527e86e1 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:06:21 -0700 Subject: [PATCH 18/35] docs(navigationbar): inject Adaptive Navigation title+description from metadata - Extend remark plugin to handle hardcoded CodeExample paths (not just frontMatter.examples + '/subfolder/') via HARDCODED_PATH_RE - Move title+description to adaptive_navigation/pyproject.toml - Remove static ### header and description from navigationbar/index.md Co-Authored-By: Claude Sonnet 4.6 --- .../adaptive_navigation/pyproject.toml | 1 + website/docs/controls/navigationbar/index.md | 6 ----- .../plugins/remark-inject-example-headings.js | 23 ++++++++++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml index a9545c7511..76400a3716 100644 --- a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml +++ b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Navigation/NavigationDrawer"] [tool.flet.metadata] title = "Adaptive Navigation" +description = "This example switches between a `NavigationBar` on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts." controls = ["NavigationDrawer", "NavigationDrawerDestination", "NavigationRail", "NavigationRailDestination", "NavigationBar", "NavigationBarDestination", "Button", "SafeArea", "Container", "Row", "Column", "VerticalDivider", "Text", "Page"] layout_pattern = "adaptive-navigation" complexity = "intermediate" diff --git a/website/docs/controls/navigationbar/index.md b/website/docs/controls/navigationbar/index.md index 3d06d89b24..3129beb823 100644 --- a/website/docs/controls/navigationbar/index.md +++ b/website/docs/controls/navigationbar/index.md @@ -17,12 +17,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen basic -### Adaptive navigation - -This example switches between a `NavigationBar` -on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index ff93021163..754b0409a7 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -4,8 +4,9 @@ * (built from [tool.flet.metadata] in pyproject.toml files). * * Relies on the MDX file having an `examples` frontmatter field (e.g. - * "controls/material/app_bar") and CodeExample path expressions of the form: - * path={frontMatter.examples + '/subfolder/main.py'} + * "controls/material/app_bar") and CodeExample path expressions of one of: + * path={frontMatter.examples + '/subfolder/main.py'} ← relative to frontmatter + * path={'controls/material/some_group/subfolder/main.py'} ← absolute hardcoded * * Set `display_title = false` in [tool.flet.metadata] to suppress injection * for a specific example (use when the doc page has a hand-written heading). @@ -14,7 +15,10 @@ const fs = require("fs"); const path = require("path"); +// Matches: frontMatter.examples + '/subfolder/...', captures subfolder name. const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; +// Matches: 'controls/.../subfolder/file.py', captures the directory path. +const HARDCODED_PATH_RE = /^'(controls\/.+)\/[^/']+\.py'$/; // Matches [text](url) or [`code`](url) or `code` const INLINE_RE = /\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; @@ -91,10 +95,17 @@ module.exports = function remarkInjectExampleHeadings() { ? attrValue : ""; - const match = SUBFOLDER_RE.exec(exprValue); - if (!match) continue; - - const entry = metadata[`${examplesPath}/${match[1]}`]; + let metaKey; + const subfolderMatch = SUBFOLDER_RE.exec(exprValue); + if (subfolderMatch) { + metaKey = `${examplesPath}/${subfolderMatch[1]}`; + } else { + const hardcodedMatch = HARDCODED_PATH_RE.exec(exprValue); + if (hardcodedMatch) metaKey = hardcodedMatch[1]; + } + if (!metaKey) continue; + + const entry = metadata[metaKey]; const title = entry?.title; if (!title) continue; From f448e5c53698d090b3e92a9dc15ae85cde2cb25b Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:08:12 -0700 Subject: [PATCH 19/35] docs(navigationdrawer): remove static Adaptive navigation header, inject from metadata Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/navigationdrawer/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/website/docs/controls/navigationdrawer/index.md b/website/docs/controls/navigationdrawer/index.md index 5f0f09aa80..ee3ab3b17c 100644 --- a/website/docs/controls/navigationdrawer/index.md +++ b/website/docs/controls/navigationdrawer/index.md @@ -25,12 +25,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen Themed navigation drawer example -### Adaptive navigation - -This example switches between a [`NavigationBar`](../navigationbar/index.md) -on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer From 497ea24032e732afa258a21f50c5e8164ee32ee0 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:09:57 -0700 Subject: [PATCH 20/35] docs(navigationrail): remove static Adaptive navigation header, inject from metadata Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/navigationrail/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/website/docs/controls/navigationrail/index.md b/website/docs/controls/navigationrail/index.md index 04048596b1..d31a668deb 100644 --- a/website/docs/controls/navigationrail/index.md +++ b/website/docs/controls/navigationrail/index.md @@ -17,12 +17,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen basic -### Adaptive navigation - -This example switches between a [`NavigationBar`](../navigationbar/index.md) -on narrow layouts and a `NavigationRail` with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer From f9f5c50476f9c5fa00c684e4d94ce6442352eee5 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:12:19 -0700 Subject: [PATCH 21/35] Update outlinediconbutton.md --- website/docs/controls/outlinediconbutton.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/website/docs/controls/outlinediconbutton.md b/website/docs/controls/outlinediconbutton.md index f157fbd8a4..49510e231e 100644 --- a/website/docs/controls/outlinediconbutton.md +++ b/website/docs/controls/outlinediconbutton.md @@ -5,8 +5,4 @@ title: "OutlinedIconButton" import {ClassAll} from '@site/src/components/crocodocs'; -## Examples - -See `IconButton` [examples](iconbutton.md#examples). - From 5b11397bebba569375466ecdb2f10cbf22dfd81d Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:18:17 -0700 Subject: [PATCH 22/35] docs(page): inject Mobile device orientation title+description from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../controls/core/page/device_orientation/pyproject.toml | 3 ++- website/docs/controls/page.md | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml index 3e4a4b5f30..07aa1d09cc 100644 --- a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml +++ b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Utility/Page"] [tool.flet.metadata] -title = "Device orientation" +title = "Mobile device orientation configuration" +description = "Shows how to lock your app to specific device orientations (e.g., portrait up, landscape right) and listen for orientation changes on mobile devices." controls = ["SafeArea", "AppBar", "Text", "Column", "Checkbox", "Page"] layout_pattern = "single-panel" complexity = "basic" diff --git a/website/docs/controls/page.md b/website/docs/controls/page.md index b3d5a9714b..02b3637519 100644 --- a/website/docs/controls/page.md +++ b/website/docs/controls/page.md @@ -13,11 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc -### Mobile device orientation configuration - -Shows how to lock your app to specific device orientations -(e.g., portrait up, landscape right) and listen for orientation changes on mobile devices. - From 97aa97dd116b74741857e96fa560278cb0e7154a Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:21:34 -0700 Subject: [PATCH 23/35] docs(page): inject Window hidden on start title+description from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../core/page/window_hidden_on_start/pyproject.toml | 4 ++++ website/docs/controls/page.md | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml index 7b1135659e..6085be142d 100644 --- a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml +++ b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml @@ -15,6 +15,10 @@ categories = ["Pages/Page"] [tool.flet.metadata] title = "Window hidden on start" +description = """ +A Flet desktop app (Windows, macOS, or Linux) can start with its window hidden. This lets your app perform initial setup (for example, add content, resize or position the window) before showing it to the user. + +In the example below, the window is resized and centered before becoming visible:""" controls = ["SafeArea", "Column", "Text"] layout_pattern = "single-panel" complexity = "basic" diff --git a/website/docs/controls/page.md b/website/docs/controls/page.md index 02b3637519..3775d784f8 100644 --- a/website/docs/controls/page.md +++ b/website/docs/controls/page.md @@ -17,14 +17,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc -### Hidden app window on startup - -A Flet desktop app (Windows, macOS, or Linux) can start with its window hidden. -This lets your app perform initial setup (for example, add content, resize -or position the window) before showing it to the user. - -In the example below, the window is resized and centered before becoming visible: - If you need this feature when packaging a desktop app using From 74fc40c5b8c63c25d5f24f826547dbcc063eba74 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:34:54 -0700 Subject: [PATCH 24/35] Update RadioGroup docstring and docs Replace inline backtick reference with a Sphinx cross-reference (:class:`~flet.Radio`) in RadioGroup docstring to improve documentation linking. Remove the redundant "Examples" section from the radiogroup docs page to clean up generated docs; no behavioral changes. --- .../packages/flet/src/flet/controls/material/radio_group.py | 4 ++-- website/docs/controls/radiogroup.md | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/python/packages/flet/src/flet/controls/material/radio_group.py b/sdk/python/packages/flet/src/flet/controls/material/radio_group.py index 8bd9eaec5b..d6a6bd5459 100644 --- a/sdk/python/packages/flet/src/flet/controls/material/radio_group.py +++ b/sdk/python/packages/flet/src/flet/controls/material/radio_group.py @@ -21,8 +21,8 @@ class RadioGroup(Control): """ The content of the RadioGroup. - Typically a list of `Radio` controls nested in a container control, e.g. `Column`, - `Row`. + Typically a list of :class:`~flet.Radio` controls nested in a container control, + e.g. `Column`, `Row`. Raises: ValueError: If :attr:`content` is not visible. diff --git a/website/docs/controls/radiogroup.md b/website/docs/controls/radiogroup.md index ca9222c95d..184dd40754 100644 --- a/website/docs/controls/radiogroup.md +++ b/website/docs/controls/radiogroup.md @@ -5,8 +5,4 @@ title: "RadioGroup" import {ClassAll} from '@site/src/components/crocodocs'; -## Examples - -See [these](radio.md#examples). - From 03550afbbc2f7dd2ca54d8b213f4f5912538c32d Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:39:47 -0700 Subject: [PATCH 25/35] docs(reorderablelistview): replace 'see this' with inline CodeExample, inject title from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../material/reorderable_drag_handle/basic/pyproject.toml | 2 +- website/docs/controls/reorderablelistview.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml b/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml index 213597586e..9bdb5844d2 100644 --- a/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml +++ b/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Input/Reorderable"] [tool.flet.metadata] -title = "ReorderableDragHandle" +title = "Custom drag handle" controls = ["ReorderableListView", "ReorderableDragHandle", "ListTile", "SafeArea"] layout_pattern = "draggable-list" complexity = "basic" diff --git a/website/docs/controls/reorderablelistview.md b/website/docs/controls/reorderablelistview.md index a5c8617859..b02609b902 100644 --- a/website/docs/controls/reorderablelistview.md +++ b/website/docs/controls/reorderablelistview.md @@ -16,8 +16,8 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen horizontal-and-vertical -### Custom drag handle + -See [this](reorderabledraghandle.md#examples). +custom-drag-handle From 6d33d37d4daf48c364ac4f97099356d2762903b7 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 12:52:42 -0700 Subject: [PATCH 26/35] docs(router): inject all example titles+descriptions from metadata Co-Authored-By: Claude Sonnet 4.6 --- .../apps/router/featured_views/pyproject.toml | 3 +- .../apps/router/modal_routes/pyproject.toml | 2 ++ .../router/nested_outlet_views/pyproject.toml | 3 +- .../apps/router/nested_routes/pyproject.toml | 3 +- .../router/recursive_routes/pyproject.toml | 1 + website/docs/controls/router.md | 29 ------------------- 6 files changed, 9 insertions(+), 32 deletions(-) diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index 59f4737c11..c8118843fb 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Featured views" +title = "Managed views — full app with NavigationRail" +description = "Complete app with [NavigationRail](../controls/navigationrail), stacked project views, and tabbed settings — all using `manage_views=True`." controls = ["View", "AppBar", "Column", "Row", "Container", "Button", "Switch", "TextField", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/modal_routes/pyproject.toml b/sdk/python/examples/apps/router/modal_routes/pyproject.toml index 6b31bf8804..5148fdbfb8 100644 --- a/sdk/python/examples/apps/router/modal_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/modal_routes/pyproject.toml @@ -15,6 +15,8 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Modal routes" +description = """ +Routes marked `modal=True` are rendered as a fullscreen-dialog overlay on top of the previous (non-modal) location's view stack. A *global* modal is declared at the top level (the URL works from anywhere); a *local* modal is declared as a child of a non-modal parent (the URL embeds the parent's segment, so deep-link works without any state).""" controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml index 4644b43bf2..c4daf25d4c 100644 --- a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Nested outlet views" +title = "Managed views — shared layout with outlet" +description = "A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). Leaf components return regular controls; the layout provides the View." controls = ["View", "AppBar", "Column", "Container", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/nested_routes/pyproject.toml b/sdk/python/examples/apps/router/nested_routes/pyproject.toml index d3fd7fd7fe..81173f0086 100644 --- a/sdk/python/examples/apps/router/nested_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_routes/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Nested routes" +title = "Managed views — nested routes" +description = "Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "basic" diff --git a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml index df6921e607..251fa03c8f 100644 --- a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Recursive routes" +description = "A route marked `recursive=True` can match itself as its own descendant — one View is emitted per consumed URL segment. Use this for tree-shaped URLs with unbounded depth (e.g. a file browser at `/folder/a/b/c`)." controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/website/docs/controls/router.md b/website/docs/controls/router.md index 0096fa43b7..23b98a1cf7 100644 --- a/website/docs/controls/router.md +++ b/website/docs/controls/router.md @@ -27,43 +27,14 @@ Navigation is done via [page.navigate()](../controls/page.md#flet.Page.navigate) -### Managed views — nested routes - -Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). -Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them. - -### Managed views — shared layout with outlet - -A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). -Leaf components return regular controls; the layout provides the View. - -### Managed views — full app with NavigationRail - -Complete app with [NavigationRail](../controls/navigationrail), stacked project views, -and tabbed settings — all using `manage_views=True`. - -### Modal routes - -Routes marked `modal=True` are rendered as a fullscreen-dialog overlay on top -of the previous (non-modal) location's view stack. A *global* modal is declared -at the top level (the URL works from anywhere); a *local* modal is declared as -a child of a non-modal parent (the URL embeds the parent's segment, so -deep-link works without any state). - -### Recursive routes - -A route marked `recursive=True` can match itself as its own descendant — one -View is emitted per consumed URL segment. Use this for tree-shaped URLs -with unbounded depth (e.g. a file browser at `/folder/a/b/c`). - From c70edb6a7cfdf498e32a3e15d76aaa7181941d48 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 13:08:30 -0700 Subject: [PATCH 27/35] docs(video): inject all titles+descriptions from metadata; extend plugin for [`code`][ref_id] links - Remove all static ### headers and descriptions from video/index.md - Add descriptions (with API cross-references) to all 8 video example pyproject.toml files - Extend remark plugin parseInline to handle [`code`][ref_id] pattern by emitting the text+inlineCode+text triplet that remark-api-links expects for link resolution Co-Authored-By: Claude Sonnet 4.6 --- .../video/button_bars/pyproject.toml | 1 + .../extensions/video/controls/pyproject.toml | 1 + .../video/controls_mode/pyproject.toml | 1 + .../extensions/video/events/pyproject.toml | 1 + .../extensions/video/playback/pyproject.toml | 1 + .../extensions/video/playlist/pyproject.toml | 1 + .../video/screenshot/pyproject.toml | 1 + .../extensions/video/subtitles/pyproject.toml | 1 + website/docs/controls/video/index.md | 42 ------------------- .../plugins/remark-inject-example-headings.js | 28 ++++++++++--- 10 files changed, 30 insertions(+), 48 deletions(-) diff --git a/sdk/python/examples/extensions/video/button_bars/pyproject.toml b/sdk/python/examples/extensions/video/button_bars/pyproject.toml index 0453573ccc..a083b80e54 100644 --- a/sdk/python/examples/extensions/video/button_bars/pyproject.toml +++ b/sdk/python/examples/extensions/video/button_bars/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Button bars" +description = "Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], [`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and [`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items." controls = ["SafeArea", "Text", "Icon", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls/pyproject.toml b/sdk/python/examples/extensions/video/controls/pyproject.toml index a924227726..9133d869ab 100644 --- a/sdk/python/examples/extensions/video/controls/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Controls" +description = "Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime." controls = ["SafeArea", "Column", "Row", "Button", "IconButton", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml index fbc5249288..6ede6c227d 100644 --- a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Mode-specific controls" +description = "Show different controls in normal vs. fullscreen mode by mapping each [`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value." controls = ["SafeArea", "Container", "Text", "Video"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/events/pyproject.toml b/sdk/python/examples/extensions/video/events/pyproject.toml index 23ba44d8dc..066c14cb42 100644 --- a/sdk/python/examples/extensions/video/events/pyproject.toml +++ b/sdk/python/examples/extensions/video/events/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Events" +description = "Listen for player [events](#flet_video.Video-events) like [`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc." controls = ["SafeArea", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playback/pyproject.toml b/sdk/python/examples/extensions/video/playback/pyproject.toml index 2f1217f1e2..29188a2ac2 100644 --- a/sdk/python/examples/extensions/video/playback/pyproject.toml +++ b/sdk/python/examples/extensions/video/playback/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playback Controls" +description = "Drive playback programmatically with methods like [`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playlist/pyproject.toml b/sdk/python/examples/extensions/video/playlist/pyproject.toml index 15ebcbfa45..ef1254222d 100644 --- a/sdk/python/examples/extensions/video/playlist/pyproject.toml +++ b/sdk/python/examples/extensions/video/playlist/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playlist" +description = "Mutate [`playlist`][flet_video.Video.playlist] directly to add, remove, or replace items, and navigate between tracks." controls = ["SafeArea", "Column", "Row", "Button", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/screenshot/pyproject.toml b/sdk/python/examples/extensions/video/screenshot/pyproject.toml index 691296c054..de6d74473f 100644 --- a/sdk/python/examples/extensions/video/screenshot/pyproject.toml +++ b/sdk/python/examples/extensions/video/screenshot/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Video Screenshot" +description = "Shows how to capture the current video frame with [`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image." controls = ["SafeArea", "Column", "Row", "Button", "Container", "Image", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/subtitles/pyproject.toml b/sdk/python/examples/extensions/video/subtitles/pyproject.toml index 2da50ee4ea..212d0389f5 100644 --- a/sdk/python/examples/extensions/video/subtitles/pyproject.toml +++ b/sdk/python/examples/extensions/video/subtitles/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Subtitles" +description = "Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]." controls = ["SafeArea", "Column", "Switch", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/website/docs/controls/video/index.md b/website/docs/controls/video/index.md index 26b18dd985..777329f654 100644 --- a/website/docs/controls/video/index.md +++ b/website/docs/controls/video/index.md @@ -99,62 +99,20 @@ sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so /usr/lib/libmpv.so.1 -### Playback - -Drive playback programmatically with methods like -[`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], -and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]. - -### Screenshot - -Shows how to capture the current video frame with -[`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image. - -### Playlist - -Mutate [`playlist`][flet_video.Video.playlist] directly to add, -remove, or replace items, and navigate between tracks. - -### Events - -Listen for player [events](#flet_video.Video-events) like -[`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc. - -### Subtitles - -Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) -and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]. - -### Controls - -Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime. - -### Mode-specific Controls - -Show different controls in normal vs. fullscreen mode by mapping each -[`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value. - -### Button Bars - -Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], -[`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and -[`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of -[`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items. - ## Description diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 754b0409a7..099caab5cb 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -20,11 +20,17 @@ const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; // Matches: 'controls/.../subfolder/file.py', captures the directory path. const HARDCODED_PATH_RE = /^'(controls\/.+)\/[^/']+\.py'$/; -// Matches [text](url) or [`code`](url) or `code` -const INLINE_RE = /\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; +// Matches (in priority order): +// 1. [`code`][ref_id] — API cross-reference with code label +// 2. [text](url) or [`code`](url) — regular link +// 3. `code` — inline code +const INLINE_RE = /\[(`[^`]+`)\]\[([^\]]+)\]|\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; // Parse a single line of inline markdown into AST children. -// Handles: [text](url), [`code`](url), `code`, plain text. +// Handles: [`code`][ref_id], [text](url), [`code`](url), `code`, plain text. +// +// For [`code`][ref_id], emits the text+inlineCode+text triplet that +// remark-api-links expects so it can resolve the ref to a real URL. function parseInline(text) { const nodes = []; let lastIndex = 0; @@ -35,9 +41,19 @@ function parseInline(text) { nodes.push({ type: "text", value: text.slice(lastIndex, match.index) }); } if (match[1] !== undefined) { + // [`code`][ref_id] — append "[" to preceding text node, then emit + // inlineCode + "][ref_id]" so remark-api-links can resolve the link. + if (nodes.length > 0 && nodes[nodes.length - 1].type === "text") { + nodes[nodes.length - 1].value += "["; + } else { + nodes.push({ type: "text", value: "[" }); + } + nodes.push({ type: "inlineCode", value: match[1].slice(1, -1) }); + nodes.push({ type: "text", value: `][${match[2]}]` }); + } else if (match[3] !== undefined) { // Link: [text](url) or [`code`](url) - const linkText = match[1]; - const url = match[2]; + const linkText = match[3]; + const url = match[4]; const child = linkText.startsWith("`") && linkText.endsWith("`") ? { type: "inlineCode", value: linkText.slice(1, -1) } @@ -45,7 +61,7 @@ function parseInline(text) { nodes.push({ type: "link", url, children: [child] }); } else { // Inline code: `code` - nodes.push({ type: "inlineCode", value: match[3] }); + nodes.push({ type: "inlineCode", value: match[5] }); } lastIndex = match.index + match[0].length; } From db7df7f704d0a3cea307b22f7828a96e19de5154 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 13:10:41 -0700 Subject: [PATCH 28/35] docs(webview): rename example title to "WebView" Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/examples/extensions/webview/example_1/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/examples/extensions/webview/example_1/pyproject.toml b/sdk/python/examples/extensions/webview/example_1/pyproject.toml index a2dffc3a8b..98c306a5d8 100644 --- a/sdk/python/examples/extensions/webview/example_1/pyproject.toml +++ b/sdk/python/examples/extensions/webview/example_1/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Display/WebView"] [tool.flet.metadata] -title = "WebView example 1" +title = "WebView" controls = ["SafeArea", "WebView"] layout_pattern = "single-panel" complexity = "basic" From b0094c2804e26e48730e671d495fe6a5519591ca Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 13:23:22 -0700 Subject: [PATCH 29/35] docs: remove static ### headers in layoutcontrol and responsiverow, inject from metadata Convert hardcoded path="..." to path={'...'} so HARDCODED_PATH_RE in the remark plugin can resolve the metadata key and inject the title. Co-Authored-By: Claude Sonnet 4.6 --- website/docs/controls/layoutcontrol.md | 4 +--- website/docs/controls/responsiverow.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/website/docs/controls/layoutcontrol.md b/website/docs/controls/layoutcontrol.md index 2dcf853263..c3cc88959e 100644 --- a/website/docs/controls/layoutcontrol.md +++ b/website/docs/controls/layoutcontrol.md @@ -20,9 +20,7 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### RotatedBox - - + diff --git a/website/docs/controls/responsiverow.md b/website/docs/controls/responsiverow.md index 60abcc8f23..c8b8230917 100644 --- a/website/docs/controls/responsiverow.md +++ b/website/docs/controls/responsiverow.md @@ -19,8 +19,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen -### Scrollable content - - + From 50d0d0aee2c674a0980662953420d880ee6ac6af Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 14:07:47 -0700 Subject: [PATCH 30/35] chore: delete obsolete update_example_headers.py script Static headers have been cleaned up; remark plugin handles injection going forward. Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/scripts/update_example_headers.py | 38 -------------------- 1 file changed, 38 deletions(-) delete mode 100644 sdk/python/scripts/update_example_headers.py diff --git a/sdk/python/scripts/update_example_headers.py b/sdk/python/scripts/update_example_headers.py deleted file mode 100644 index daedd115cf..0000000000 --- a/sdk/python/scripts/update_example_headers.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python3 -"""Remove static ### headers before tags in control docs. - -The headers are now injected dynamically by the remark-inject-example-headings -plugin from examples-metadata.json (sourced from pyproject.toml titles). -""" - -import re -from pathlib import Path - -DOCS_DIR = Path(__file__).parent.parent.parent.parent / "website/docs" - -# Matches: ### Header\n\n bool: - content = md_file.read_text() - new_content = PATTERN.sub(r"\1", content) - if new_content != content: - md_file.write_text(new_content) - return True - return False - - -def main() -> None: - changed = 0 - for md_file in sorted(DOCS_DIR.rglob("*.md")): - if process_file(md_file): - changed += 1 - print(f"Updated {changed} files.") - - -if __name__ == "__main__": - main() From dd8143fa52b381892a4f4a3dae9d6c210cec4cf9 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 16:12:55 -0700 Subject: [PATCH 31/35] =?UTF-8?q?refactor:=20rename=20metadata=20field=20d?= =?UTF-8?q?escription=20=E2=86=92=20docs=5Fintro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames the [tool.flet.metadata] field from `description` to `docs_intro` across all 32 pyproject.toml files, updates the generate.py reader and remark-inject-example-headings plugin accordingly, and regenerates the examples-metadata.json. Co-Authored-By: Claude Sonnet 4.6 --- .../examples/apps/router/featured_views/pyproject.toml | 2 +- sdk/python/examples/apps/router/modal_routes/pyproject.toml | 2 +- .../examples/apps/router/nested_outlet_views/pyproject.toml | 2 +- .../examples/apps/router/nested_routes/pyproject.toml | 2 +- .../examples/apps/router/recursive_routes/pyproject.toml | 2 +- .../controls/core/column/infinite_scrolling/pyproject.toml | 2 +- .../controls/core/column/programmatic_scroll/pyproject.toml | 2 +- .../gesture_detector/draggable_containers/pyproject.toml | 2 +- .../controls/core/image/gapless_playback/pyproject.toml | 2 +- .../controls/core/page/device_orientation/pyproject.toml | 2 +- .../core/page/window_hidden_on_start/pyproject.toml | 2 +- .../controls/material/chip/assist_chips/pyproject.toml | 2 +- .../controls/material/chip/filter_chips/pyproject.toml | 2 +- .../material/data_table/adaptive_row_heights/pyproject.toml | 2 +- .../data_table/sortable_and_selectable/pyproject.toml | 2 +- .../controls/material/data_table/spacing/pyproject.toml | 2 +- .../material/expansion_panel_list/scrollable/pyproject.toml | 2 +- .../navigation_drawer/adaptive_navigation/pyproject.toml | 2 +- .../charts/matplotlib_chart/bar_chart/pyproject.toml | 2 +- .../charts/matplotlib_chart/toolbar/pyproject.toml | 2 +- .../extensions/charts/plotly_chart/example_1/pyproject.toml | 2 +- .../extensions/charts/plotly_chart/example_2/pyproject.toml | 2 +- .../extensions/charts/plotly_chart/example_3/pyproject.toml | 2 +- .../extensions/charts/plotly_chart/example_4/pyproject.toml | 2 +- .../examples/extensions/video/button_bars/pyproject.toml | 2 +- .../examples/extensions/video/controls/pyproject.toml | 2 +- .../examples/extensions/video/controls_mode/pyproject.toml | 2 +- sdk/python/examples/extensions/video/events/pyproject.toml | 2 +- .../examples/extensions/video/playback/pyproject.toml | 2 +- .../examples/extensions/video/playlist/pyproject.toml | 2 +- .../examples/extensions/video/screenshot/pyproject.toml | 2 +- .../examples/extensions/video/subtitles/pyproject.toml | 2 +- tools/crocodocs/src/crocodocs/generate.py | 4 ++-- website/plugins/remark-inject-example-headings.js | 6 +++--- 34 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index c8118843fb..a580095647 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Managed views — full app with NavigationRail" -description = "Complete app with [NavigationRail](../controls/navigationrail), stacked project views, and tabbed settings — all using `manage_views=True`." +docs_intro = "Complete app with [NavigationRail](../controls/navigationrail), stacked project views, and tabbed settings — all using `manage_views=True`." controls = ["View", "AppBar", "Column", "Row", "Container", "Button", "Switch", "TextField", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/modal_routes/pyproject.toml b/sdk/python/examples/apps/router/modal_routes/pyproject.toml index 5148fdbfb8..ed3d47cc8e 100644 --- a/sdk/python/examples/apps/router/modal_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/modal_routes/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Modal routes" -description = """ +docs_intro = """ Routes marked `modal=True` are rendered as a fullscreen-dialog overlay on top of the previous (non-modal) location's view stack. A *global* modal is declared at the top level (the URL works from anywhere); a *local* modal is declared as a child of a non-modal parent (the URL embeds the parent's segment, so deep-link works without any state).""" controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" diff --git a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml index c4daf25d4c..8967949b42 100644 --- a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Managed views — shared layout with outlet" -description = "A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). Leaf components return regular controls; the layout provides the View." +docs_intro = "A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). Leaf components return regular controls; the layout provides the View." controls = ["View", "AppBar", "Column", "Container", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/nested_routes/pyproject.toml b/sdk/python/examples/apps/router/nested_routes/pyproject.toml index 81173f0086..2ff4c48c37 100644 --- a/sdk/python/examples/apps/router/nested_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_routes/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Managed views — nested routes" -description = "Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them." +docs_intro = "Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "basic" diff --git a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml index 251fa03c8f..42eb8d4e67 100644 --- a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Recursive routes" -description = "A route marked `recursive=True` can match itself as its own descendant — one View is emitted per consumed URL segment. Use this for tree-shaped URLs with unbounded depth (e.g. a file browser at `/folder/a/b/c`)." +docs_intro = "A route marked `recursive=True` can match itself as its own descendant — one View is emitted per consumed URL segment. Use this for tree-shaped URLs with unbounded depth (e.g. a file browser at `/folder/a/b/c`)." controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml index 20627036ae..99cab7da4f 100644 --- a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml +++ b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/Column"] [tool.flet.metadata] title = "Infinite scrolling" -description = "This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, creating the illusion of infinite list:" +docs_intro = "This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, creating the illusion of infinite list:" controls = ["Container", "Column", "Text"] layout_pattern = "infinite-list" complexity = "basic" diff --git a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml index 0bcd9a8d2d..fc0981bb84 100644 --- a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml +++ b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/Column"] [tool.flet.metadata] title = "Scrolling programmatically" -description = "This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column:" +docs_intro = "This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column:" controls = ["Container", "Column", "Row", "Button", "Text"] layout_pattern = "control-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml index ac6d57b7d6..6faee0ec22 100644 --- a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml +++ b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Utility/GestureDetector"] [tool.flet.metadata] title = "Draggable containers" -description = """ +docs_intro = """ The following example demonstrates how a control can be freely dragged inside a Stack. The sample also shows that GestureDetector can have a child control (blue container) as well as be nested inside another control (yellow container) giving the same results.""" diff --git a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml index ff42ce3936..c524d7e8d1 100644 --- a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml +++ b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Displays/Image"] [tool.flet.metadata] title = "Gapless playback when changing image sources" -description = """ +docs_intro = """ This example updates both images to a new network URL on each click. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `True`, the previous frame remains visible while the next image loads. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `False`, the image area can briefly be empty, causing a flicker/blink effect.""" controls = ["SafeArea", "Column", "Row", "Container", "Text", "Image", "FilledButton", "AppBar"] layout_pattern = "comparison" diff --git a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml index 07aa1d09cc..6f0dcf6c8c 100644 --- a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml +++ b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Utility/Page"] [tool.flet.metadata] title = "Mobile device orientation configuration" -description = "Shows how to lock your app to specific device orientations (e.g., portrait up, landscape right) and listen for orientation changes on mobile devices." +docs_intro = "Shows how to lock your app to specific device orientations (e.g., portrait up, landscape right) and listen for orientation changes on mobile devices." controls = ["SafeArea", "AppBar", "Text", "Column", "Checkbox", "Page"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml index 6085be142d..f6dc3d9e45 100644 --- a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml +++ b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Pages/Page"] [tool.flet.metadata] title = "Window hidden on start" -description = """ +docs_intro = """ A Flet desktop app (Windows, macOS, or Linux) can start with its window hidden. This lets your app perform initial setup (for example, add content, resize or position the window) before showing it to the user. In the example below, the window is resized and centered before becoming visible:""" diff --git a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml index 0e411440f1..6e841efe1c 100644 --- a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Assist chips" -description = """ +docs_intro = """ Assist chips are chips with [`leading`](chip.md#flet.Chip.leading) icon and [`on_click`](chip.md#flet.Chip.on_click) event specified. They represent smart or automated actions that appear dynamically and contextually in a UI. diff --git a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml index 85d277fe01..1a575cb8c9 100644 --- a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Filter chips" -description = """ +docs_intro = """ Filter chips are chips with [`on_select`](chip.md#flet.Chip.on_select) event specified. They use tags or descriptive words provided in the [`label`](chip.md#flet.Chip.label) to filter content. They can be a good alternative to switches or checkboxes.""" diff --git a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml index 0cf1cb4a8f..ab5674fdbe 100644 --- a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/DataTable"] [tool.flet.metadata] title = "Adaptive row heights" -description = "Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` (infinity) will cause the `DataTable` to let each individual row adapt its height to its respective content, instead of all rows having the same height." +docs_intro = "Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` (infinity) will cause the `DataTable` to let each individual row adapt its height to its respective content, instead of all rows having the same height." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell"] layout_pattern = "table-view" complexity = "basic" diff --git a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml index 9a1e74a008..0c5e3df9e4 100644 --- a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/DataTable"] [tool.flet.metadata] title = "Sortable columns and selectable rows" -description = "This example demonstrates row selection (including select-all), sortable string and numeric columns, and stable selection across sorts and refreshes." +docs_intro = "This example demonstrates row selection (including select-all), sortable string and numeric columns, and stable selection across sorts and refreshes." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell", "Text"] layout_pattern = "table-view" complexity = "intermediate" diff --git a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml index 9fbec5c747..ff376cc5bc 100644 --- a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/DataTable"] [tool.flet.metadata] title = "Horizontal margin and column spacing" -description = "Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right edge spacing of the first and last columns. Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns." +docs_intro = "Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right edge spacing of the first and last columns. Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns." controls = ["SafeArea", "Column", "DataTable", "DataColumn", "DataRow", "DataCell", "Slider", "FilledButton", "OutlinedButton", "Container", "Text", "AppBar"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml index 2ae180ecb4..df79fc2564 100644 --- a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml +++ b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/ExpansionPanelList"] [tool.flet.metadata] title = "Scrolling" -description = "`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property." +docs_intro = "`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property." controls = ["SafeArea", "ExpansionPanelList", "ExpansionPanel", "ListTile", "IconButton", "Text"] layout_pattern = "list-detail" complexity = "basic" diff --git a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml index 76400a3716..e5b68d4e47 100644 --- a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml +++ b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/NavigationDrawer"] [tool.flet.metadata] title = "Adaptive Navigation" -description = "This example switches between a `NavigationBar` on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts." +docs_intro = "This example switches between a `NavigationBar` on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts." controls = ["NavigationDrawer", "NavigationDrawerDestination", "NavigationRail", "NavigationRailDestination", "NavigationBar", "NavigationBarDestination", "Button", "SafeArea", "Container", "Row", "Column", "VerticalDivider", "Text", "Page"] layout_pattern = "adaptive-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml index ede04f834a..f302ef8ee8 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Bar Chart" -description = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py)." +docs_intro = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml index 412e0247ea..7dd7602b46 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Toolbar" -description = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py)." +docs_intro = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml index 327daeeceb..ee3a10a67a 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly line chart" -description = "Based on an official [Plotly example](https://plotly.com/python/line-charts)." +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/line-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml index 104da8b0be..2124e2af13 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly bar chart" -description = "Based on an official [Plotly example](https://plotly.com/python/bar-charts)." +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/bar-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml index 1b52df19df..738d8add53 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly pie chart" -description = "Based on an official [Plotly example](https://plotly.com/python/pie-charts)." +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/pie-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml index c1759d82f6..43be70f713 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly box plot" -description = "Based on an official [Plotly example](https://plotly.com/python/box-plots)." +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/box-plots)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/button_bars/pyproject.toml b/sdk/python/examples/extensions/video/button_bars/pyproject.toml index a083b80e54..e46b75a750 100644 --- a/sdk/python/examples/extensions/video/button_bars/pyproject.toml +++ b/sdk/python/examples/extensions/video/button_bars/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Button bars" -description = "Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], [`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and [`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items." +docs_intro = "Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], [`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and [`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items." controls = ["SafeArea", "Text", "Icon", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls/pyproject.toml b/sdk/python/examples/extensions/video/controls/pyproject.toml index 9133d869ab..faa21a3eca 100644 --- a/sdk/python/examples/extensions/video/controls/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Controls" -description = "Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime." +docs_intro = "Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime." controls = ["SafeArea", "Column", "Row", "Button", "IconButton", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml index 6ede6c227d..e2e95f6a18 100644 --- a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Mode-specific controls" -description = "Show different controls in normal vs. fullscreen mode by mapping each [`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value." +docs_intro = "Show different controls in normal vs. fullscreen mode by mapping each [`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value." controls = ["SafeArea", "Container", "Text", "Video"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/events/pyproject.toml b/sdk/python/examples/extensions/video/events/pyproject.toml index 066c14cb42..8d694e602f 100644 --- a/sdk/python/examples/extensions/video/events/pyproject.toml +++ b/sdk/python/examples/extensions/video/events/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Events" -description = "Listen for player [events](#flet_video.Video-events) like [`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc." +docs_intro = "Listen for player [events](#flet_video.Video-events) like [`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc." controls = ["SafeArea", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playback/pyproject.toml b/sdk/python/examples/extensions/video/playback/pyproject.toml index 29188a2ac2..ff538fb642 100644 --- a/sdk/python/examples/extensions/video/playback/pyproject.toml +++ b/sdk/python/examples/extensions/video/playback/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playback Controls" -description = "Drive playback programmatically with methods like [`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]." +docs_intro = "Drive playback programmatically with methods like [`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playlist/pyproject.toml b/sdk/python/examples/extensions/video/playlist/pyproject.toml index ef1254222d..f18e507081 100644 --- a/sdk/python/examples/extensions/video/playlist/pyproject.toml +++ b/sdk/python/examples/extensions/video/playlist/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playlist" -description = "Mutate [`playlist`][flet_video.Video.playlist] directly to add, remove, or replace items, and navigate between tracks." +docs_intro = "Mutate [`playlist`][flet_video.Video.playlist] directly to add, remove, or replace items, and navigate between tracks." controls = ["SafeArea", "Column", "Row", "Button", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/screenshot/pyproject.toml b/sdk/python/examples/extensions/video/screenshot/pyproject.toml index de6d74473f..977fc9a8bc 100644 --- a/sdk/python/examples/extensions/video/screenshot/pyproject.toml +++ b/sdk/python/examples/extensions/video/screenshot/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Video Screenshot" -description = "Shows how to capture the current video frame with [`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image." +docs_intro = "Shows how to capture the current video frame with [`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image." controls = ["SafeArea", "Column", "Row", "Button", "Container", "Image", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/subtitles/pyproject.toml b/sdk/python/examples/extensions/video/subtitles/pyproject.toml index 212d0389f5..aba42aaec4 100644 --- a/sdk/python/examples/extensions/video/subtitles/pyproject.toml +++ b/sdk/python/examples/extensions/video/subtitles/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Subtitles" -description = "Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]." +docs_intro = "Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]." controls = ["SafeArea", "Column", "Switch", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index df6b7956ae..220a6fffc8 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -192,8 +192,8 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: flet_metadata = data.get("tool", {}).get("flet", {}).get("metadata", {}) if title := flet_metadata.get("title"): meta["title"] = title - if description := flet_metadata.get("description"): - meta["description"] = description + if docs_intro := flet_metadata.get("docs_intro"): + meta["docs_intro"] = docs_intro if flet_metadata.get("display_title") is False: meta["displayTitle"] = False mapping[relative] = meta diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 099caab5cb..9651dbb065 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -127,15 +127,15 @@ module.exports = function remarkInjectExampleHeadings() { if (entry.displayTitle === false) continue; - insertions.push({ index: i, title, description: entry?.description ?? null }); + insertions.push({ index: i, title, docsIntro: entry?.docs_intro ?? null }); } // Insert in reverse order so earlier indices stay valid. for (let i = insertions.length - 1; i >= 0; i--) { - const { index, title, description } = insertions[i]; + const { index, title, docsIntro } = insertions[i]; const nodes = [ { type: "heading", depth: 3, children: [{ type: "text", value: title }] }, - ...(description ? parseDescription(description) : []), + ...(docsIntro ? parseDescription(docsIntro) : []), ]; tree.children.splice(index, 0, ...nodes); } From 9bb2bc93787fdf85593d5706e92aeabe01a46801 Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 16:33:35 -0700 Subject: [PATCH 32/35] refactor: move displayTitle opt-out from pyproject.toml to tag Instead of reading display_title from [tool.flet.metadata] and storing displayTitle in examples-metadata.json, the remark plugin now reads a displayTitle={false} JSX attribute directly from the element. Applied to the dismissible remove_on_dismiss_declarative example. Co-Authored-By: Claude Sonnet 4.6 --- .../remove_on_dismiss_declarative/pyproject.toml | 1 - tools/crocodocs/src/crocodocs/generate.py | 2 -- website/docs/controls/dismissible.md | 2 +- website/plugins/remark-inject-example-headings.js | 12 ++++++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml index 16c4e8d0d6..2ccb48ba49 100644 --- a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml +++ b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml @@ -15,7 +15,6 @@ categories = ["Layout/Dismissible"] [tool.flet.metadata] title = "Remove `Dismissible` `on_dismiss` inside component" -display_title = false controls = ["SafeArea", "ListView", "Dismissible", "ListTile"] layout_pattern = "list-detail" complexity = "basic" diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index 220a6fffc8..e73e701374 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -194,8 +194,6 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: meta["title"] = title if docs_intro := flet_metadata.get("docs_intro"): meta["docs_intro"] = docs_intro - if flet_metadata.get("display_title") is False: - meta["displayTitle"] = False mapping[relative] = meta output_path.write_text( diff --git a/website/docs/controls/dismissible.md b/website/docs/controls/dismissible.md index 9bdb6fbb2e..f416f01acb 100644 --- a/website/docs/controls/dismissible.md +++ b/website/docs/controls/dismissible.md @@ -35,6 +35,6 @@ On Flutter's side, though, the already-dismissed `Dismissible` widget in the mid **Always assign a stable, unique key to each `Dismissible`, typically based on the item's identifier or index.** - + diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js index 9651dbb065..b7bab3f1d7 100644 --- a/website/plugins/remark-inject-example-headings.js +++ b/website/plugins/remark-inject-example-headings.js @@ -8,8 +8,8 @@ * path={frontMatter.examples + '/subfolder/main.py'} ← relative to frontmatter * path={'controls/material/some_group/subfolder/main.py'} ← absolute hardcoded * - * Set `display_title = false` in [tool.flet.metadata] to suppress injection - * for a specific example (use when the doc page has a hand-written heading). + * Add `displayTitle={false}` to a tag to suppress injection + * for that specific example (use when the doc page has a hand-written heading). */ const fs = require("fs"); @@ -121,12 +121,16 @@ module.exports = function remarkInjectExampleHeadings() { } if (!metaKey) continue; + const displayTitleAttr = node.attributes?.find((a) => a.name === "displayTitle"); + if (displayTitleAttr) { + const v = displayTitleAttr.value; + if (v?.type === "mdxJsxAttributeValueExpression" && v.value?.trim() === "false") continue; + } + const entry = metadata[metaKey]; const title = entry?.title; if (!title) continue; - if (entry.displayTitle === false) continue; - insertions.push({ index: i, title, docsIntro: entry?.docs_intro ?? null }); } From e1432dcfa3a12c0a471962ef8024a1486b12bb5d Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Tue, 2 Jun 2026 16:37:49 -0700 Subject: [PATCH 33/35] fix: correct broken scroll_to link in programmatic_scroll docs_intro Co-Authored-By: Claude Sonnet 4.6 --- .../controls/core/column/programmatic_scroll/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml index fc0981bb84..7aa6994cb6 100644 --- a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml +++ b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Layout/Column"] [tool.flet.metadata] title = "Scrolling programmatically" -docs_intro = "This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column:" +docs_intro = "This example shows how to use [`scroll_to()`](scrollablecontrol.md#flet.ScrollableControl.scroll_to) to programmatically scroll a column:" controls = ["Container", "Column", "Row", "Button", "Text"] layout_pattern = "control-panel" complexity = "basic" From d0f3a89c058c5857239a87f1c83ac91e579cc5ee Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Wed, 3 Jun 2026 10:05:40 -0700 Subject: [PATCH 34/35] fix: add .md extension to NavigationRail link in featured_views docs_intro Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/examples/apps/router/featured_views/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index a580095647..f295b1aa02 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Managed views — full app with NavigationRail" -docs_intro = "Complete app with [NavigationRail](../controls/navigationrail), stacked project views, and tabbed settings — all using `manage_views=True`." +docs_intro = "Complete app with [NavigationRail](../controls/navigationrail.md), stacked project views, and tabbed settings — all using `manage_views=True`." controls = ["View", "AppBar", "Column", "Row", "Container", "Button", "Switch", "TextField", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" From 924a7f113c985f0ffd97abbda867cf0709e9319b Mon Sep 17 00:00:00 2001 From: InesaFitsner Date: Wed, 3 Jun 2026 10:33:38 -0700 Subject: [PATCH 35/35] fix: correct NavigationRail link in featured_views docs_intro (folder, not flat file) Co-Authored-By: Claude Sonnet 4.6 --- sdk/python/examples/apps/router/featured_views/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index f295b1aa02..e5b420a547 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -15,7 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Managed views — full app with NavigationRail" -docs_intro = "Complete app with [NavigationRail](../controls/navigationrail.md), stacked project views, and tabbed settings — all using `manage_views=True`." +docs_intro = "Complete app with [NavigationRail](navigationrail/index.md), stacked project views, and tabbed settings — all using `manage_views=True`." controls = ["View", "AppBar", "Column", "Row", "Container", "Button", "Switch", "TextField", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate"