Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize the find and replace logic #510

Merged
merged 4 commits into from
Oct 1, 2023

Conversation

LucasXu0
Copy link
Collaborator

preview

find_and_replace.mp4

@LucasXu0 LucasXu0 requested a review from Xazin September 28, 2023 04:47
@LucasXu0 LucasXu0 marked this pull request as draft September 28, 2023 04:47
@LucasXu0
Copy link
Collaborator Author

LucasXu0 commented Oct 1, 2023

  • Split the find and replace widget into two smaller widget, find widget and replace widget.
  • Optimize the highlight logic and scroll behavior.
  • Add dispose function to editor state

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (2b58d4f) 80.58% compared to head (51488dc) 80.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
- Coverage   80.58%   80.39%   -0.19%     
==========================================
  Files         280      281       +1     
  Lines       11809    11843      +34     
==========================================
+ Hits         9516     9521       +5     
- Misses       2293     2322      +29     
Files Coverage Δ
...ditor_component/service/scroll_service_widget.dart 79.45% <ø> (-0.82%) ⬇️
.../command_shortcut_events/find_replace_command.dart 88.88% <ø> (ø)
...rc/editor/find_replace_menu/find_menu_service.dart 83.72% <100.00%> (+0.79%) ⬆️
...nd_replace_menu/find_replace_menu_icon_button.dart 100.00% <100.00%> (ø)
...b/src/editor/toolbar/desktop/floating_toolbar.dart 84.00% <100.00%> (+0.32%) ⬆️
...rc/editor/find_replace_menu/search_service_v2.dart 94.93% <94.93%> (ø)
lib/src/editor_state.dart 84.61% <16.66%> (-2.32%) ⬇️
.../editor/find_replace_menu/find_replace_widget.dart 84.32% <83.06%> (-4.57%) ⬇️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LucasXu0 LucasXu0 marked this pull request as ready for review October 1, 2023 04:13
@LucasXu0 LucasXu0 merged commit 3845324 into AppFlowy-IO:main Oct 1, 2023
9 of 10 checks passed
q200892907 added a commit to q200892907/appflowy-editor that referenced this pull request Oct 7, 2023
* main:
  fix: image block revamp issues (AppFlowy-IO#517)
  chore: image block revamp (AppFlowy-IO#516)
  feat: enable shift+press for selection range (AppFlowy-IO#512)
  feat: make find and replace feature more customziable
  chore: rename replaceFlag to showReplaceMenu
  fix: the search service doesn't scroll to the position automatically
  feat: optimize the find and replace logic (AppFlowy-IO#510)
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.

2 participants