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 a new base class to allow to add a drawing in the SVG layer. #19093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calixteman
Copy link
Contributor

This patch makes a clear separation between the way to draw and the editing stuff. It adds a class DrawEditor which should be extended in order to create new drawing tools.
As an example, the ink tool has been rewritten in order to use it.

@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/f45378cd6117b14/output.txt

@calixteman
Copy link
Contributor Author

/botio test

@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/324b95df703677d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/37aece65741ede8/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 0.98 mins

Published

src/display/editor/ink.js Fixed Show fixed Hide fixed
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/37aece65741ede8/output.txt

Total script time: 34.68 mins

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

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

@calixteman calixteman force-pushed the refactor_ink branch 2 times, most recently from 1e03740 to 5ccc04e Compare November 22, 2024 19:45
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/324b95df703677d/output.txt

Total script time: 50.74 mins

  • Unit tests: FAILED
  • Integration Tests: FAILED
  • Regression tests: Passed

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 8.86 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 19.12 mins

  • Integration Tests: Passed

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.

A couple of quick observations based on comparing master against the preview:

  • The Ink-editor can now be resized not just in the corners, but also along the edges; see the red circles in screen-shots below.
    Was this an intentional change, since the PR description (and commit message) doesn't mention it?

  • The focus outline behaves subtly different, since it now "overlays" and hides the very edges of the drawing; note e.g. the red rectangles in the screen-shots below.
    Again, it's not clear to me if this was intentionally or accidentally changed?


  • master
    master

  • patch
    patch

src/core/annotation.js Outdated Show resolved Hide resolved
web/viewer.html Outdated Show resolved Hide resolved
test/integration/ink_editor_spec.mjs Outdated Show resolved Hide resolved
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 more minor comments, however this patch is a bit too large to review everything in detail and we'll probably have to trust that the test coverage is sufficient to catch outright bugs.

src/display/editor/annotation_editor_layer.js Outdated Show resolved Hide resolved
src/display/editor/annotation_editor_layer.js Outdated Show resolved Hide resolved
src/core/annotation.js Show resolved Hide resolved
src/display/editor/draw.js Outdated Show resolved Hide resolved
src/display/editor/draw.js Outdated Show resolved Hide resolved
src/display/editor/drawers/inkdraw.js Outdated Show resolved Hide resolved
src/display/editor/drawers/outline.js Show resolved Hide resolved
test/driver.js Outdated Show resolved Hide resolved
test/driver.js Outdated Show resolved Hide resolved
…yer.

This patch makes a clear separation between the way to draw and the editing stuff.
It adds a class DrawEditor which should be extended in order to create new drawing tools.
As an example, the ink tool has been rewritten in order to use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants