-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[feat] JS window menu API #6617
Comments
Is this being implemented or... |
No, backlog = to-do. |
I didn't see that, I was on mobile. (GitHub doesn't show Project updates on mobile, for whatever reason) |
Full control of the menu bar from JS would be a great feature to have. I'd like to be able to define the menu bar on the JS side and have it be a native menu for desktop but a DOM element if I'm building for the web. Something like: <Menu name="file">
<MenuItem name="Save As" id="save-as" />
<MenuSeparator />
<MenuItem name="Quite" id="quit" />
</Menu> the only missing piece is some way to set menus programmatically in Tauri. |
I don't think we will providing that, we will only provide a programmatic JS menu api (around native menu APIs) that will work only in tauri. A fallback to a JS implementation and DOM elements for web sounds cool but it will probably be an unofficial plugin. |
@amrbashir we'll certainly be building this ourselves, we just need some way of programmatically setting the menu (either from Rust or JS) to make it possible. |
Co-authored-by: Lucas Fernandes Nogueira <[email protected]> Co-authored-by: Fabian-Lars <[email protected]> Co-authored-by: Lucas Nogueira <[email protected]>
So, this will only be available in v2 ? |
yeah, only v2, we don't have enough resources to backport it to v1 and probably can't as it includes many breaking changes in the underlying windowing crate (tao) |
I see. Not pointing fingers, but when told that v1 would continue being maintained when v2 development started, I didn't think it meant bugfixes only. With all the good stuff only being added to v2, it's like v1 already outlived its usefulness and we're waiting again. |
v1 is still maintained and most of new features and bug fixes will be backported if possible without breaking changes, which is not the case for the new menu APIs (Rust and JS) |
Well, I'm unlucky then, because every feature I requested is only planned for v2. :/ |
We may have missed on backporting some features, get in touch with us on discord and we can discuss it if you feel some need to be backported |
Describe the problem
Window menu can't be set from JS.
Describe the solution you'd like
A JS window menu API would allow setting window menu from JS.
Alternatives considered
None
Additional context
None
Thanks
The text was updated successfully, but these errors were encountered: