Closed Bug 1623901 Opened 5 years ago Closed 5 years ago

Wrong color when selecting HTTP response payload in the Console

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: Honza, Assigned: marianapicolo, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(3 files)

Attached image image.png

STR:

  1. Open DevTools and select the Console panel, make sure the Requests filter is on
  2. Load https://api.github.com/
  3. Expand the request in the Console
  4. Select the Response panel
  5. Select something in the JSON Preview section

All the selected text should be white (on blue background) but, part of the text is gray, which makes it unreadable.

See the attached screenshot.

Note that it doesn't happen in the Response side panel in the Network panel. Why?

Honza

Blocks: 1623902
Mentor: odvarko
Keywords: good-first-bug

Honza, can I work on this one too?

Honza, I think I found the issue:

The network messages are built here:
https://searchfox.org/mozilla-central/source/devtools/client/webconsole/components/Output/message-types/NetworkEventMessage.js#133-136

The requestUrl has a CSS class of url,
https://searchfox.org/mozilla-central/source/devtools/client/themes/webconsole.css#739-742
which has the color of --theme-comment;

But, according to the variables file, the colors for selections are:
https://searchfox.org/mozilla-central/source/devtools/client/themes/variables.css#134-139

Flags: needinfo?(odvarko)

I think this color property defined on the url class should be removed:
https://searchfox.org/mozilla-central/source/devtools/client/themes/webconsole.css#740

On the previous comment I posted one property of the JSON selected;

Can I send a patch?

I'm sorry for too many comments: I didn't find how to edit them

Hubert, can you please help Mariana to fix this, thanks!

Honza

Assignee: nobody → marianapicolo
Mentor: odvarko → hmanilla
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)

Hi Mariana,

(In reply to Mariana Pícolo from comment #3)

I think this color property defined on the url class should be removed:
https://searchfox.org/mozilla-central/source/devtools/client/themes/webconsole.css#740

Great analysis! This line is the issue.
Lets probably add something like this instead

.webconsole-app .message.network .selected .url {
  color: var(--theme-selection-color)
}

as we only need the change when the url is selected.

Flags: needinfo?(marianapicolo)

Hubert, can you check the patch I sent?

I think it fixes the bug

Flags: needinfo?(marianapicolo) → needinfo?(hmanilla)

Thanks! I've left comments in the patch!

Flags: needinfo?(hmanilla)
Attachment #9135233 - Attachment description: Bug 1623901 - Remove color definition for '.url' class on .css. r=bomsy → Bug 1623901 - Update selected text color. r=bomsy

Mariana,
Ignore using comment 7. I left comments in the patch!
Thanks

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
QA Whiteboard: [qa-76b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: