AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

feat(editor): add highlighter

Open fundon opened this issue 9 months ago • 2 comments

What's Changed!

Currently the highlighter tool is very similar to brush, but for the future, it's a standalone module.

  • Added Highlighter element model
  • Added Highlighter tool
  • Added Highlighter entry to the global toolbar

fundon avatar Mar 03 '25 06:03 fundon


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

fundon avatar Mar 03 '25 06:03 fundon

Codecov Report

Attention: Patch coverage is 29.13669% with 197 lines in your changes missing coverage. Please review.

Project coverage is 54.27%. Comparing base (676a8d6) to head (2c42780). Report is 1 commits behind head on canary.

Files with missing lines Patch % Lines
...locksuite/affine/gfx/brush/src/highlighter-tool.ts 13.63% 76 Missing :warning:
...fine/model/src/elements/highlighter/highlighter.ts 19.40% 54 Missing :warning:
...ffine/gfx/brush/src/toolbar/configs/highlighter.ts 34.37% 21 Missing :warning:
...e/gfx/brush/src/toolbar/components/pen/pen-menu.ts 28.57% 15 Missing :warning:
...ksuite/affine/components/src/color-picker/utils.ts 6.66% 14 Missing :warning:
...rush/src/toolbar/components/pen/pen-tool-button.ts 71.87% 9 Missing :warning:
...surface/src/renderer/elements/highlighter/index.ts 0.00% 7 Missing :warning:
.../affine/components/src/color-picker/color-panel.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #10573      +/-   ##
==========================================
- Coverage   54.34%   54.27%   -0.07%     
==========================================
  Files        2556     2560       +4     
  Lines      115445   115684     +239     
  Branches    18785    18827      +42     
==========================================
+ Hits        62734    62791      +57     
- Misses      50751    51554     +803     
+ Partials     1960     1339     -621     
Flag Coverage Δ
server-test 78.82% <ø> (+<0.01%) :arrow_up:
unittest 30.28% <27.33%> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Mar 03 '25 07:03 codecov[bot]

Merge activity

  • Mar 27, 2:56 AM EDT: Saul-Mirone added this pull request to the Graphite merge queue.
  • Mar 27, 7:59 AM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: '3, 2, 1 Launch', 'Native Unit Test').
  • Mar 27, 4:31 AM EDT: fundon added this pull request to the Graphite merge queue.
  • Mar 27, 5:09 AM EDT: A user merged this pull request with the Graphite merge queue.

graphite-app[bot] avatar Mar 27 '25 06:03 graphite-app[bot]