Repository navigation
Conversation
…ation layer When a highlight with a comment is created, the comment button rendered in the annotation layer didn't get any background color, because `PopupElement.#updateColor` bailed out for any element having an extra popup element, which is always the case for editor-backed annotations. Only skip the update when there's no associated editor, as already done in `#updateCommentButtonPosition`. Fixes mozilla#22087 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22089 +/- ##
==========================================
- Coverage 90.30% 90.27% -0.03%
==========================================
Files 269 269
Lines 67362 67362
==========================================
- Hits 60828 60813 -15
- Misses 6534 6549 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22087
When a highlight with a comment is created and the highlight tool is closed, the comment button rendered in the annotation layer was gray instead of using the highlight's color. PopupElement.#updateColor returned early for any element with an extra popup element, which is always the case for the editor-backed annotation created for a new highlight, so no background-color was ever set. The update is now only skipped when there is no associated editor, mirroring the check already done in #updateCommentButtonPosition.
An integration test is added in test/integration/comment_spec.mjs.
Test cases
Test 1: The comment button keeps the highlight color after closing the highlight tool