Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TextSelectionTheme support (step 2 of 3) #65044

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

Merged
merged 5 commits into from
Sep 17, 2020
Merged

TextSelectionTheme support (step 2 of 3) #65044

merged 5 commits into from
Sep 17, 2020

Conversation

darrenaustin
Copy link
Contributor

@darrenaustin darrenaustin commented Sep 1, 2020

Description

This PR continues the migration to the new TextSelectionTheme started in #62014 and is described in the design doc.

This step changes the default for ThemeData.useTextSelectionTheme to true, thus opting into the text selection theme by default. This will mean that the default colors for the cursor color, text selection and selection handles are all now based on the primary color of the color scheme. The following parameters of the ThemeData will no longer be used and will soon be deprecated:

  • cursorColor
  • textSelectionColor
  • textSelectionHandleColor

Related Issues

#17635
#56082
#61227

Tests

I updated text selection theme tests and the editable text tests to match the new default colors.

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

This step is not a breaking, but is part of a soft landing breaking change (see #62014 for more details).

  • No, no existing tests failed, so this is not a breaking change.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. work in progress; do not review labels Sep 1, 2020
@skia-gold
Copy link

Gold has detected about 1 untriaged digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/65044

@darrenaustin darrenaustin changed the title WIP: TextSelectionTheme support (step 2 of 3) TextSelectionTheme support (step 2 of 3) Sep 8, 2020
@darrenaustin darrenaustin marked this pull request as ready for review September 8, 2020 21:32
@skia-gold
Copy link

Gold has detected about 2 untriaged digest(s) on patchset 2.
View them at https://flutter-gold.skia.org/cl/github/65044

@skia-gold
Copy link

Gold has detected about 21 untriaged digest(s) on patchset 2.
View them at https://flutter-gold.skia.org/cl/github/65044

@skia-gold
Copy link

Gold has detected about 26 untriaged digest(s) on patchset 3.
View them at https://flutter-gold.skia.org/cl/github/65044

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #65044 at sha 2e31278e2bec24d58755212141cbdbda9df2bd30

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Sep 9, 2020
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@skia-gold
Copy link

Gold has detected about 4 untriaged digest(s) on patchset 4.
View them at https://flutter-gold.skia.org/cl/github/65044

@fluttergithubbot fluttergithubbot merged commit cb92ffc into flutter:master Sep 17, 2020
@darrenaustin darrenaustin deleted the text_selection_theme_opt_in branch September 17, 2020 00:25
@jmagman
Copy link
Member

jmagman commented Sep 17, 2020

This was reverted due to a post-submit test failure. See #66046 for details.

@darrenaustin darrenaustin restored the text_selection_theme_opt_in branch September 17, 2020 19:24
darrenaustin added a commit that referenced this pull request Sep 17, 2020
Turn the opt-in default for ThemeData.useTextSelectionTheme to true so that everything uses the new TextSelectionTheme by default.
goderbauer pushed a commit to goderbauer/flutter that referenced this pull request Sep 18, 2020
goderbauer pushed a commit to goderbauer/flutter that referenced this pull request Sep 18, 2020
Turn the opt-in default for ThemeData.useTextSelectionTheme to true so that everything uses the new TextSelectionTheme by default.
@darrenaustin darrenaustin deleted the text_selection_theme_opt_in branch April 26, 2021 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants