Skip to content

Conversation

@The-Redhat
Copy link
Contributor

@The-Redhat The-Redhat commented Feb 19, 2019

Description

Because the TextField is shown in the AppBar we should use the primaryTextTheme to ensure the contrast between them. In addition hintText should also has this TextStyle.

before

screenshot from 2019-02-25 20-39-48

after

screenshot from 2019-02-25 20-36-47

Checklist

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

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Feb 20, 2019
@HansMuller
Copy link
Contributor

Thanks for the contribution! This PR introduces visual changes, so before and after screenshots should be included. If possible, it's helpful to crop full-screen screenshots to highlight the changes. A test will also be needed.

Unfortunately this change will "break" existing apps that depend on the current implementation's configuration of the search text field. It would be safer to add textStyle and hintStyle parameters.

@The-Redhat
Copy link
Contributor Author

Thanks for your feedback. I will upload screenshots as soon as possible. @HansMuller Would you add the parameters to the showSearch function or to the SearchDelegate ?

@HansMuller
Copy link
Contributor

Actually, maybe a better way to address this issue would be for your app to override SearchDelegate.appBarTheme.

@The-Redhat
Copy link
Contributor Author

The-Redhat commented Feb 25, 2019

Yes but it isn't really easy to override the textSytles. Moreover I think flutter should use the correct Material design. The AppBar uses the primaryTextTheme and I think the TextField should also. Right now I see no possibility to change hintStyle. I added screenshots to the first comment.

@The-Redhat
Copy link
Contributor Author

I made some changes to the PR. I reverted the TextFiedl style change and the hint style change. Instead I asigned the default hintStyle from the Theme to the hinstyle. Now you can edit the hintStyle, and the changes are backwards compatible.

@hyperpanthera
Copy link

Merge this already (or #30388).

@mikuhl-dev
Copy link

Want this

@hyperpanthera
Copy link

Why is this still not merged?

@justinmc
Copy link
Contributor

justinmc commented Jun 10, 2019

I'm hoping to get #30388 merged soon if everyone can agree in the discussion over there. The solution is the same as this PR, but it includes a test, so I think it's the closest to being merged. Track the status over there in the meantime, and I'll close this if that one is merged.

@hyperpanthera
Copy link

@justinmc Dude merge it already.

@The-Redhat
Copy link
Contributor Author

The-Redhat commented Jun 10, 2019

@justinmc It wonders me why nobody answered me after I made the requested changes in this pr. But the newer pr (#30388) gets discussed. It's kind of weird to me. In general pr's from non-contributor receive fewer answers.

But I hope finally one of this prs gets merged.

@justinmc
Copy link
Contributor

Yeah sorry about that, I definitely try to give credit to whoever comes up with a solution first, but it's hard to keep track of all of the PRs and issues. This PR is definitely contributing to the sense of urgency of this problem and the validity of the solution, even if it doesn't get merged.

If you open a PR in the future feel free to tag me directly.

@The-Redhat
Copy link
Contributor Author

@justinmc thanks for the answer. I understand that it's to keep track, it's also frustrating for us developers. But it's nice to hear that you care about what we think.

PS. I am waiting for an answer on a pr at flutter/plugins (pr).:stuck_out_tongue_winking_eye:

@justinmc
Copy link
Contributor

Closing this as #30388 was just merged and built successfully.

The solution that went in is the same as proposed in this PR, so SearchDelegate will now respect the appBarTheme's hintStyle. Make sure you're on the master Flutter channel, or using a version > 1.7.3 once it's released.

Thank you again @The-Redhat for starting this whole discussion. I will try to find someone familiar with quick_actions to take a look at that PR :)

@justinmc justinmc closed this Jun 11, 2019
@The-Redhat
Copy link
Contributor Author

Thank you very much @justinmc !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

7 participants