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

Missing default context menu buttons on each platform #107578

Open
justinmc opened this issue Jul 13, 2022 · 12 comments
Open

Missing default context menu buttons on each platform #107578

justinmc opened this issue Jul 13, 2022 · 12 comments
Labels
a: fidelity Matching the OEM platforms better a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@justinmc
Copy link
Contributor

justinmc commented Jul 13, 2022

By default, Flutter's text selection toolbar shows cut, copy, paste, and select all. However, on native platforms, other buttons appear by default.

Platform Screenshot Missing Related Work
Android Translate, Share, Web Search Share: #138728
Custom buttons: #139361
iOS Select, Replace, Translate, unit conversion Look up: #130532, flutter/engine#43308. Search web: flutter/engine#43324, #131898, Share: flutter/engine#44554
Linux Undo, Redo, Delete, Insert Emoji, Change Case
Mac Screen Shot 2022-08-08 at 4 00 28 PM Look Up "asdf", Translate "asdf", Search With Google, Share
Windows Undo, Delete, Right to left Reading order, Show Unicode control characters, Insert Unicode control character, Open IME, Reconversion, Search with Bing

Open questions

How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app? (edit: -> #107603)

Related

#82907

@justinmc justinmc added the a: text input Entering text in a text field or keyboard related problems label Jul 13, 2022
@justinmc justinmc changed the title Match the default native text selection toolbar buttons Some default buttons are missing from the text selection toolbars Jul 13, 2022
@HansMuller HansMuller added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jul 19, 2022
@osaxma
Copy link
Contributor

osaxma commented Jul 27, 2022

Hi @justinmc,

The ability to add custom buttons for app specific functionality should also be considered. For instance, Twitter has "mute" and "search" buttons which are app specific which can be seen when a text is selected. It'd be useful if the developer can add such buttons by providing a list of Strings and their respective callbacks.


By the way, the table is missing some buttons for iOS and Android:

  • For iOS, the following buttons are not mentioned: Replace, Lookup, Translate, and Share (they appear when text is selected)

  • For Android, "Web Search" isn't mentioned (Maybe it's not appearing in the screenshot because it's taken from within the browser)

@justinmc
Copy link
Contributor Author

justinmc commented Aug 8, 2022

@osaxma You're in luck for custom app-specific context menu buttons, I have a PR open for that right now: #107193

And thank you for calling out those missing buttons! I've updated the table to include them.

@bksubhuti
Copy link

we are dealing with this now as well.
One monk showed me what we are missing as pictured in op
Since we are vocabulary intensive reading app, we would also like anki.
(tipitaka pali reader)

@bar4488
Copy link

bar4488 commented Jan 24, 2023

The lack of buttons in text selection is critical for native like experience. In android, developers can add floating text selection toolbar actions that will show in every native app through the ACTION_PROCESS_TEXT intent. We should show these options in flutter apps as well.

@greggman
Copy link

greggman commented Feb 9, 2023

Other standard iOS options

  • search web
  • speak
  • spell
  • add to user dictionary...

The bigger issue here is not just to add the buttons. It's that the system itself provides them. If iOS 18 or Android 14 adds "ask ChatGPT" and "Generate AI video" and "find related photos" as standard options, it should not require every Flutter app in existance to rebuild with a newer version of flutter and re-go through the app-store approval process for that option to appear on the context menu.

@gnprice
Copy link
Member

gnprice commented Feb 15, 2023

As an Android user I find the "Translate" button in particular to be extremely useful, any time I'm reading text in a language other than English. (Even if I know the language moderately well, I'll use it regularly for words and phrases I don't understand.) When it's missing in a given app, if it's any app that's heavy on reading text, I'll notice and it's disappointing.

So as a developer I imagine many of my users value it too.

I believe the "Translate" button is actually another example in this category, though (aka #107603):

How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app?

In android, developers can add floating text selection toolbar actions that will show in every native app through the ACTION_PROCESS_TEXT intent. We should show these options in flutter apps as well.

in that I believe it's added by the Google Translate app. (Other translation apps like DeepL add their own text selection buttons, too.) So supporting this category would be especially appreciated.

@gnprice gnprice added the a: fidelity Matching the OEM platforms better label May 17, 2023
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 8, 2023
@gnprice gnprice added team-framework Owned by Framework team triaged-framework Triaged by Framework team and removed team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 18, 2023
@flutter-triage-bot flutter-triage-bot bot removed the triaged-framework Triaged by Framework team label Jul 19, 2023
@flutter-triage-bot
Copy link

This issue is missing a priority label. Please set a priority label when adding the triaged-framework label.

@justinmc justinmc added fyi-android For the attention of Android platform team fyi-ios For the attention of iOS platform team labels Jul 21, 2023
@goderbauer goderbauer added team-design Owned by Design Languages team and removed team-framework Owned by Framework team labels Jul 25, 2023
@gmackall gmackall added the triaged-android Triaged by Android platform team label Jul 27, 2023
@flutter-triage-bot flutter-triage-bot bot removed fyi-android For the attention of Android platform team triaged-android Triaged by Android platform team labels Jul 27, 2023
@mossmana
Copy link
Contributor

@justinmc Should this issue be considered an umbrella issue or moved to a project? I don't know that it is clear which team should own it.

@justinmc
Copy link
Contributor Author

justinmc commented Aug 2, 2023

@mossmana I'm fine with design/text-input owning it. I think I would keep it as an umbrella issue. I'll update the title and add links to relevant PRs.

@justinmc justinmc changed the title Some default buttons are missing from the text selection toolbars Missing default context menu buttons on each platform Aug 2, 2023
@justinmc justinmc added triaged-design Triaged by Design Languages team P2 Important issues not at the top of the work list labels Aug 3, 2023
auto-submit bot pushed a commit to flutter/engine that referenced this issue Aug 17, 2023
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the engine portion of the changes that will allow Share to be implemented
This PR addresses flutter/flutter#107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
auto-submit bot pushed a commit that referenced this issue Aug 17, 2023
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the framework portion of the changes that will allow Share to be implemented.
The corresponding merged engine PR is [here](flutter/engine#44554)
This PR addresses #107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
gaaclarke pushed a commit to gaaclarke/engine that referenced this issue Aug 30, 2023
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the engine portion of the changes that will allow Share to be implemented
This PR addresses flutter/flutter#107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
@flutter-triage-bot flutter-triage-bot bot added the Bot is counting down the days until it unassigns the issue label Dec 26, 2023
@flutter-triage-bot
Copy link

This issue is assigned to @LouiseHsu but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

@flutter-triage-bot flutter-triage-bot bot added Bot is counting down the days until it unassigns the issue and removed Bot is counting down the days until it unassigns the issue labels Jan 11, 2024
@flutter-triage-bot
Copy link

This issue is assigned to @LouiseHsu but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

@LouiseHsu LouiseHsu removed their assignment Jan 23, 2024
@flutter-triage-bot flutter-triage-bot bot removed the Bot is counting down the days until it unassigns the issue label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: fidelity Matching the OEM platforms better a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests