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

Floating Action Button Location (FloatingActionButtonLocation) dont't work in v0.23 #3485

Closed
1 task done
azhago opened this issue Jun 19, 2024 · 3 comments · Fixed by #3496
Closed
1 task done

Floating Action Button Location (FloatingActionButtonLocation) dont't work in v0.23 #3485

azhago opened this issue Jun 19, 2024 · 3 comments · Fixed by #3496
Assignees
Labels
status: awaiting response Further information is requested

Comments

@azhago
Copy link
Contributor

azhago commented Jun 19, 2024

Duplicate Check

Describe the bug

Hi,
Just upgraded in v0.23:
floating_action_button_location param in page or view do not work anymore, floating ction button are always at bottom right of the page/view.

Code

def main(page: ft.Page) -> None:

    floating_button = ft.FloatingActionButton(
        icon=ft.icons.ADD,
        tooltip="Add",
        on_click=lambda _: print("Floating action button clicked"),
    )

    page.add(ft.Text("Floating action button location"))
    page.add(ft.Text("V23"))

    page.window_width = 500
    page.window_height = 500
    page.vertical_alignment = ft.MainAxisAlignment.START
    page.horizontal_alignment = ft.CrossAxisAlignment.START

    page.floating_action_button = floating_button
    page.floating_action_button_location = ft.FloatingActionButtonLocation.START_FLOAT
    page.update()

    print(page._get_attr("floatingActionButtonLocation"))

if __name__ == "__main__":
    ft.app(target=main)

To reproduce

Run the previous code in v0.23.0

Expected behavior

No response

Screenshots

v0.23.0
image
same code with v0.22.1
image

Operating System

Windows

Operating system details

windows 11

Flet version

0.23.0

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

No response

Additional details

No response

@ndonkoHenri ndonkoHenri added the bug: regression A feature that worked correctly doesn't anymore label Jun 19, 2024
@ndonkoHenri ndonkoHenri self-assigned this Jun 19, 2024
@ndonkoHenri
Copy link
Contributor

ndonkoHenri commented Jun 19, 2024

I get this with Flet v0.23.0:
image

@ndonkoHenri ndonkoHenri added status: awaiting response Further information is requested and removed bug: regression A feature that worked correctly doesn't anymore labels Jun 19, 2024
@azhago
Copy link
Contributor Author

azhago commented Jun 19, 2024

I think it's platform dependant.
I recreate a brand new venv and install flet from scratch:

  • I have this problem under windows 11 ( (floating action button on the default side)

  • Making an exe with flet pack : same probleme

  • It work fine in web_browser (floating action button on the left side)
    I can't test under mac or linux

FeodorFitsner added a commit that referenced this issue Jun 19, 2024
* Fix parseFloatingActionButtonLocation to work on desktop

Fix #3485

* Update changelog

* make fabLocations const

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: TheEthicalBoy <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Flet Development Jun 19, 2024
@azhago
Copy link
Contributor Author

azhago commented Jun 20, 2024

Wow, so fast!
Thanks for your great work 👍

zrr1999 pushed a commit to zrr1999/flet that referenced this issue Jul 17, 2024
…v#3496)

* Fix parseFloatingActionButtonLocation to work on desktop

Fix flet-dev#3485

* Update changelog

* make fabLocations const

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: TheEthicalBoy <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting response Further information is requested
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants