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

[Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218) #17506

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

calixteman
Copy link
Contributor

The free highlighting is enabled when the mouse pointer isn't on some text. Then we draw a shape with smoothed borders corresponding to the movement of the mouse.
Printing/saving and changing the thickness will come later.

@calixteman
Copy link
Contributor Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/bc25202cb0e5dca/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/bc25202cb0e5dca/output.txt

Total script time: 1.60 mins

Published

src/display/editor/outliner.js Fixed Show fixed Hide fixed
src/display/editor/outliner.js Fixed Show fixed Hide fixed
src/display/editor/outliner.js Fixed Show fixed Hide fixed
@calixteman calixteman force-pushed the editor_free_highlight branch 2 times, most recently from 47e57d4 to 6eaa45f Compare January 12, 2024 19:07
@Snuffleupagus
Copy link
Collaborator

Should this new highlight-mode perhaps use a "custom" cursor (comparing with e.g. the Ink-editor), rather than the default one?

@calixteman
Copy link
Contributor Author

Should this new highlight-mode perhaps use a "custom" cursor (comparing with e.g. the Ink-editor), rather than the default one?

The UI/UX team is already aware about this "problem" and should have a solution for it in the next days.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a few comments/questions based on a quick look.

src/display/draw_layer.js Show resolved Hide resolved
src/display/editor/outliner.js Outdated Show resolved Hide resolved
src/display/editor/outliner.js Outdated Show resolved Hide resolved
src/display/editor/outliner.js Show resolved Hide resolved
src/display/editor/outliner.js Outdated Show resolved Hide resolved
@calixteman calixteman force-pushed the editor_free_highlight branch 8 times, most recently from 43ccff0 to 5c2f4f5 Compare January 17, 2024 11:55
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on testing the preview in #17506 (comment) I've noticed a couple of issues.

    1. Enable free-highlighting and begin drawing.
    2. While still holding the left mouse button pressed, click once on the right mouse button to bring up the context menu.
    3. Note that you can still keep drawing, by moving the mouse, despite the context menu being open.
       
    1. Enable free-highlighting and begin drawing.
    2. While still holding the left mouse button pressed, click once on the right mouse button to bring up the context menu.
    3. Release the left mouse button, and then left click again.
    4. Editing doesn't stop properly, with the following Error being thrown: Uncaught TypeError: can't access property "isEmpty", this._freeHighlight is null.
       
    1. Enable free-highlighting and begin drawing.
    2. Draw an irregular shape, and once done note that the editToolbar may end up in the "middle" of the highlight. (All other editors have the toolbar placed below.)
      toolbar

src/display/editor/highlight.js Outdated Show resolved Hide resolved
src/display/editor/highlight.js Show resolved Hide resolved
src/display/editor/highlight.js Show resolved Hide resolved
src/display/editor/outliner.js Outdated Show resolved Hide resolved
@calixteman
Copy link
Contributor Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/2969d19ba9be0ff/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/2969d19ba9be0ff/output.txt

Total script time: 1.47 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with passing tests; thank you!

src/display/editor/outliner.js Outdated Show resolved Hide resolved
…g to select some text) (bug 1856218)

The free highlighting is enabled when the mouse pointer isn't on some text.
Then we draw a shape with smoothed borders corresponding to the movement of
the mouse.
Printing/saving and changing the thickness will come later.
@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/f83471f4f3b750d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cc52a8d705d8e64/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/f83471f4f3b750d/output.txt

Total script time: 24.93 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 13
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/f83471f4f3b750d/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/cc52a8d705d8e64/output.txt

Total script time: 40.69 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 22

Image differences available at: http://54.193.163.58:8877/cc52a8d705d8e64/reftest-analyzer.html#web=eq.log

@calixteman calixteman merged commit 1cdbcfe into mozilla:master Jan 18, 2024
9 checks passed
@calixteman calixteman deleted the editor_free_highlight branch January 18, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants