Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flet v0.23 Post Fixes - Part 2 #3507

Merged
merged 6 commits into from
Jun 24, 2024
Merged

Flet v0.23 Post Fixes - Part 2 #3507

merged 6 commits into from
Jun 24, 2024

Conversation

ndonkoHenri
Copy link
Collaborator

@ndonkoHenri ndonkoHenri commented Jun 21, 2024

Summary by Sourcery

This pull request addresses a bug fix for the slider component's default value handling and enhances the WindowEventType enumeration by adding 'hide' and 'show' event types.

  • Bug Fixes:
    • Fixed the default value of the slider to use the minimum value if specified, otherwise default to 0.
  • Enhancements:
    • Added 'hide' and 'show' event types to the WindowEventType enumeration.

Copy link
Contributor

sourcery-ai bot commented Jun 21, 2024

Reviewer's Guide by Sourcery

This pull request includes two main changes: updating the default value logic for the 'value' property in the slider component and adding new event types ('HIDE' and 'SHOW') to the 'WindowEventType' enum. The slider's 'value' property now defaults to 'self.min' or 0, ensuring it respects the minimum value set. The 'WindowEventType' enum has been extended to support additional window events, enhancing the event handling capabilities.

File-Level Changes

Files Changes
sdk/python/packages/flet-core/src/flet_core/slider.py
sdk/python/packages/flet-core/src/flet_core/types.py
Updated the slider default value logic and extended the WindowEventType enum with new events.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ndonkoHenri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

…_update method

- Corrected isinstance check in SnackBar.before_update to use a tuple of types instead of Union, resolving TypeError: "Subscripted generics cannot be used with class and instance checks".
@ndonkoHenri ndonkoHenri linked an issue Jun 21, 2024 that may be closed by this pull request
1 task
@ndonkoHenri ndonkoHenri linked an issue Jun 22, 2024 that may be closed by this pull request
1 task
@FeodorFitsner FeodorFitsner merged commit acd2c60 into main Jun 24, 2024
2 checks passed
@ndonkoHenri ndonkoHenri deleted the fixes-part-2 branch July 2, 2024 14:36
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* Fix flet-dev#3503: `Slider.value` defaults to `min`

* Fix flet-dev#3505: add "hide" and "show" to  WindowEventType enum

* Fix flet-dev#3499: TypeError raised for isinstance check with Union in before_update method

- Corrected isinstance check in SnackBar.before_update to use a tuple of types instead of Union, resolving TypeError: "Subscripted generics cannot be used with class and instance checks".

* Fix `Page.open()` breaking after multiple calls

* Fix flet-dev#3516: delete Page.window.on_resize | deprecate Page.on_resize in favor of Page.on_resized

* Page: Typo in on_resized setter decorator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants