Closed Bug 1494789 Opened 3 years ago Closed 3 years ago

Improve color for strings (inside errors) in Console

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox65 verified)

VERIFIED FIXED
Firefox 65
Tracking Status
firefox65 --- verified

People

(Reporter: victoria, Assigned: kristin)

References

Details

Attachments

(1 file, 7 obsolete files)

As discussed and designed in: https://github.com/devtools-html/ux/issues/19
It's now ready for implementation.
(Assigned to Kristen who did the UX)
Thanks for claiming for me!
Kristin, are you waiting on something or blocked by an issue (or simply don't have the time yet) ?
No rush at all, I just want to make sure we are not blocking you in any way 🙂
Assignee: nobody → comecloserandsee
Status: NEW → ASSIGNED
Priority: -- → P3
Nicholas, Thanks for checking up on me. I just got local firefox setup and am working on this now. I should have a patch up for review in a few days, if not sooner.
Attached patch 1494789.patch (obsolete) — Splinter Review
Would you mind reviewing, Nicolas? Thanks!
Attachment #9017760 - Flags: review?(nchevobbe)
Attached image Light Theme Version (obsolete) —
Attached image Dark Theme Version (obsolete) —
Here are screen shots with this patch.
Comment on attachment 9017760 [details] [diff] [review]
1494789.patch

Review of attachment 9017760 [details] [diff] [review]:
-----------------------------------------------------------------

Hello Kristin, thanks a lot for working on this !

The --theme-highlight-red variable is used in many place (https://searchfox.org/mozilla-central/search?q=--theme-highlight-red&case=false&regexp=false&path=), so here we would probably cause unwanted UI changes.

Could we instead create a new variable (maybe `--theme-error`) that we could then use in webconsole.css ?
Thanks !
Attachment #9017760 - Flags: review?(nchevobbe) → review-
Oh! Good to know. I'll make that change and upload a new patch. 
Kristin
Nicolas, 
Looking at webconsole.css on line 46 --error-color is set to --red-70 (which is the color we are using) for light mode. Also in webconsole.css on line 29 --error-color is defined with a HSL color. 
https://searchfox.org/mozilla-central/source/devtools/client/themes/webconsole.css

Would it be ok to use that already defined variable for my changes to keep the code DRY? To be consistent and readable, going this route I would change the dark mode color for --error-color to --red-20. 

Searchfox indicates that --error-color is not widely used. Would changing the defined --error-color in dark mode and calling it for my changes be ok? 

https://searchfox.org/mozilla-central/search?q=--error-color&path=

From what I understand, I also have to change line 9 in reps.css to reflect the new variable name. So, having the same name for the variable in dark and light mode is necessary.

https://searchfox.org/mozilla-central/source/devtools/client/shared/components/reps/reps.css

Otherwise I can create a new variable (--warning-color) as you suggested, and go from there.

Any suggestions as this is the first time I have worked on a library this large.

Thanks!
> Searchfox indicates that --error-color is not widely used. Would changing the defined --error-color in dark mode and calling it for my changes be ok? 

Yes, it looks safe, let's do that :)

For reps.css, it's copied over from Github (https://github.com/devtools-html/debugger.html/blob/master/packages/devtools-reps/src/reps/reps.css). So you can do the change in this repo, but we should also make it in Github so the change does not get overridden when the debugger team does the next release :)
(also, side-note, in Bugzilla, you can use the "Need more information from" input at the bottom of the textarea. This is the equivalent of @, and will put a reminder on people's bugzilla dashboard that they need to answer to someone. This is pretty useful because we usually get a lot of bugmails and might miss a comment requiring an answer :) )
Thanks for the Bugzilla tip! 
I'll get the new patch submitted early next week.
Attached patch 1494789-1.patch (obsolete) — Splinter Review
Attachment #9017760 - Attachment is obsolete: true
Attachment #9019228 - Flags: review?(nchevobbe)
Attached patch 1494789-2.patch (obsolete) — Splinter Review
Attachment #9019229 - Flags: review?(nchevobbe)
Attached patch 1494789-3.patch (obsolete) — Splinter Review
Attachment #9019230 - Flags: review?(nchevobbe)
I'll make a pull request against the debugger.html repo once we're happy with this.
Attachment #9019228 - Flags: review?(nchevobbe) → review+
Attachment #9019230 - Flags: review?(nchevobbe) → review+
Comment on attachment 9019229 [details] [diff] [review]
1494789-2.patch

Review of attachment 9019229 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks a lot Kristin, this looks good to me!
Attachment #9019229 - Flags: review?(nchevobbe) → review+
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d7556fb1b0ca
Part 1: Add --red-20 to variables.css. r=nchevobbe
https://hg.mozilla.org/integration/mozilla-inbound/rev/9be54dc6759d
Part 2: Change --error-color to --red-20. r=nchevobbe
https://hg.mozilla.org/integration/mozilla-inbound/rev/5566199eda70
Part 3: Use --error-color for --string-color. r=nchevobbe
Keywords: checkin-needed
Blocks: 1501909
This was reverted by Bug 1502224.
Let's re-use this bug to only apply the color change to `.message.error` (definitely my fault to not have checked that!)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
No longer blocks: 1502999
Depends on: 1502999
Target Milestone: Firefox 65 → ---
No longer blocks: 1501909
Depends on: 1501909
(In reply to Nicolas Chevobbe from comment #21)
> This was reverted by Bug 1502224.
> Let's re-use this bug to only apply the color change to `.message.error`
> (definitely my fault to not have checked that!)

Thanks Nicolas! Working an updated patch now.
Attached patch new.patch (obsolete) — Splinter Review
Is this the right approach? I've tested this locally and it looks good to me.
Attachment #9017761 - Attachment is obsolete: true
Attachment #9017762 - Attachment is obsolete: true
Attachment #9019228 - Attachment is obsolete: true
Attachment #9019229 - Attachment is obsolete: true
Attachment #9019230 - Attachment is obsolete: true
Attachment #9022023 - Flags: feedback?(nchevobbe)
Comment on attachment 9022023 [details] [diff] [review]
new.patch

Hello Kristin, thanks for taking care of this :)

This is the right approach indeed, but it would be better to put these rules in webconsole.css instead of reps.css, since those rules should only impact the console (reps are used in several places)
Attachment #9022023 - Flags: feedback?(nchevobbe) → feedback+
Attached patch 1494789-3.patchSplinter Review
I moved the rules to webconsole.css. Can you take a look?
Attachment #9022023 - Attachment is obsolete: true
Attachment #9022821 - Flags: review?(nchevobbe)
Comment on attachment 9022821 [details] [diff] [review]
1494789-3.patch

Review of attachment 9022821 [details] [diff] [review]:
-----------------------------------------------------------------

I tested it and it looks perfect, thanks a lot Kristin!
Attachment #9022821 - Flags: review?(nchevobbe) → review+
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9bec2561346
Use --error-color for warning and error objectBox-string. r=nchevobbe
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c9bec2561346
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Flags: qe-verify+

Verified the issue on 65.0b12 on Windows 10, macOS 10.13, Ubuntu 18.04.
Can confirm that the --red-70 color scheme is used.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.