Closed Bug 1782578 Opened 3 years ago Closed 3 years ago

Implement a context menu modal for text recognition

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files)

Figma spec

For the initial text recognition in images implementation, we are going with a modal that displays the text. This is triggered via a context menu.

Blocks: 1782586

This code will most likely be removed, but for now I am putting it
behind a pref so that it won't be activated when the modal is being
created.

See Bug 1782582 for the removal of the code.

This matches what is in the Figma spec.

Depends on D153393

The implementation follows after this, but I felt it made the code
easier to read to by splitting it out.

Depends on D153394

This patch contains the bulk of the implementation of the modal. Most of
it is UI work and wiring together the various components. There is a bit
of complexity in the clustering algorithm, as I implemented the DBSCAN
algorithm to help cluster the text recognition results.

I filed Bug 1782586 to improve the DBSCAN algorithm, but currently it
works the same as the algorithm is described on Wikipedia.

Note that the tests are in the following patch in order to keep the line
count small for this patch.

Depends on D153395

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8332d678079e Put the img shadow DOM behind a preference r=nordzilla https://hg.mozilla.org/integration/autoland/rev/98d0d6bcd37b Rename and move the context menu for text recognition r=nordzilla,fluent-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/b4c51d1ffa99 Stub out the textrecognition component files r=nordzilla https://hg.mozilla.org/integration/autoland/rev/4f969d46dd37 Build out the text recognition modal r=nordzilla,fluent-reviewers,Jamie,flod https://hg.mozilla.org/integration/autoland/rev/5f17ee4cc4df Add tests for the text recognition modal r=nordzilla

Backed out for causing mochitest failures on browser_parsable_css.js

Backout link

Push with failures

Failure log // Failure log 2

Flags: needinfo?(gtatum)
Flags: needinfo?(gtatum)
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a77a405173ff Put the img shadow DOM behind a preference r=nordzilla https://hg.mozilla.org/integration/autoland/rev/7dac35a8d6de Rename and move the context menu for text recognition r=nordzilla,fluent-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/3e858b2ed1c5 Stub out the textrecognition component files r=nordzilla https://hg.mozilla.org/integration/autoland/rev/e183536cb8d9 Build out the text recognition modal r=nordzilla,fluent-reviewers,Jamie,flod https://hg.mozilla.org/integration/autoland/rev/ee4685a4e583 Add tests for the text recognition modal r=nordzilla
See Also: → 1789741
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: