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 dialog for alt-text settings (bug 1909604) #18537

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

calixteman
Copy link
Contributor

This patch adds a new entry in the secondary menu in order to open a dialog to let the user:

  • disables the alt-text generation thanks to a ML model;
  • deletes the alt-text model downloaded in Firefox;
  • disabled the new alt-text flow.

@calixteman calixteman requested a review from a team as a code owner August 1, 2024 13:48
@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/d3b4a5c8530789e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 1.04 mins

Published

@calixteman
Copy link
Contributor Author

@Snuffleupagus, could you review it asap, today ideally, at least to catch obvious mistakes, and I'll do some follow-ups to fix less obvious errors ?
We're in soft-freeze and I'd like to make a release today. I'll uplift follow-ups (if any) and the telemetry next week or tomorrow.

@Snuffleupagus
Copy link
Collaborator

could you review it asap, today ideally, at least to catch obvious mistakes, and I'll do some follow-ups to fix less obvious errors ?

Well, the preview above doesn't even load correctly :-P

Uncaught (in promise) TypeError: mlManager is null
    ImageAltTextSettings new_alt_text_manager.js:497
    _initializeViewerComponents app.js:561
    initialize app.js:253
new_alt_text_manager.js:497:36

@calixteman
Copy link
Contributor Author

could you review it asap, today ideally, at least to catch obvious mistakes, and I'll do some follow-ups to fix less obvious errors ?

Well, the preview above doesn't even load correctly :-P

Uncaught (in promise) TypeError: mlManager is null
    ImageAltTextSettings new_alt_text_manager.js:497
    _initializeViewerComponents app.js:561
    initialize app.js:253
new_alt_text_manager.js:497:36

arf.. yes it's because we've a GENERIC build.

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/535445e9032f13e/output.txt

Total script time: 1.03 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.

Unfortunately some of this new functionality isn't all that easy to follow (at least not to me), so I'm slightly worried about the maintainability of all of this new code.
Given the apparent time pressure in getting this landed, it does seem to me that all of this could probably benefit from some future re-factoring and clean-up to simplify things?

src/display/editor/tools.js Outdated Show resolved Hide resolved
src/display/editor/tools.js Outdated Show resolved Hide resolved
web/annotation_editor_layer_builder.css Show resolved Hide resolved
web/app.js Outdated Show resolved Hide resolved
web/app.js Outdated Show resolved Hide resolved
web/new_alt_text_manager.js Outdated Show resolved Hide resolved
web/new_alt_text_manager.js Show resolved Hide resolved
web/new_alt_text_manager.js Outdated Show resolved Hide resolved
web/new_alt_text_manager.js Outdated Show resolved Hide resolved
web/stubs-geckoview.js Show resolved Hide resolved
@calixteman
Copy link
Contributor Author

Unfortunately some of this new functionality isn't all that easy to follow (at least not to me), so I'm slightly worried about the maintainability of all of this new code. Given the apparent time pressure in getting this landed, it does seem to me that all of this could probably benefit from some future re-factoring and clean-up to simplify things?

Yes for sure, I hope to improve this when I'll write the integration tests for the new feature.

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/05a20ba461541af/output.txt

Total script time: 1.07 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 a couple of final comments; thank you!

src/display/editor/tools.js Outdated Show resolved Hide resolved
web/app_options.js Outdated Show resolved Hide resolved
web/new_alt_text_manager.js Outdated Show resolved Hide resolved
web/app.js Outdated Show resolved Hide resolved
This patch adds a new entry in the secondary menu in order to open a dialog to let the user:
 - disables the alt-text generation thanks to a ML model;
 - deletes the alt-text model downloaded in Firefox;
 - disabled the new alt-text flow.
@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/68074a25244b31a/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/89ecb0a44448415/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/68074a25244b31a/output.txt

Total script time: 8.50 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/89ecb0a44448415/output.txt

Total script time: 17.94 mins

  • Integration Tests: FAILED

@calixteman calixteman merged commit 501da85 into mozilla:master Aug 1, 2024
9 checks passed
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.

5 participants