Skip to content

Implement system menu bar support#97408

Closed
gspencergoog wants to merge 1 commit intoflutter:masterfrom
gspencergoog:menu_bar
Closed

Implement system menu bar support#97408
gspencergoog wants to merge 1 commit intoflutter:masterfrom
gspencergoog:menu_bar

Conversation

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Jan 28, 2022

Description

This implements a prototype of MenuBar widgets that can both render a Material menu bar, and speak to a bundled plugin on the engine that will create and manage system generated menu bars on macOS, Windows, and Linux (a.k.a. PlatformMenuBar, submitted already).

This implementation of the MenuBar uses a MenuBarController to manager most of the communincation between widgets that need to occur to implement the menu bar. The MenuBar uses a hierarchy of MenuBarItem widgets which extend MenuItem so that they are also useful for configuring a platform provided menu.

For the Material MenuBar, MenuBarItem widgets have an internal _MenuNode assigned by looking for a wrapping _MenuNodeWrapper, and then they register attributes with that node (things like the focus node associated with the button, and the menu builder function for the submenus).

Related Issues

Tests

  • Many tests for all of the MenuBar operations and configuration.

Design Doc

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jan 28, 2022
@gspencergoog gspencergoog force-pushed the menu_bar branch 2 times, most recently from e348136 to ee1b4f2 Compare January 28, 2022 01:04
@gspencergoog gspencergoog force-pushed the menu_bar branch 12 times, most recently from 3e8f18b to 3dd2c1a Compare February 1, 2022 18:15
@gspencergoog gspencergoog force-pushed the menu_bar branch 5 times, most recently from 1331e21 to ccac0ae Compare February 5, 2022 03:18
@gspencergoog gspencergoog added the a: desktop Running on desktop label Feb 15, 2022
@skia-gold
Copy link

Gold has detected about 38 new digest(s) on patchset 15.
View them at https://flutter-gold.skia.org/cl/github/97408

@gspencergoog gspencergoog force-pushed the menu_bar branch 2 times, most recently from bf221e8 to 064e773 Compare February 18, 2022 03:12
@gspencergoog gspencergoog force-pushed the menu_bar branch 8 times, most recently from 52168c3 to 87d1f2c Compare March 17, 2022 02:56
@vinisoaresr
Copy link

Hi,
Any progress on this? Just wanted to say I find this to be very useful.
Thanks for all your hard work on this!

@gspencergoog
Copy link
Contributor Author

Yes, @vinisoaresr, I expect this feature to land within the next couple of weeks.

@gspencergoog gspencergoog force-pushed the menu_bar branch 4 times, most recently from 5b47c83 to 165eefe Compare March 30, 2022 22:37
@gspencergoog gspencergoog force-pushed the menu_bar branch 2 times, most recently from 35ad8c5 to 7b27908 Compare April 12, 2022 22:08
@gspencergoog gspencergoog force-pushed the menu_bar branch 6 times, most recently from f9deb9d to 4beb412 Compare April 22, 2022 23:05
@gspencergoog gspencergoog force-pushed the menu_bar branch 4 times, most recently from 85aef31 to 49cefdd Compare May 9, 2022 16:59
@gspencergoog
Copy link
Contributor Author

Closing this to start a new one without all the history.

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

Labels

a: desktop Running on desktop c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: focus Focus traversal, gaining or losing focus f: gestures flutter/packages/flutter/gestures repository. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants