fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
24.99k stars 1.39k forks source link

Full mobile support for the web driver and desktop driver. #2739

Open Bluebugs opened 2 years ago

Bluebugs commented 2 years ago

Is your feature request related to a problem? Please describe:

The current mobile driver handle menu directly with a "burger" menu that is not exposed to other driver. The web driver is able to work on both a mobile and a desktop, but as the driver is build on top of the desktop driver, it doesn't have that capability (to automatically switch to a "burger" menu on mobile).

Is it possible to construct a solution with the existing API?

Ideally it should just be a driver work for the menu API.

Describe the solution you'd like to see:

High level idea would be to move the "burger" menu code to a general purpose helper code that can then be used when necessary by each driver.

andydotxyz commented 2 years ago

I think this needs to split in two. The mobile setup for web is going to be required at this time. However a "expand to desktop" feature of mobile is not yet part of our capability so could be delayed / carefully designed.

Bluebugs commented 2 years ago

I kind of think that the implementation is going to enable both at the same time. As the web rely on the glfw code, as long as we enable the "burger" menu in the glfw driver when IsMobile return true this would full fill this task.

A follow up task would be on how to change IsMobile on Linux to detect when it is run on a PinePhone for example. And another follow up would be to make IsMobile a dynamic things. Would that work for you @andydotxyz ?

andydotxyz commented 2 years ago

Hmm, I guess what I mean is:

Also for the latte we need to change how IsMobile is used - if you want desktop windows and mobile windows then we may have to move this away from a device flag, even if it is dynamic?

In my mind the latter of the two items above is a much larger task than the first.

Bluebugs commented 2 years ago

Agreed and I don't think this issue should be about the second part just the first one.

andydotxyz commented 2 years ago

I have accordingly removed "In the same way, with Linux phone, we are going to have app that can run with the same binary on desktop and mobile. So it would be nice to have the "burger" menu become a more generic capability for all drivers." from the issue description. In the current iteration Linux phone is "mobile" target, so we can work in the future to make the mobile becomes desktop feature as agreed.

Bluebugs commented 2 years ago

I forgot about the keyboard issue, but we need to implement something that would popup a virtual keyboard when selecting an entry, something like: https://github.com/dantasulisses/WebMobileInputFix could help.

andydotxyz commented 7 months ago

Moving to the "F" release as part of "mobile web" support