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] Allow to select a freetext editor when in ink mode #15118

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

calixteman
Copy link
Contributor

  • and when in ink mode, change the toolbar active button when
    a freetext edited.

@Snuffleupagus Snuffleupagus self-requested a review June 29, 2022 16:23
if (mode === this.#mode) {
return;
}
this.#eventBus?.dispatch("switchannotationeditormode", {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd probably argue that the #eventBus being undefined here is a bug in code that's initializing the AnnotationEditor; so you might be able to simply assume that it's available?

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 just copied that from annotation_layer.js (linkService.eventBus?...)

Copy link
Collaborator

@Snuffleupagus Snuffleupagus Jun 29, 2022

Choose a reason for hiding this comment

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

There's one difference here: The annotationLayer had existed, for years, before it started depending on the eventBus. Hence we wanted to prevent outright errors in existing third-party code, when users updated to a new release.

For the annotationEditorLayer, which is completely new (and still unreleased) functionality, it should be fine to always assume that the eventBus is available.

- and when in ink mode, change the toolbar active button when
  a freetext edited.
@calixteman
Copy link
Contributor Author

/botio integrationtest

1 similar comment
@calixteman
Copy link
Contributor Author

/botio integrationtest

@pdfjsbot
Copy link

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/2b225f8bba56e05/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/783e34373360e5c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/2b225f8bba56e05/output.txt

Total script time: 4.70 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/783e34373360e5c/output.txt

Total script time: 7.67 mins

  • Integration Tests: Passed

@calixteman calixteman merged commit a520fc9 into mozilla:master Jun 29, 2022
@calixteman calixteman deleted the editor_selection branch June 29, 2022 17:49
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