Skip to content

fix: add autofillHints support to AFTextField#8594

Merged
LucasXu0 merged 4 commits intoAppFlowy-IO:mainfrom
LucasXu0:chore/update_changelog
Mar 20, 2026
Merged

fix: add autofillHints support to AFTextField#8594
LucasXu0 merged 4 commits intoAppFlowy-IO:mainfrom
LucasXu0:chore/update_changelog

Conversation

@LucasXu0
Copy link
Copy Markdown
Collaborator

@LucasXu0 LucasXu0 commented Mar 20, 2026

Feature Preview

close #8589


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Mar 20, 2026

Reviewer's Guide

Adds autofillHints support to AFTextField and updates project versioning and minor style fixes across several Flutter files.

Class diagram for updated AFTextField with autofillHints support

classDiagram
class AFTextField {
  +FocusNode? focusNode
  +bool readOnly
  +int? maxLength
  +Iterable<String>? autofillHints
  +AFTextFieldState createState()
}

class AFTextFieldState {
}

class _AFTextFieldState {
  +bool isObscured
  +Widget build(BuildContext context)
}

class TextFieldWidget {
  +Iterable<String>? autofillHints
}

AFTextField --> AFTextFieldState : creates
_AFTextFieldState --|> AFTextFieldState
AFTextFieldState ..> TextFieldWidget : configures
_AFTextFieldState ..> TextFieldWidget : passes_autofillHints
Loading

File-Level Changes

Change Details Files
Expose autofillHints on AFTextField and wire it into the underlying TextField to support password managers and autofill.
  • Add optional autofillHints parameter to AFTextField constructor
  • Document autofillHints field on AFTextField
  • Pass widget.autofillHints through to the internal TextField widget
frontend/appflowy_flutter/packages/appflowy_ui/lib/src/component/textfield/textfield.dart
Update frontend app version metadata to 0.11.4 and add an html dependency.
  • Add 0.11.4 release notes section to CHANGELOG.md
  • Bump Flutter package version from 0.9.9 to 0.11.4 in pubspec.yaml
  • Add html dependency to pubspec.yaml
  • Update APPFLOWY_VERSION to 0.11.4 in frontend Makefile.toml
CHANGELOG.md
frontend/appflowy_flutter/pubspec.yaml
frontend/Makefile.toml
Apply minor code style and formatting fixes in several Flutter files.
  • Fix indentation in ShareTabBloc.close implementation
  • Normalize spacing around if condition in MobileSearchResultCell
  • Correct indentation in OutlineItemWidget children-building logic
  • Fix spacing before callback invocation in SpaceBloc
  • Ensure models barrel file ends with a newline
  • Remove unnecessary autoFocus=true from font family search FlowyTextField
  • Remove stray blank line in ActionNavigationBloc branch
frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_bloc.dart
frontend/appflowy_flutter/lib/mobile/presentation/search/mobile_search_cell.dart
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart
frontend/appflowy_flutter/lib/workspace/application/sidebar/space/space_bloc.dart
frontend/appflowy_flutter/lib/features/share_tab/data/models/models.dart
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/font/customize_font_toolbar_item.dart
frontend/appflowy_flutter/lib/workspace/application/action_navigation/action_navigation_bloc.dart
frontend/appflowy_flutter/pubspec.lock

Possibly linked issues

  • #(unlisted): The PR adds the missing autofillHints parameter to AFTextField, directly fixing the reported compilation bug.
  • #[Bug] Build failure: Error: No named parameter with the name 'autofillHints'.: Yes. The PR adds the autofillHints parameter to AFTextField, fixing the reported Flutter build failure.
  • #[Bug] Build fails for MacOS: PR adds the autofillHints parameter to AFTextField as suggested in the issue, fixing the MacOS build error.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • The new html: any dependency in pubspec.yaml is very loosely constrained; consider pinning it to a tested version range to avoid unexpected breakages from upstream changes.
  • For AFTextField.autofillHints, consider documenting or constraining the expected values (e.g., referencing Flutter's AutofillHints constants) to avoid incorrect or ineffective hint strings being passed in.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `html: any` dependency in `pubspec.yaml` is very loosely constrained; consider pinning it to a tested version range to avoid unexpected breakages from upstream changes.
- For `AFTextField.autofillHints`, consider documenting or constraining the expected values (e.g., referencing Flutter's `AutofillHints` constants) to avoid incorrect or ineffective hint strings being passed in.

## Individual Comments

### Comment 1
<location path="frontend/appflowy_flutter/pubspec.yaml" line_range="154" />
<code_context>

   analyzer: 6.11.0

+  html: any
 dev_dependencies:
   # Introduce talker to log the bloc events, and only log the events in the development mode
</code_context>
<issue_to_address>
**issue (bug_risk):** Using an unconstrained `any` version for `html` may introduce unstable or breaking upgrades.

Allowing `html: any` means pub can choose newer versions arbitrarily, which increases the risk of future breakages (including for transitive consumers).

Please pin or range-constrain this dependency instead, for example:
```yaml
html: ^0.15.0
```
or another minimum version you actually depend on, so upgrades happen explicitly and can be evaluated when you choose to update.
</issue_to_address>

### Comment 2
<location path="CHANGELOG.md" line_range="222" />
<code_context>
+#### Bug Fixes
+- Fixed potential login token expired issue
+- Fixed inability to create Vault workspace on self-hosted servers with commercial plans
+- Fixed switching page rapidly caused the page flash
+
+### Mobile
</code_context>
<issue_to_address>
**issue (typo):** Clarify the wording in this bug fix entry for correct grammar.

The line "Fixed switching page rapidly caused the page flash" is ungrammatical. Please rephrase, e.g. "Fixed an issue where switching pages rapidly caused the page to flash."

Suggested implementation:

```
- Fixed an issue where switching pages rapidly caused the page to flash

```

I don’t see the `### Mobile` section content in the provided snippet, but the ungrammatical line should be located under that section for version 0.10.1 (or nearby). Make sure the `SEARCH` text exactly matches the existing line (including spacing and hyphen formatting) under the Mobile section when applying this change.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


analyzer: 6.11.0

html: any
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Using an unconstrained any version for html may introduce unstable or breaking upgrades.

Allowing html: any means pub can choose newer versions arbitrarily, which increases the risk of future breakages (including for transitive consumers).

Please pin or range-constrain this dependency instead, for example:

html: ^0.15.0

or another minimum version you actually depend on, so upgrades happen explicitly and can be evaluated when you choose to update.

Comment thread CHANGELOG.md
#### Bug Fixes
- Fixed potential login token expired issue
- Fixed inability to create Vault workspace on self-hosted servers with commercial plans
- Fixed switching page rapidly caused the page flash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (typo): Clarify the wording in this bug fix entry for correct grammar.

The line "Fixed switching page rapidly caused the page flash" is ungrammatical. Please rephrase, e.g. "Fixed an issue where switching pages rapidly caused the page to flash."

Suggested implementation:

- Fixed an issue where switching pages rapidly caused the page to flash

I don’t see the ### Mobile section content in the provided snippet, but the ungrammatical line should be located under that section for version 0.10.1 (or nearby). Make sure the SEARCH text exactly matches the existing line (including spacing and hyphen formatting) under the Mobile section when applying this change.

@LucasXu0 LucasXu0 merged commit 4af02cd into AppFlowy-IO:main Mar 20, 2026
18 of 20 checks passed
alexrosepizant pushed a commit to alexrosepizant/AppFlowy that referenced this pull request Apr 13, 2026
* chore: bump version to 0.11.4 and update changelog

* feat: add autofillHints support to AFTextField

* fix: remove autoFocus from font search input

* chore: fix code formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] The named parameter 'autofillHints' isn't defined in AFTextField

1 participant