New Update settings_shortcuts_view.dart#8279
Closed
Aathish101 wants to merge 1 commit intoAppFlowy-IO:mainfrom
Closed
New Update settings_shortcuts_view.dart#8279Aathish101 wants to merge 1 commit intoAppFlowy-IO:mainfrom
Aathish101 wants to merge 1 commit intoAppFlowy-IO:mainfrom
Conversation
Contributor
Reviewer's GuideThis PR enhances hover interactions and refines the shortcuts settings UI by updating the ResetButton behavior, tightening layout in ShortcutSettingTile, and enforcing consistent const usage with formatting cleanup. Class diagram for updated SettingsShortcutsView and related widgetsclassDiagram
class SettingsShortcutsView {
+createState()
}
class _SettingsShortcutsViewState {
-String _query
-bool _isEditing
+build(context)
}
SettingsShortcutsView --> _SettingsShortcutsViewState
class _SearchBar {
+onSearchChanged: void Function(String)?
+build(context)
}
class _ResetButton {
+onReset: void Function()?
+build(context)
+resetHoverOnRebuild: false
+style: HoverStyle
}
class ShortcutSettingTile {
+command: CommandShortcutEvent
+onStartEditing: VoidCallback
+onFinishEditing: VoidCallback
+canStartEditing: bool Function()
+createState()
}
class _ShortcutSettingTileState {
-keybindController: TextEditingController
-focusNode: FocusNode
-isHovering: bool
-isEditing: bool
-canClickOutside: bool
+initState()
+dispose()
+build(context)
+_finishEditing()
+_updateCommand()
+_renderKeybindings(isHovering)
+_renderKeybindEditor()
+_toParts(binding: Keybinding): List<String>
}
ShortcutSettingTile --> _ShortcutSettingTileState
class KeyBadge {
+keyLabel: String
+build(context)
+iconData: FlowySvgData?
}
class FlowyHover {
+resetHoverOnRebuild: bool
+style: HoverStyle
+builder: (context, isHovering)
}
class FlowyText {
+regular(text, color)
}
class FlowySvg {
+FlowySvg(svg, size, color)
}
class FlowyTextField {
+controller: TextEditingController
+focusNode: FocusNode
+onSubmitted: Function
}
_ResetButton --> FlowyHover
_ResetButton --> FlowySvg
_ResetButton --> FlowyText
_ShortcutSettingTileState --> FlowyTextField
_ShortcutSettingTileState --> KeyBadge
KeyBadge --> FlowySvg
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart:396-400` </location>
<code_context>
],
- const Spacer(),
- if (isHovering)
+ if (isHovering) ...[
+ const HSpace(8),
GestureDetector(
</code_context>
<issue_to_address>
**suggestion:** Conditional rendering of HSpace(8) only when hovering may cause layout shift.
To prevent layout jumps, keep the spacing consistent whether or not the component is hovered.
```suggestion
const HSpace(8),
if (isHovering)
GestureDetector(
onTap: () {
if (widget.canStartEditing()) {
```
</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.
Feature Preview
PR Checklist
Summary by Sourcery
Refactor settings_shortcuts_view.dart to enhance hover interactions, streamline layout, and improve keybinding editing behavior
Enhancements: