Skip to content

☂️ Proposal: desktop context menu fidelity #74255

Description

@justinmc

The desktop text selection toolbars, as introduced in #73882 and #74286, have major limitations that make them not as good as native. We should either find a way to use the native context menus, or we should work to fix each of these problems.

  • We can't draw the menu outside of the current window. Also, the menu can't receive mouse events (like hover) unless the current menu is focused.
  • The only buttons available are the default mobile buttons (cut/copy/paste/select all). We should support all of the same buttons that display natively.
  • It should be possible for Flutter devs to customize the menu.
  • The native Mac menu has a flashing animation when clicked.
  • Submenus should be possible and easy to implement.
  • Currently, only EditableText widgets can show the menu. Right-clicking elsewhere doesn't show it. Fixing this probably requires refactoring TextSelectionControls to work with both the existing setup and menus (like showMenu).
  • Menu items that are wider than the default width are ellided, but on native the menu grows to accommodate them.
  • On Windows and Linux we use a Material-style menu, but we might want to build a menu that looks like the native one instead.
  • The native Mac context menu is slightly transparent and has a blur effect (screenshots below).

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jan 19, 2021
  2. pedromassangocode commented on Jan 21, 2021

    @pedromassangocode

    Will this focus on Desktop Mac only? Adding labels just in case.

  3. stuartmorgan-g commented on Jan 21, 2021

    @stuartmorgan-g
    Contributor
    • We should support all of the same buttons that display natively.

    Doing this without using native menus would be non-trivial, due to services

  4. shyndman commented on Jan 21, 2021

    @shyndman
    Contributor

    Something missing from that list: Menus on macOS have a subtle glass effect.

    Screen Shot 2021-01-21 at 8 58 04 AM

  5. justinmc commented on Jan 21, 2021

    @justinmc
    ContributorAuthor

    @pedromassango This includes the Windows and Linux context menus as well. I've updated the description to make that more clear and added the labels.

  6. justinmc commented on Jan 21, 2021

    @justinmc
    ContributorAuthor

    @shyndman What version of MacOS is that screenshot from? I've been meaning to upgrade to Big Sur to check if it still looks like that but I haven't gotten around to it.

  7. shyndman commented on Jan 21, 2021

    @shyndman
    Contributor

    Ah, good point. I'm still on Catalina too.

    Only presuming it's the same, since their design system appears to be leaning even further into glass effects.

  8. changed the title [-]Proposal: desktop context menu fidelity[/-] [+]☂️ Proposal: desktop context menu fidelity[/+] on Jan 21, 2021
  9. 17 remaining items

  10. added
    fyi-macosFor the attention of macOS platform team
    and removed on Jun 5, 2024
  11. flutter-triage-bot commented on Jun 7, 2024

    @flutter-triage-bot

    The triaged-desktop label is irrelevant if there is no team-desktop label or fyi-desktop label.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopa: fidelityMatching the OEM platforms betterc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.platform-linuxBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions