Skip to content

fix: improve settings button hover consistency and shortcut layout#8484

Open
brianyoon0 wants to merge 1 commit intoAppFlowy-IO:mainfrom
brianyoon0:fix-settings-button-consistency-8222
Open

fix: improve settings button hover consistency and shortcut layout#8484
brianyoon0 wants to merge 1 commit intoAppFlowy-IO:mainfrom
brianyoon0:fix-settings-button-consistency-8222

Conversation

@brianyoon0
Copy link

@brianyoon0 brianyoon0 commented Feb 17, 2026

…8222)

  • Fixed reset button hover effect to match other settings buttons
  • Changed shortcut tile layout from 50/50 to space-between alignment
  • Improved visual consistency across settings UI

Fixes #8222

Feature Preview


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.

Summary by Sourcery

Improve the settings shortcuts UI for better hover feedback and shortcut layout.

Enhancements:

  • Update the reset shortcuts button to visually highlight icon and label on hover for consistency with other settings buttons.
  • Adjust the shortcut settings tile layout to space shortcuts and editors more evenly within the row.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 17, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Aligns the settings reset button hover behavior and styles with other settings buttons, and adjusts the shortcut settings tile layout to use a space-between alignment instead of two fixed Expanded columns.

Flow diagram for shortcut tile layout change to space between

flowchart LR
  A_SettingsShortcutsPage["SettingsShortcutsPage"] --> B_ShortcutSettingTile["ShortcutSettingTile (StatefulWidget)"]
  B_ShortcutSettingTile --> C_RowBefore["Row before change\nmainAxisAlignment: start\nchildren: [Expanded(label), Expanded(editor_or_bindings)]"]
  B_ShortcutSettingTile --> D_RowAfter["Row after change\nmainAxisAlignment: spaceBetween\nchildren: [Label_section, Keybind_section]"]
  C_RowBefore --> E_BehaviorBefore["Label and keybind each take 50% width"]
  D_RowAfter --> F_BehaviorAfter["Label uses intrinsic width, keybinds aligned to right"]
Loading

File-Level Changes

Change Details Files
Make the reset shortcuts button respond visually on hover in line with other settings buttons.
  • Switched FlowyHover usage from a static child to a builder that exposes the isHovering state.
  • Applied conditional color to the restore icon using the theme primary color when hovered.
  • Applied conditional color to the reset label text using the theme primary color when hovered, while keeping the existing strong text color when not hovered.
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart
Refactor the shortcut tile row layout toward a space-between alignment between label and keybinding editor / display.
  • Attempted to set the Row mainAxisAlignment to MainAxisAlignment.spaceBetween instead of relying on two equally Expanded children.
  • Adjusted the second column so that the keybinding editor is wrapped in Expanded only when editing, while the non-editing view is laid out directly.
  • Introduced structural changes to the Row children list to better separate the label section and keybinding section, although the syntax needs careful review.
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#8222 Make the reset shortcut button’s hover effect consistent with other settings buttons, including changing icon and text color on hover.
#8222 Adjust the shortcut tile layout so that the key bindings are aligned using a space-between style layout instead of a 50/50 column split.

Possibly linked issues

  • #[Bug] Settings btn not consistent with other btns, key tiles layout is weird: PR updates reset button hover colors and changes shortcut tile layout to space-between, fixing the reported UI issues.

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
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 1 issue, and left some high level feedback:

  • The Row in _ShortcutSettingTileState appears to be misconfigured: MainAxisAlignment: MainAxisAlignment.spaceBetween and an extra children: [ are placed inside the children list instead of as named parameters on Row, which will not compile; this should be refactored so mainAxisAlignment is passed to Row and there is only a single children: [...].
  • There is a typo in the ternary for rendering the keybind editor (isEditiing instead of isEditing), which will break the condition; update the identifier to match the existing state field.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `Row` in `_ShortcutSettingTileState` appears to be misconfigured: `MainAxisAlignment: MainAxisAlignment.spaceBetween` and an extra `children: [` are placed inside the `children` list instead of as named parameters on `Row`, which will not compile; this should be refactored so `mainAxisAlignment` is passed to `Row` and there is only a single `children: [...]`.
- There is a typo in the ternary for rendering the keybind editor (`isEditiing` instead of `isEditing`), which will break the condition; update the identifier to match the existing state field.

## Individual Comments

### Comment 1
<location> `frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart:382-384` </location>
<code_context>
-              Expanded(
-                child: isEditing
-                    ? _renderKeybindEditor()
+              isEditiing
+                    ? Expanded(child: _renderKeybindEditor())
                     : _renderKeybindings(isHovering),
</code_context>

<issue_to_address>
**issue (typo):** `isEditiing` appears to be a typo and will likely not compile if `isEditing` is the actual state field.

The rest of this class uses `isEditing` as the state flag, so introducing `isEditiing` here creates a new, undefined identifier and will fail to compile. This should stay as `isEditing` for consistency with the existing implementation.

```suggestion
              isEditing
                    ? Expanded(child: _renderKeybindEditor())
                    : _renderKeybindings(isHovering),
```
</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.

…ppFlowy-IO#8222)

- Fixed reset button hover effect to match other settings buttons
- Changed shortcut tile layout from 50/50 to space-between alignment
- Improved visual consistency across settings UI

Fixes AppFlowy-IO#8222
@brianyoon0 brianyoon0 force-pushed the fix-settings-button-consistency-8222 branch from f76c0ef to 208cca6 Compare February 17, 2026 00:07
@brianyoon0 brianyoon0 changed the title fix: improve settings button hover consistency and shortcut layout #8222 fix: improve settings button hover consistency and shortcut layout issue #8222 Feb 17, 2026
@brianyoon0 brianyoon0 changed the title fix: improve settings button hover consistency and shortcut layout issue #8222 fix: improve settings button hover consistency and shortcut layout Feb 17, 2026
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] Settings btn not consistent with other btns, key tiles layout is weird

2 participants