feat(ui): add ESC dialog dismissal, kanban scrollbar, zoom setting, and navigation shortcuts - #8983
Open
YadneshTeli wants to merge 3 commits into
Open
YadneshTeli wants to merge 3 commits into
YadneshTeli wants to merge 3 commits into
Conversation
Contributor
Reviewer's GuideThis PR adds keyboard dismissal and navigation shortcuts, improves Kanban and sidebar interaction behavior, exposes a reactive workspace zoom setting with reset support, and applies Flutter 3.44/Dart 3.12 compatibility and dependency updates. Sequence diagram for ESC dialog dismissalsequenceDiagram
participant User
participant FlowyDialog
participant Navigator
User->>FlowyDialog: Press Escape
FlowyDialog->>Navigator: maybePop()
Sequence diagram for zoom setting updatessequenceDiagram
participant User
participant HomeHotKeys
participant ZoomNotifier
participant SettingsWorkspaceView
participant WindowSizeManager
User->>HomeHotKeys: Press zoom shortcut
HomeHotKeys->>ZoomNotifier: scaleApp(scaleFactor)
HomeHotKeys->>WindowSizeManager: setScaleFactor(fixedScale)
ZoomNotifier-->>SettingsWorkspaceView: Rebuild zoom indicator
User->>SettingsWorkspaceView: Request reset
SettingsWorkspaceView->>HomeHotKeys: resetAppScale()
HomeHotKeys->>ZoomNotifier: scaleApp(1.0)
HomeHotKeys->>WindowSizeManager: setScaleFactor(1.0)
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="frontend/appflowy_flutter/lib/workspace/presentation/home/hotkeys.dart" line_range="143-147" />
<code_context>
),
+ HotKeyItem(
+ hotKey: HotKey(
+ Platform.isMacOS ? KeyCode.bracketLeft : KeyCode.arrowLeft,
+ modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.alt],
+ scope: HotKeyScope.inapp,
+ ),
+ keyDownHandler: (_) => _selectTab(context, -1),
+ ),
</code_context>
<issue_to_address>
**issue (bug_risk):** The new Alt+Left/Alt+Right and Cmd+[/Cmd+] shortcuts call `_selectTab`, which selects the numerically adjacent tab instead of navigating backward or forward through tab/page history. After visiting tabs in a non-sequential order, these shortcuts therefore reach the wrong destination.
**Triggers:** When the user expects browser-style back/forward navigation after switching between non-adjacent tabs.
**Suggested fix:** Dispatch the tab-history back/forward events rather than changing `currentIndex` by ±1.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR resolves multiple UI/UX, navigation, and usability issues across the desktop and mobile clients:
ESC Key Dismissal for Dialogs & Peek Windows (Fixes [Bug] Somehow couldn't close the peek window using ESC key #8948):
FlowyDialogwithCallbackShortcutsandFocusScopebound toLogicalKeyboardKey.escape, allowing Peek windows (Row Detail) and all FlowyDialog overlays to be dismissed reliably withESC.Kanban Horizontal Scrollbar (Fixes [Bug] Hard to scroll horizontally to see more groups in Kanban #8947):
Scrollbarattached toscrollControllerinboard_page.dart, enabling smooth horizontal scrolling for mouse users.Sidebar Bottom "New Page" Button Consistency (Fixes [Bug] Default template not used if adding page at the bottom #8973):
setAsCurrent: truetocreateRootViewInSectioninSidebarSectionsBlocso creating a page from the sidebar bottom button opens and initializes default templates properly.Workspace Settings UI Zoom Indicator & Reset (Fixes [FR] Show current UI zoom state on settings page ("Workspace" section) #5396):
_ZoomLevelSettinginsettings_workspace_view.dartdisplaying the active UI zoom percentage (e.g.100%,110%), shortcut hints (Ctrl/Cmd +,Ctrl/Cmd -), and a reset action.Page / Tab Back & Forward Navigation Shortcuts (Fixes [FR] Create shortcuts for going back / forward a page #2306):
Alt+Left/Alt+Right(andCmd+[/Cmd+]on macOS) shortcuts inhotkeys.dartfor navigating tab history.Build & Compatibility Fixes:
af_dropdown_menu.dartandsettings_dropdown.dart.flutter_svgimport inappflowy_uiexample.Testing & Verification
flutter analyzeacross the entire repository -> 0 errors.Summary by Sourcery
Improve desktop and mobile navigation and usability with reliable dialog dismissal, enhanced Kanban scrolling, workspace zoom controls, and tab history shortcuts.
New Features:
Bug Fixes:
Build: