Skip to content

Conversation

@ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Nov 9, 2025

Fix #5127

Example

import flet as ft


def main(page: ft.Page):
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

    def handle_switch_change(e: ft.Event[ft.Switch]):
        sheet.fullscreen = e.control.value

    sheet = ft.BottomSheet(
        fullscreen=True,
        show_drag_handle=True,
        content=ft.Container(
            padding=ft.Padding.all(10),
            content=ft.Column(
                horizontal_alignment=ft.CrossAxisAlignment.CENTER,
                controls=[
                    ft.Text("This is bottom sheet's content!"),
                    ft.Button("Close bottom sheet", on_click=lambda: page.pop_dialog()),
                ],
            ),
        ),
    )

    page.add(
        ft.Button(
            content="Display bottom sheet",
            on_click=lambda e: page.show_dialog(sheet),
        ),
        ft.Switch(value=True, label="Fullscreen", on_change=handle_switch_change),
    )


if __name__ == "__main__":
    ft.run(main)
import flet as ft


async def main(page: ft.Page):
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
    page.spacing = 20

    def handle_progress_change(e: ft.Event[ft.Slider]):
        indicator.progress = e.control.value

    page.add(
        indicator := ft.CupertinoActivityIndicator(progress=1.0, radius=40),
        ft.Slider(
            min=0.0,
            value=indicator.progress,
            max=1.0,
            divisions=10,
            round=1,
            label="Progress = {value}",
            width=400,
            on_change=handle_progress_change,
        ),
    )


ft.run(main)

Summary by Sourcery

Enable full-height BottomSheet and partial spinner control in CupertinoActivityIndicator, harmonize related property names, and refresh docs, examples, and tests accordingly

New Features:

  • Add fullscreen parameter to BottomSheet to allow expanding it to full window height
  • Add progress parameter to CupertinoActivityIndicator for controlling spinner ticks display

Enhancements:

  • Rename BottomSheet.scroll_controlled to scrollable and enable_drag to draggable
  • Standardize entry_mode property naming across DatePicker and DateRangePicker
  • Add validation for CupertinoActivityIndicator.progress bounds

Documentation:

  • Add fullscreen bottom sheet and activity indicator progress examples to documentation

Tests:

  • Add integration tests for CupertinoActivityIndicator basic and progress modes

@ndonkoHenri ndonkoHenri requested a review from Copilot November 9, 2025 14:58
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.

We've reviewed this pull request using the Sourcery rules engine

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors control properties for better clarity and adds new features to several controls. The changes include renaming properties to be more concise and intuitive, expanding BottomSheet capabilities, and adding progress tracking to CupertinoActivityIndicator.

  • Renamed date_picker_entry_mode to entry_mode in DatePicker and DateRangePicker
  • Renamed enable_drag to draggable and scroll_controlled to scrollable in BottomSheet
  • Added fullscreen property to BottomSheet for filling the entire page
  • Added progress property to CupertinoActivityIndicator for partial reveal functionality
  • Made DatePickerEntryModeChangeEvent.entry_mode non-optional for type safety

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/python/packages/flet/src/flet/controls/material/date_range_picker.py Renamed date_picker_entry_mode to entry_mode and updated documentation references
sdk/python/packages/flet/src/flet/controls/material/date_picker.py Renamed date_picker_entry_mode to entry_mode, made event field non-optional, updated documentation
sdk/python/packages/flet/src/flet/controls/material/bottom_sheet.py Renamed properties, added fullscreen feature, improved documentation with example formatting
sdk/python/packages/flet/src/flet/controls/cupertino/cupertino_activity_indicator.py Added progress property with validation and updated documentation structure
sdk/python/packages/flet/integration_tests/controls/material/test_date_range_picker.py Updated test to use new entry_mode property name
sdk/python/packages/flet/integration_tests/controls/cupertino/test_cupertino_activity_indicator.py Added tests for basic and progress functionality
sdk/python/packages/flet/integration_tests/controls/cupertino/golden/macos/cupertino_activity_indicator/progress.png Added golden test image for progress feature
sdk/python/packages/flet/integration_tests/controls/cupertino/golden/macos/cupertino_activity_indicator/basic.png Added golden test image for basic functionality
sdk/python/packages/flet/docs/controls/bottomsheet.md Added fullscreen example section to documentation
sdk/python/examples/controls/date_range_picker/basic.py Updated type annotation for dismissal handler
sdk/python/examples/controls/cupertino_activity_indicator/progress.py Added example demonstrating progress property with slider control
sdk/python/examples/controls/bottom_sheet/fullscreen.py Added example demonstrating fullscreen bottom sheet feature
sdk/python/examples/controls/bottom_sheet/basic.py Removed redundant overlay.append, added if name guard
packages/flet/lib/src/controls/date_range_picker.dart Updated property name from date_picker_entry_mode to entry_mode
packages/flet/lib/src/controls/date_picker.dart Updated property name from date_picker_entry_mode to entry_mode
packages/flet/lib/src/controls/cupertino_activity_indicator.dart Implemented progress property with conditional rendering logic
packages/flet/lib/src/controls/bottom_sheet.dart Implemented renamed properties and fullscreen functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 9, 2025

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5389528
Status: ✅  Deploy successful!
Preview URL: https://add1a44b.flet-docs.pages.dev
Branch Preview URL: https://fullscreen-bottom-sheet.flet-docs.pages.dev

View logs

ndonkoHenri and others added 3 commits November 9, 2025 16:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@FeodorFitsner
Copy link
Contributor

Additional notes:

  1. Update from main to fix markdown integration test.
  2. Add integration test for BottomSheet.fullscreen property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bottom sheet should have height feature

3 participants