Skip to content

Conversation

@justinmc
Copy link
Contributor

@justinmc justinmc commented May 25, 2022

Design doc

Deprecations

The old way of building a toolbar still works exactly as before, but it's deprecated. That's toolbarOptions and the toolbar-related parts of TextSelectionControls.

  • toolbarOptions
  • buildToolbar
  • canCopy etc.
  • handleCopy etc.

New stuff immediately deprecated

  • "handle controls"
    • Since I have deprecated the parts of TextSelectionControls related to the toolbar, I needed a way to distinguish old TextSelectionControls that still desire to customize the toolbar. To do that, I created a new mixin TextSelectionHandleControls on TextSelectionControls for new usages that don't care about the toolbar. I immediately deprecated TextSelectionHandleControls. When the deprecation is removed, we can remove that class and all TextSelectionControls will only relate to handles and not toolbars.
  • buttonDatasForToolbarOptions
    • For the same reason as the previous point, this method was created and immediately deprecated. It translates between the old toolbarOptions system and the new buttonDatas.

User-side changes

  • Mac no longer shows a "Select all" button. I think we missed this before and native Mac shouldn't show one. I don't ever see one natively, except in the browser.

Open questions

  • TextSelectionToolbarButtonData
    • Is there a way to merge this with Greg's contextual menu data?

@justinmc justinmc self-assigned this May 25, 2022
@justinmc justinmc mentioned this pull request Jul 6, 2022
@justinmc
Copy link
Contributor Author

justinmc commented Jul 8, 2022

Closing in an attempt to fix the customer tests that are incorrectly failing. If that doesn't work then I'll use a squashed version of this PR (#107193).

@justinmc justinmc closed this Jul 8, 2022
@justinmc justinmc deleted the context-menu-anywhere branch July 8, 2022 16:31
This was referenced Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems f: cupertino flutter/packages/flutter/cupertino 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.

1 participant