Closed Bug 1534548 Opened 5 years ago Closed 5 years ago

Header labels should be left aligned

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Honza, Assigned: lba_2)

Details

Attachments

(3 files)

Left aligning header label should make columns easier to identify.

Honza

Work on this bug can also fix missing sort icon due to this CSS prop:
https://hg.mozilla.org/mozilla-central/annotate/13115d00f301/devtools/client/netmonitor/src/assets/styles/RequestList.css#l134

From @fvsch on Slack:

Yeah that width:100% looks like a dirty fix for the visual issue called out in the comment.
Basically the issue is that we display an icon even if it's hidden, that icon takes space and makes the text look mis-aligned.

  1. One possibility is to make that icon take up zero space, for instance with width: 7px; margin-inline-end: -10px; margin-inline-start: 3px;.
    But to keep this icon from ending up outside of the header, you need the header to have at least 10px of padding on the right. And to keep things centered, that means 10px of padding on the left too.

  2. Another possibility is to not display the icon at all when not active (display:none), and let it take up space only when visible. That means that when you click a column header that was not the current sort column, the header text will shift to the left.

IMO #2 is the least bad compromise.

Honza

Priority: -- → P3
Assignee: nobody → lpelechova
Status: NEW → ASSIGNED

Changes in the patch:

  • The labels of the headers are now left-aligned
  • the sort icon has display:none when the column is not sorted, it is visible only when column is sorted
  • also added padding-left:4px to data in the table so they nicely align with the headers (with the exception of waterfall data)

I wanted to ask if I should also run Talos tests for this changes since the styling for padding-left is for all values in the table.
Thanks,
Lenka

Flags: needinfo?(odvarko)

Oh yay! Left align is great, and thank you for the padding-left 4px detail :D

Attached image image.png

Thanks for working on this!

The patch looks good, the only comment I have is right padding of the sort icon. See the attached screenshot (comparing your patch with the release)

Honza

Flags: needinfo?(odvarko)
Flags: needinfo?(lpelechova)

The patch has been updated through Phabricator to give more room to the sort icon.

Flags: needinfo?(lpelechova)
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2de5ee2843c8
Align header labels left, show sorting icon; r=Honza
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: