Bug 220437 - Web Inspector: Sources: resources should be sorted not including the extension
Summary: Web Inspector: Sources: resources should be sorted not including the extension
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Jon Davis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-07 14:29 PST by Devin Rousso
Modified: 2024-01-05 09:35 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-01-07 14:29:17 PST
# STEPS TO REPRODUCE
1. inspect <https://webkit.org/>
2. toggle dark mode (should have `chevron.svg` and `chevron-dark.svg`)

# EXPECTED
`chevron.svg` should be before `chevron-dark.svg`

# ACTUAL
`chevron.svg` is after `chevron-dark.svg`

I believe this is because Web Inspector does a `String.prototype.localeCompare` against the titles as they are shown in the UI which includes the extension.  It may be desirable to call `WI.fileExtensionForFilename` before sorting and only include the extension if the filename is the same.
Comment 1 Radar WebKit Bug Importer 2021-01-07 14:29:28 PST
<rdar://problem/72905353>
Comment 2 Jon Davis 2023-09-27 12:12:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18298
Comment 3 EWS 2023-09-27 19:21:49 PDT
Committed 268557@main (5060974c125e): <https://commits.webkit.org/268557@main>

Reviewed commits have been landed. Closing PR #18298 and removing active labels.
Comment 4 Jon Davis 2023-09-28 07:12:55 PDT
Re-opening to address an enhancement recommended during review.
Comment 5 Jon Davis 2023-09-28 07:20:50 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18350