Sorting for long date should be by date and not alphabetical.
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox71 fixed)
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: karlcow, Assigned: mozilla-bugzilla)
Details
(Keywords: good-first-bug)
Attachments
(2 files)
- Open the devtools
- Go to the network tab
- Crtl + Click on the header row (starting with status, etc.)
- Add Last Modified from HTTP response.
- Go to any website
- Click on the Last Modified column top label to sort out.
Expected:
To have the item sorted by date.
Actual:
Items are sorted alphabetically.
Comment 1•6 years ago
|
||
Thanks for the report!
I can reproduce that on my machine
Honza
Comment 2•6 years ago
|
||
It seems to be broken for other Response Headers columns too. Try e.g. Response Headers -> Content-Length
Some pointers:
-
Click on the header is handled here:
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/components/RequestListHeader.js#118 -
SortBy action is fired here
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/components/RequestListHeader.js#616
Notice the type being passed into the action
-
The reducer storing the current sort type is here
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/reducers/sort.js#24 -
When list of requests is rendered
getDisplayedREquestsselector is called (to get list of sorted requests)
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/selectors/requests.js#96 -
The right sort function is based on the
type
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/selectors/requests.js#78
Note the Sorters map
- The map of all available sorters is here
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/devtools/client/netmonitor/src/utils/sort-predicates.js#188
And see, there is no Last-Modified sorter (not even Content-Length). They need to be implemented
Honza
| Assignee | ||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Comment 5•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•