Closed Bug 1950987 Opened 1 year ago Closed 1 year ago

Ordering of console log level buttons

Categories

(DevTools :: Console, defect, P4)

Firefox 135
defect

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: ygoe, Assigned: m.abdelaziz1993)

Details

(Keywords: good-first-bug)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0

Steps to reproduce:

Open developer console (F12)

Actual results:

The console has buttons to filter for log levels: Error, warning, log, information, debug.

Expected results:

The ordering of these buttons is a little weird. They suggest that the "log" level is higher than the "info" level. Actually, the spec (linked in MDN) doesn't suggest that, in fact it lists log as lower than info. Also, Chrome doesn't use that ordering but puts info between "verbose" (their word for "log") and warning which is what I'd have expected.

So I guess Firefox should swap the two buttons "log" and "information".

Attached image Firefox UI screenshot
Attached image Chrome UI screenshot

The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Console
Product: Firefox → DevTools

Thanks for the report, sounds sensible to do

Keywords: good-first-bug
Priority: -- → P4
Severity: -- → S3

If anyone want to look into this, the log and info buttons are defined in https://searchfox.org/mozilla-release/rev/e38acda63624c7058df4c5adb1f61f9787ed1968/devtools/client/webconsole/components/FilterBar/FilterBar.js#248-265

FilterButton({
  active: filter[FILTERS.LOG],
  label: getLabel(
    l10n.getStr("webconsole.logsFilterButton.label"),
    FILTERS.LOG
  ),
  filterKey: FILTERS.LOG,
  dispatch,
}),
FilterButton({
  active: filter[FILTERS.INFO],
  label: getLabel(
    l10n.getStr("webconsole.infoFilterButton.label"),
    FILTERS.INFO
  ),
  filterKey: FILTERS.INFO,
  dispatch,
}),

swapping the order of the FilterButton would fix this bug

Go ahead. I won't take this because setting up a working Firefox build environment is way beyond me and any patch would likely not be accepted unless I tried it at least.

I would like to take this bug

(In reply to Abdelaziz Mokhnache from comment #8)

I would like to take this bug

Thanks Abdelaziz, the bug is now yours :)
Let us know if you have any questions

Assignee: nobody → m.abdelaziz1993
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1639e34f32e Swap `Logs` and `Info` buttons in console filters r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: