fix: toolbar launch review issues#7631
Merged
LucasXu0 merged 6 commits intoAppFlowy-IO:mainfrom Mar 27, 2025
Merged
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request addresses several toolbar launch review issues, including updating the design of the 'Turn Into' menu, collapsing more icons into the 'More Options' menu on narrow screens, fixing the position of the slash menu, and correcting the dropdown arrow color. It also includes updates to the theme extension and toolbar style. Sequence diagram for showing link creation menusequenceDiagram
participant User
participant Toolbar
participant EditorState
participant Overlay
User->>Toolbar: Clicks link button
Toolbar->>EditorState: getNodesInSelection(selection)
EditorState-->>Toolbar: Nodes
Toolbar->>Toolbar: isHref?
alt isHref == true
Toolbar->>LinkHoverTriggers: call(HoverTriggerKey)
else isHref == false
Toolbar->>Overlay: showLinkCreateMenu(context, editorState, selection)
Overlay->>EditorState: formatDelta(selection, {href, isPage})
EditorState-->>Overlay: Apply formatting
Overlay-->>Toolbar: Dismiss
end
Sequence diagram for turnInto actionsequenceDiagram
participant User
participant Toolbar
participant EditorState
participant BlockActionOptionCubit
User->>Toolbar: Selects 'Turn Into' option
Toolbar->>EditorState: getNodeAtPath(selection.start.path)
EditorState-->>Toolbar: Node
Toolbar->>BlockActionOptionCubit: turnIntoBlock(type, node, state, level, currentViewId, keepSelection)
BlockActionOptionCubit->>EditorState: apply(transaction)
EditorState-->>Toolbar: Update editor
Updated class diagram for AFThemeExtensionV2classDiagram
class AFThemeExtensionV2 {
+Color icon_primary
+Color icon_tertiary
+Color border_grey_quaternary
+Color fill_theme_select
+Color fill_grey_thick_alpha_1
+Color shadow_medium
+AFThemeExtensionV2 copyWith()
+ThemeExtension lerp()
+static AFThemeExtensionV2 of(BuildContext context)
+static AFThemeExtensionV2 maybeOf(BuildContext context)
}
note for AFThemeExtensionV2 "Added new theme extension class to manage colors."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @asjqkkkk - I've reviewed your changes - here's some feedback:
Overall Comments:
- The refactor of
TurnIntoOptionMenuis quite extensive; consider breaking it down into smaller, more manageable chunks in future PRs. - The introduction of
LinkHoverTriggersis a good way to manage link hover states, but ensure it's properly disposed of to avoid memory leaks.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
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
Improve toolbar and menu interactions in the document editor, focusing on responsive design and user experience for narrow windows
New Features:
Bug Fixes:
Enhancements: