Skip to content

[Editor] Add the possibility to add a popup to an annotation when saving #19976

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

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

Conversation

calixteman
Copy link
Contributor

When saving/printing, only update the properties which are provided and set a default value only when there is no pre-existing one.

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 29.74 mins

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

@calixteman calixteman requested a review from Snuffleupagus May 27, 2025 16:42
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 57.03 mins

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

@@ -3932,38 +3960,31 @@ class FreeTextAnnotation extends MarkupAnnotation {
static createNewDict(annotation, xref, { apRef, ap }) {
const { color, fontSize, oldAnnotation, rect, rotation, user, value } =
annotation;
const date = `D:${getModificationDate(annotation.date)}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here, and elsewhere below:
Looking at the existing code, it doesn't appear that annotation.date is ever being set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to add it for the test:
https://github.com/mozilla/pdf.js/pull/19976/files#diff-9bc50ce4ba8a4ba8d322114a3cc05fa62005a40b52223059200ca07087dd5a61R12160
in order to have a fixed reference.

After thinking about that, I think it'd make sense to use it when the annotation has been updated and not when it has been saved. I can fix that in a follow-up.

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 30.28 mins

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 56.93 mins

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

@calixteman calixteman requested a review from Snuffleupagus May 29, 2025 14:24
When saving/printing, only update the properties which are provided and set
a default value only when there is no pre-existing one.
@calixteman calixteman requested review from timvandermeij and removed request for Snuffleupagus June 30, 2025 16:18
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