Skip to content

Commit bd5e16f

Browse files
docs: add release migration-guide page for breaking changes and deprecations (#6517)
* docs: add 0.85 release migration pages * docs: add release migration guides * docs: refine release change guides * docs: group release guide pages by version * update PR template * apply review suggestions * add previous releases * fix #6510 * docs: update link to color cookbook in types.py * docs: add Declarative dialogs to the sidebar --------- Co-authored-by: Feodor Fitsner <feodor@appveyor.com>
1 parent d61ad3b commit bd5e16f

25 files changed

Lines changed: 793 additions & 79 deletions

.agents/skills/flet-deprecation/SKILL.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,36 @@ For supported patterns, docs should auto-render:
166166
Do not duplicate with manual deprecation admonitions in docstrings unless there
167167
is a special case not covered by the extension.
168168

169+
## Release Docs Updates
170+
171+
When adding a user-visible deprecation, also update the release docs in the
172+
same change. These pages are the canonical upgrade path, not a separate
173+
`Deprecations` page.
174+
175+
1. Create or update a migration guide under
176+
`website/docs/release/breaking-changes/`.
177+
- Group closely related deprecations into one page, especially APIs from the
178+
same class/control or the same PR. For example, `DragTargetEvent.x`,
179+
`DragTargetEvent.y`, and `DragTargetEvent.offset` belong in one
180+
coordinate-fields guide.
181+
- Use this page shape: title, `:::note` accuracy callout,
182+
`Summary`, `Context`, `Migration guide`, `Timeline`, and `References`.
183+
- Keep one-off replacements in prose. Use a table only when the page maps
184+
many removed/deprecated APIs to replacements.
185+
- In `References`, link relevant API docs, relevant GitHub issue/PR links,
186+
and release notes entry for that release.
187+
2. Add the guide to
188+
`website/docs/release/breaking-changes/index.md` under the release's
189+
`Deprecations` subsection.
190+
3. Add the guide to `website/sidebars.yml` under:
191+
`Stay up to date` -> `Breaking changes and deprecations` -> `vX.Y.Z`.
192+
This keeps individual guide pages in the docs sidebar while grouping them by
193+
release.
194+
4. Update `website/docs/release/release-notes.md` so the release links to the
195+
combined `Breaking changes and deprecations` section.
196+
5. Run `cd website && yarn crocodocs:generate` after sidebar
197+
edits, then run `cd website && yarn build`.
198+
169199
## Testing Guidance
170200

171201
Do not add one-off tests for every API that gets deprecated when it uses an

.agents/skills/prepare-flet-release/SKILL.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ That skill is the source of truth for item wording, scope selection, and what sh
3434
* If a related issue or PR is missing the `{version}` milestone, update the milestone on GitHub and keep the link in the changelog.
3535
* When selecting candidates for `packages/flet/CHANGELOG.md`, prefer items with meaningful Flutter-side impact.
3636
* When selecting candidates for `sdk/python/packages/*/CHANGELOG.md`, prefer published Python-facing changes; do not include extension-internal Flutter implementation work unless it materially changes user-visible Python behavior.
37+
* If the release includes breaking changes, API removals, or deprecations,
38+
update `website/docs/release/release-notes.md` and
39+
`website/docs/release/breaking-changes/index.md`.
40+
* Use [`flet-deprecation`](../flet-deprecation/SKILL.md) for deprecation
41+
guide requirements and sidebar placement.
42+
* Group related deprecations into one migration guide page where possible,
43+
and add guide pages under the release version in `website/sidebars.yml`.
3744
* Scan all changelogs for `Unreleased` sections, not only the root ones:
3845
* `/CHANGELOG.md`
3946
* `packages/flet/CHANGELOG.md`
@@ -42,9 +49,14 @@ That skill is the source of truth for item wording, scope selection, and what sh
4249
`rg -n "^##\\s*\\[?Unreleased\\]?|^##\\s*Unreleased" -S CHANGELOG.md packages/flet/CHANGELOG.md sdk/python/packages/*/CHANGELOG.md`
4350
* If any changelog has an `Unreleased` section, convert that section into the new release section (`## {new_version}`), preserving and re-sorting its items. Do not leave duplicate release content in both `Unreleased` and `{new_version}`.
4451
This conversion must be done for every matched changelog from the scan above.
45-
* Sort items in changelogs as following:
52+
* Sort items in changelogs as follows, omitting empty sections:
4653
* New features
4754
* Improvements
55+
* Breaking changes
56+
* Deprecations
4857
* Bug fixes
58+
* Documentation
4959
* Other changes (chore, refactor, etc.)
60+
Put removals of previously deprecated APIs under `Breaking changes`, and
61+
keep newly deprecated-but-still-working APIs under `Deprecations`.
5062
* Templates are in `sdk/python/templates/` and automatically packaged as zip artifacts with the GitHub Release. No manual branch creation in external repos is needed.

.github/pull_request_template.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
## Description
22

3-
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->
3+
<!-- Please include a summary of the change, relevant motivation, and context. -->
44

55
<!-- If this PR fixes an open issue, please link to the issue here. Ex: Fixes #4562 -->
66

7-
## Test Code
7+
## Test code
88

99
```python
10-
# Test code for the review of this PR
10+
# Minimal test/reproduction code for reviewers, if applicable.
1111
```
1212

1313
## Type of change
1414

15-
<!-- Please delete options that are not relevant. -->
15+
<!-- select only options relevant to your PR -->
1616

1717
- [ ] Bug fix (non-breaking change which fixes an issue)
1818
- [ ] New feature (non-breaking change which adds functionality)
@@ -22,13 +22,14 @@
2222
## Checklist
2323

2424
- [ ] I signed the CLA.
25-
- [ ] My code follows the style guidelines of this project
26-
- [ ] I have performed a self-review of my own code
27-
- [ ] If this PR targets a `release/*` branch, I added a new record to the active root `CHANGELOG.md` section
28-
- [ ] I have commented my code, particularly in hard-to-understand areas
29-
- [ ] My changes generate no new warnings
30-
- [ ] New and existing tests pass locally with my changes
31-
- [ ] I have made corresponding changes to the [documentation](https://github.com/flet-dev/website) (if applicable)
25+
- [ ] I have performed a self-review of my own code.
26+
- [ ] My code follows the style guidelines of this project.
27+
- [ ] I have commented my code, particularly in hard-to-understand areas.
28+
- [ ] My changes generate no new warnings.
29+
- [ ] New and existing tests pass locally with my changes.
30+
- [ ] I have made corresponding documentation changes, if applicable.
31+
- [ ] I have added changelog entries for user-facing changes, if applicable.
32+
- [ ] I have updated release guide pages and `website/sidebars.yml` for breaking changes, removals, and deprecations, if applicable.
3233

3334
## Screenshots
3435

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@
3333
* Add `issues` property to `CodeEditor` (along with `Issue` and `IssueType` types) for displaying code analysis error markers in the gutter, with analysis performed on the Python side ([#6407](https://github.com/flet-dev/flet/pull/6407)) by @FeodorFitsner.
3434
* Add `Page.pop_views_until()` to pop multiple views and return a result to the destination view ([#6326](https://github.com/flet-dev/flet/issues/6326), [#6347](https://github.com/flet-dev/flet/pull/6347)) by @brunobrown.
3535
* Make `NavigationDrawerDestination.label` accept custom controls and add `NavigationDrawerTheme.icon_theme` ([#6379](https://github.com/flet-dev/flet/issues/6379), [#6395](https://github.com/flet-dev/flet/pull/6395)) by @ndonkoHenri.
36-
* Add `local_position` and `global_position` to `DragTargetEvent`, deprecating `x`, `y`, and `offset` ([#6387](https://github.com/flet-dev/flet/issues/6387), [#6401](https://github.com/flet-dev/flet/pull/6401)) by @ndonkoHenri.
36+
* Add `local_position` and `global_position` to `DragTargetEvent` for target-relative and global pointer coordinates ([#6387](https://github.com/flet-dev/flet/issues/6387), [#6401](https://github.com/flet-dev/flet/pull/6401)) by @ndonkoHenri.
3737
* Added PCM16 streaming to `AudioRecorder`, including `on_stream` chunks and direct upload support via `AudioRecorderUploadSettings` ([#5858](https://github.com/flet-dev/flet/issues/5858), [#6423](https://github.com/flet-dev/flet/pull/6423)) by @ndonkoHenri.
3838
* Add `Page.theme_animation_style` for customizing the duration and curve of the theme cross-fade between `theme` and `dark_theme` (or disabling it with `AnimationStyle.no_animation()`), exposing Flutter's `MaterialApp.themeAnimationStyle` ([#6476](https://github.com/flet-dev/flet/pull/6476)) by @FeodorFitsner.
3939

40-
### Improvements
40+
### Breaking changes
41+
42+
* Remove deprecated module-level `margin`, `padding`, `border`, and `border_radius` helper functions (`all()`, `symmetric()`, `only()`, `horizontal()`, `vertical()`) in favor of the corresponding `Margin`, `Padding`, `Border`, and `BorderRadius` classmethods ([#6425](https://github.com/flet-dev/flet/pull/6425)) by @ndonkoHenri.
43+
44+
### Deprecations
45+
46+
* Deprecate `DragTargetEvent.x`, `DragTargetEvent.y`, and `DragTargetEvent.offset`; use `local_position` for target-relative coordinates or `global_position` for global coordinates instead. These APIs are scheduled for removal in `0.88.0` ([#6387](https://github.com/flet-dev/flet/issues/6387), [#6401](https://github.com/flet-dev/flet/pull/6401)) by @ndonkoHenri.
47+
* Deprecate `Video.show_controls`; set `Video.controls` to `None` to hide controls. This API is scheduled for removal in `0.88.0` ([#6463](https://github.com/flet-dev/flet/pull/6463)) by @ndonkoHenri.
48+
* Deprecate `Video.playlist_add()` and `Video.playlist_remove()`; mutate `Video.playlist` directly with list methods such as `append()` and `pop()`. These APIs are scheduled for removal in `0.88.0` ([#6463](https://github.com/flet-dev/flet/pull/6463)) by @ndonkoHenri.
4149

4250
### Bug fixes
4351

@@ -72,7 +80,6 @@
7280
### Other changes
7381

7482
* Add a declarative `ReorderableListView` app example showing add, remove, and reorder flows with stable item identity ([#6374](https://github.com/flet-dev/flet/pull/6374)) by @FeodorFitsner.
75-
* Remove deprecated module-level `margin`, `padding`, `border`, and `border_radius` helpers (`all()`, `symmetric()`, `only()`, `horizontal()`, `vertical()`) in favor of the corresponding `Margin`, `Padding`, `Border`, and `BorderRadius` classmethods ([#6425](https://github.com/flet-dev/flet/pull/6425)) by @ndonkoHenri.
7683
* Centralize Linux apt dependencies in `flet.utils.linux_deps` and update CI workflows and publish docs to consume them dynamically ([#6357](https://github.com/flet-dev/flet/issues/6357), [#6383](https://github.com/flet-dev/flet/pull/6383)) by @ndonkoHenri.
7784
* Bump `serious_python` to `0.9.12` in the `flet build` template ([#6461](https://github.com/flet-dev/flet/pull/6461)) by @FeodorFitsner.
7885

packages/flet/CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ _No changes in the `flet` Dart package; version bumped for release coordination
1212

1313
* Add `parseControlWidget()` and `parseControlWidgets()` utilities for converting Flet controls in protocol values to Flutter widgets ([#6463](https://github.com/flet-dev/flet/pull/6463)) by @ndonkoHenri.
1414

15-
### Improvements
16-
1715
### Bug fixes
1816

1917
* Preserve viewport minimum constraints for short scrollable `View`, `Column`, and `Row` content so main-axis alignment still applies ([#6446](https://github.com/flet-dev/flet/issues/6446), [#6450](https://github.com/flet-dev/flet/pull/6450)) by @ndonkoHenri.
@@ -23,8 +21,6 @@ _No changes in the `flet` Dart package; version bumped for release coordination
2321
* Resolve absolute-path `src` (e.g. `Image(src="/images/foo.svg")`) against `assets_dir` on web so embedded apps mounted at non-root URLs load assets correctly, pass `data:`/`blob:` URIs through unchanged, preserve origin-relative semantics when `assets_dir` is unset, and add a `window.flet.assetsDir` JS-interop bridge so embedding hosts can supply `assets_dir` to the top-level `FletApp` ([#6470](https://github.com/flet-dev/flet/pull/6470)) by @FeodorFitsner.
2422
* Coerce `double` to `int` in `parseInt` so float values passed into `int`-typed protocol fields (e.g. `Duration(seconds: 2.0)`) decode correctly instead of falling back to the default ([#6478](https://github.com/flet-dev/flet/issues/6478), [#6480](https://github.com/flet-dev/flet/pull/6480)) by @FeodorFitsner.
2523

26-
### Other changes
27-
2824
## 0.84.0
2925

3026
### Improvements

sdk/python/packages/flet-video/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515

1616
### Changed
1717

18-
- `Video.playlist` can now be mutated directly for playlist add and remove operations; `playlist_add()` and `playlist_remove()` are deprecated ([#6463](https://github.com/flet-dev/flet/pull/6463)).
18+
- `Video.playlist` can now be mutated directly for playlist add and remove operations ([#6463](https://github.com/flet-dev/flet/pull/6463)).
19+
20+
### Deprecated
21+
22+
- `Video.playlist_add()` and `Video.playlist_remove()` are deprecated; mutate `Video.playlist` directly with list methods such as `append()` and `pop()` ([#6463](https://github.com/flet-dev/flet/pull/6463)).
1923
- `Video.show_controls` is deprecated; set `Video.controls` to `None` to hide controls ([#6463](https://github.com/flet-dev/flet/pull/6463)).
2024

2125
### Fixed

sdk/python/packages/flet/src/flet/controls/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def __post_init__(self) -> None:
13071307
- a material color from the :class:`~flet.Colors` enum,
13081308
- or a Cupertino color from the :class:`~flet.CupertinoColors` enum.
13091309
1310-
More information [here](https://flet.dev/docs/cookbook/cookbook/cookbook/colors).
1310+
More information [here](https://flet.dev/docs/cookbook/colors).
13111311
"""
13121312

13131313
# Icons

tools/crocodocs/src/crocodocs/partials.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ def _render_pypi_partial() -> str:
151151
"""Fetch and render the PyPI package index, filtering non-flet packages and converting admonition syntax to MDX format."""
152152
from .pypi_index import render_pypi_index
153153

154+
if os.environ.get("FLET_DOCS_FAST"):
155+
return "\n".join(
156+
[
157+
":::warning",
158+
"The PyPI package index is skipped while `FLET_DOCS_FAST` is set.",
159+
"Run the full docs build to refresh this list.",
160+
":::",
161+
"",
162+
]
163+
)
164+
154165
rendered = render_pypi_index(
155166
base_url="https://pypi.flet.dev/",
156167
timeout_s=20.0,

tools/crocodocs/src/crocodocs/pypi_index.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@ def render_pypi_index(
506506
[
507507
"!!! warning",
508508
f" Failed to fetch package index from `{base_url}`.",
509+
" ",
510+
" ```text",
509511
f" {message}",
512+
" ```",
510513
"",
511514
]
512515
)

website/blog/2022-06-02-introducing-flet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Flet is a framework for building real-time web, desktop and mobile applications
1111

1212
No more complex architecture with JavaScript frontend, REST API backend, database, cache, etc. With Flet you just write a monolith stateful app in Python only and get multi-user, realtime Single-Page Application (SPA) or a mobile app.
1313

14+
{/* truncate */}
15+
1416
To start developing with Flet, you just need your favorite IDE or text editor. No SDKs, no thousands of dependencies, no complex tooling - Flet has built-in web server with assets hosting and desktop clients.
1517

1618
Flet UI is built with [Flutter](https://flutter.dev), so your app looks professional and can be delivered to any platform. Flet simplifies Flutter model by combining smaller "widgets" into ready-to-use "controls" with imperative programming model.

0 commit comments

Comments
 (0)