Skip to content

Commit

Permalink
Merge pull request #18611 from calixteman/fix_telemetry
Browse files Browse the repository at this point in the history
Fix the telemetry for the new alt-text flow
  • Loading branch information
calixteman authored Aug 15, 2024
2 parents 17f387b + 9bd0085 commit b60261e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/display/editor/alt_text.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class AltText {
if (this.#useNewAltTextFlow) {
this.#editor._reportTelemetry({
action: "pdfjs.image.alt_text.image_status_label_clicked",
label: this.#label,
data: { label: this.#label },
});
}
};
Expand Down Expand Up @@ -237,7 +237,7 @@ class AltText {
const type = label === "review" ? "to-review" : label;
this.#editor._reportTelemetry({
action: "pdfjs.image.alt_text.image_status_label_displayed",
label,
data: { label },
});
button.classList.toggle("done", !!this.#altText);
AltText._l10nPromise
Expand Down
2 changes: 1 addition & 1 deletion src/display/editor/stamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class StampEditor extends AnnotationEditor {
get telemetryFinalData() {
return {
type: "stamp",
hasAltText: this.hasAltTextData(),
hasAltText: !!this.altTextData?.altText,
};
}

Expand Down

0 comments on commit b60261e

Please sign in to comment.