Skip to content

Conversation

@progamax
Copy link
Contributor

@progamax progamax commented Aug 27, 2025

This PR adds support for configuring smartQuotesType and smartDashesType in SearchAnchor. These values are passed down to the inner TextField, allowing developers to control smart quotes and smart dashes behavior consistently when using SearchAnchor

fixes: #174509

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@google-cla
Copy link

google-cla bot commented Aug 27, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 27, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds smartQuotesType and smartDashesType properties to SearchAnchor and SearchBar, allowing these to be configured on the underlying TextField. The changes are well-implemented, plumbing the properties through the widget hierarchy correctly. The addition of tests is good, but they could be improved by combining them and adding coverage for the search view's text field, not just the anchor's.

@progamax progamax force-pushed the add-textfield-prop-search-anchor branch from 3e78566 to 0e89631 Compare August 27, 2025 08:50
@progamax progamax changed the title Add textfield prop search anchor Add textfield prop to SearchAnchor Aug 27, 2025
@dkwingsmt dkwingsmt requested a review from QuncCccccc August 27, 2025 18:27
@dkwingsmt
Copy link
Contributor

cc @justinmc

Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Just wanted to double check with @justinmc whether this is the recommended way to use SmartDashesType and SmartQuptesType:)

final bool readOnly;

/// Configures how smart dashes are handled in the text field
/// used by this [SearchAnchor].
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be SearchBar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

final SmartDashesType? smartDashesType;

/// Configures how smart quotes are handled in the text field
/// used by this [SearchAnchor].
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also fixed

@QuncCccccc QuncCccccc requested a review from justinmc September 3, 2025 17:11
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.

Thanks for piping these through! Just a comment about the docs, otherwise looks good.

@progamax progamax requested a review from justinmc September 15, 2025 15:02
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 👍 . Sorry everyone for holding this PR up with my late review!

This can be autosubmitted when the Google tests pass.

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 9, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 9, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 9, 2025

autosubmit label was removed for flutter/flutter/174497, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 16, 2025

autosubmit label was removed for flutter/flutter/174497, because - The status or check suite Mac customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2025
@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Oct 16, 2025
Merged via the queue into flutter:master with commit 8e164a5 Oct 16, 2025
78 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 18, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 18, 2025
Roll Flutter from a873a27309b0 to 891d7d539256 (32 revisions)

flutter/flutter@a873a27...891d7d5

2025-10-18 [email protected] Roll Skia from b4981b621a54 to 74df18176924 (1 revision) (flutter/flutter#177204)
2025-10-18 [email protected] Roll Fuchsia Linux SDK from ZHuhfPyyV-LcKDLRh... to M8WT2GMY46e_0fFho... (flutter/flutter#177200)
2025-10-18 [email protected] [material/dropdown_menu.dart] Refactor  _RenderDropdownMenuBody.computeDryLayout  (flutter/flutter#176503)
2025-10-18 [email protected] Roll Skia from 579c72d673dd to b4981b621a54 (2 revisions) (flutter/flutter#177199)
2025-10-17 [email protected] Roll Skia from 89a8bc508a7c to 579c72d673dd (15 revisions) (flutter/flutter#177194)
2025-10-17 [email protected] [test_fixes] Enable `deprecated_member_use_from_same_package`. (flutter/flutter#177183)
2025-10-17 [email protected] [a11y] fix table semantics cache for cells  (flutter/flutter#177073)
2025-10-17 [email protected] [web] Self-cleaning service worker (flutter/flutter#176834)
2025-10-17 [email protected] Manual roll Skia from 2d9df7c70b6f to 89a8bc508a7c (24 revisions) (flutter/flutter#177182)
2025-10-17 [email protected] Fixing WindowManagerTest::DialogCanNeverBeFullscreen possibly hanging (flutter/flutter#177179)
2025-10-17 [email protected] [VPAT][A11y][a11y-app] Add a text label to slider.  (flutter/flutter#177130)
2025-10-17 [email protected] Manual roll Dart SDK from a4485e5ef821 to a66f334fee2a (5 revisions) (flutter/flutter#177142)
2025-10-17 [email protected] [web][a11y] Fix the semantics tree reconstruction logic when a subtree is reparented to another node.  (flutter/flutter#177069)
2025-10-17 [email protected] `SelectableRegion` should use flutter rendered menu on the web for Android and iOS (flutter/flutter#177122)
2025-10-17 [email protected] Refactor: Convert Title widget to StatefulWidget (flutter/flutter#176010)
2025-10-17 [email protected] Bump AGP, KGP, Gradle Templates (flutter/flutter#176858)
2025-10-17 [email protected] Roll Packages from 835dccb to 3747006 (3 revisions) (flutter/flutter#177170)
2025-10-17 [email protected] Mark windows_unopt test as flakey (flutter/flutter#177173)
2025-10-17 [email protected] Tapping outside of `SelectableRegion` should dismiss the selection (flutter/flutter#176843)
2025-10-17 [email protected] Roll Fuchsia Linux SDK from _dd0Jv50H0oUI2Ad8... to ZHuhfPyyV-LcKDLRh... (flutter/flutter#177137)
2025-10-17 [email protected] Manual roll Dart to a4485e5ef821 (3.11.0-25.0.dev) (flutter/flutter#177132)
2025-10-17 [email protected] Make sure that a MenuAcceleratorLabel doesn't crash in 0x0 environment (flutter/flutter#176646)
2025-10-16 [email protected] Make sure that a NavigationRail doesn't crash in 0x0 environment (flutter/flutter#177022)
2025-10-16 [email protected] Make sure that a SubmenuButton doesn't crash in 0x0 environment (flutter/flutter#176535)
2025-10-16 [email protected] Fix typo in ButtonBar documentation (flutter/flutter#177078)
2025-10-16 [email protected] Make sure that an InkResponse doesn't crash in 0x0 environment (flutter/flutter#175426)
2025-10-16 [email protected] [Gradle 9] Resolve Gradle 9 Deprecations in flutter/flutter part 1 (flutter/flutter#176865)
2025-10-16 [email protected] Revert "Resolve resolve native Flutter dependencies in Android Studio (#167332)" (flutter/flutter#177053)
2025-10-16 [email protected] Manual roll Dart SDK from 2d8e0359a767 to 25b6094026e4 (5 revisions) (flutter/flutter#177109)
2025-10-16 [email protected] Add textfield prop to SearchAnchor (flutter/flutter#174497)
2025-10-16 [email protected] Fix crash when NSAttributedString is passed to insertText on macOS (flutter/flutter#176329)
2025-10-16 [email protected] Correct basque time format (flutter/flutter#177031)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
...
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
This PR adds support for configuring smartQuotesType and smartDashesType
in SearchAnchor. These values are passed down to the inner TextField,
allowing developers to control smart quotes and smart dashes behavior
consistently when using SearchAnchor

fixes: flutter#174509 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchAnchor missing SmartQuotesType and SmartDashesType configuration for its inner TextField

4 participants