Skip to content

Commit

Permalink
Flet v0.23.0 Post Fixes (flet-dev#3491)
Browse files Browse the repository at this point in the history
* make window and browser_context_menu private, and expose respective getters

* replace len(list(filter(...))) by any(...)

* fix ParamSpec import

* View.floating_action_button_location: conditionally use _set_attr

* Bump Flet version to 0.23.1

---------

Co-authored-by: Feodor Fitsner <[email protected]>
  • Loading branch information
2 people authored and zrr1999 committed Jul 17, 2024
1 parent 86a606b commit 9d70898
Show file tree
Hide file tree
Showing 31 changed files with 184 additions and 110 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Flet changelog

# 0.23.1

* FIX: View.floating_action_button_location: conditionally use _set_attr.
* FIX: Import `ParamSpec` from `typing` for Python >3.10.
* FIX: replace `len(list(filter(...)))` by `any(...)`.
* FIX: Make window and browser_context_menu private, and expose respective getters.

# 0.23.0

* NEW: `PermissionHandler` control ([#3276](https://github.com/flet-dev/flet/issues/3276))
Expand Down
26 changes: 13 additions & 13 deletions client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,77 +239,77 @@ packages:
path: "../packages/flet"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_audio:
dependency: "direct main"
description:
path: "../packages/flet_audio"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_audio_recorder:
dependency: "direct main"
description:
path: "../packages/flet_audio_recorder"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_flashlight:
dependency: "direct main"
description:
path: "../packages/flet_flashlight"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_geolocator:
dependency: "direct main"
description:
path: "../packages/flet_geolocator"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_lottie:
dependency: "direct main"
description:
path: "../packages/flet_lottie"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_map:
dependency: "direct main"
description:
path: "../packages/flet_map"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_permission_handler:
dependency: "direct main"
description:
path: "../packages/flet_permission_handler"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_rive:
dependency: "direct main"
description:
path: "../packages/flet_rive"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_video:
dependency: "direct main"
description:
path: "../packages/flet_video"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flet_webview:
dependency: "direct main"
description:
path: "../packages/flet_webview"
relative: true
source: path
version: "0.23.0"
version: "0.23.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -1434,10 +1434,10 @@ packages:
dependency: transitive
description:
name: window_manager
sha256: b3c895bdf936c77b83c5254bec2e6b3f066710c1f89c38b20b8acc382b525494
sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf"
url: "https://pub.dev"
source: hosted
version: "0.3.8"
version: "0.3.9"
window_to_front:
dependency: transitive
description:
Expand Down
7 changes: 7 additions & 0 deletions packages/flet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.23.1

* FIX: View.floating_action_button_location: conditionally use _set_attr.
* FIX: Import `ParamSpec` from `typing` for Python >3.10.
* FIX: replace `len(list(filter(...)))` by `any(...)`.
* FIX: Make window and browser_context_menu private, and expose respective getters.

# 0.23.0

* NEW: `PermissionHandler` control ([#3276](https://github.com/flet-dev/flet/issues/3276))
Expand Down
2 changes: 1 addition & 1 deletion packages/flet/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet
description: Write entire Flutter app in Python or add server-driven UI experience into existing Flutter app.
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet
version: 0.23.0
version: 0.23.1

# This package supports all platforms listed below.
platforms:
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio
description: Flet Audio control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_audio_recorder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio_recorder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio_recorder
description: Flet AudioRecorder control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio_recorder
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_flashlight/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

Initial release of the package.
2 changes: 1 addition & 1 deletion packages/flet_flashlight/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_flashlight
description: Flet Flashlight control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_flashlight
version: 0.23.0
version: 0.23.1


environment:
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_geolocator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

Initial release of the package.
2 changes: 1 addition & 1 deletion packages/flet_geolocator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_geolocator
description: Flet Geolocator control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_geolocator
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_lottie/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_lottie/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_lottie
description: Flet Lottie control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_lottie
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_map/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

Initial release of the package.
2 changes: 1 addition & 1 deletion packages/flet_map/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_map
description: Flet Map control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_map
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_permission_handler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

Initial release of the package.
2 changes: 1 addition & 1 deletion packages/flet_permission_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_permission_handler
description: Flet PermissionHandler control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_permission_handler
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_rive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_rive/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_rive
description: Flet Rive control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_rive
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_video/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_video
description: Flet Video control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_video
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_webview/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_webview/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_webview
description: Flet WebView control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_webview
version: 0.23.0
version: 0.23.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
5 changes: 5 additions & 0 deletions sdk/python/packages/flet-core/src/flet_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@
RouteChangeEvent,
ViewPopEvent,
context,
WindowEvent,
WindowResizeEvent,
Window,
WindowEventType,
BrowserContextMenu,
)
from flet_core.pagelet import Pagelet
from flet_core.painting import (
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/packages/flet-core/src/flet_core/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def _get_control_name(self):
def before_update(self):
super().before_update()
assert self.__content.visible, "content must be visible"
assert (
len(list(filter(lambda a: a.visible, self.__actions))) > 0
assert any(
a.visible for a in self.__actions
), "actions must contain at minimum one visible action Control"

self._set_attr_json("contentPadding", self.__content_padding)
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/packages/flet-core/src/flet_core/datatable.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def _get_control_name(self):

def before_update(self):
super().before_update()
assert (
len(list(filter(lambda cell: cell.visible, self.__cells))) > 0
assert any(
cell.visible for cell in self.__cells
), "cells must contain at minimum one visible DataCell"
self._set_attr_json("color", self.__color)

Expand Down
8 changes: 3 additions & 5 deletions sdk/python/packages/flet-core/src/flet_core/menu_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
@dataclass
class MenuStyle:
alignment: Optional[Alignment] = field(default=None)
bgcolor: Union[None, str, Dict[Union[str, ControlState], str]] = field(
default=None
)
bgcolor: Union[None, str, Dict[Union[str, ControlState], str]] = field(default=None)
shadow_color: Union[None, str, Dict[Union[str, ControlState], str]] = field(
default=None
)
Expand Down Expand Up @@ -95,8 +93,8 @@ def _get_control_name(self):

def before_update(self):
super().before_update()
assert (
len(list(filter(lambda c: c.visible, self.__controls))) > 0
assert any(
c.visible for c in self.__controls
), "MenuBar must have at minimum one visible control"
if self.__style is not None:
self.__style.side = self._wrap_attr_dict(self.__style.side)
Expand Down
Loading

0 comments on commit 9d70898

Please sign in to comment.