Summary: | Web Inspector: Resources with unsaved changes should have a dimmed icon | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | hi, inspector-bugzilla-changes, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
+1, but there is a slight issue with this in that the current definition of InspectorFrontendHost::save does not actually return whether the save was completed or not. If we don't care about that (or if it's not possible), then I imagine this just being the following: 1. Add another member variable to SourceCode called lastSavedRevision 2. Add getter for isModified that checks if lastSavedRevision !== currentRevision 3. Change the displayName getter to add "*" if isModified is true (In reply to comment #2) > +1, but there is a slight issue with this in that the current definition of > InspectorFrontendHost::save does not actually return whether the save was > completed or not. I think it actually should call through to: InspectorFrontendAPI.savedURL Which is currently unimplemented: InspectorFrontendAPI = { ... savedURL: function(url) { // Not used yet. }, ... } The frontend host (the person who injected InspectorFrontendHost) communicates with the inspector page by calling InspectorFrontendAPI methods. So the contract for InspectorFrontendHost.save will eventually response with a InspectorFrontendAPI.savedURL. It is not a perfect API by any means, and totally changeable. I wouldn't use an asterisks. On Mac the convention is to have a dimmed icon. (In reply to comment #4) > I wouldn't use an asterisks. On Mac the convention is to have a dimmed icon. How would a dimmed icon work for the styles panel? Currently, the icon is dimmed if the user "disables" the rule (which comments all the properties). Would we not want to bother with that and instead implement something akin to <https://webkit.org/b/161965>. (In reply to comment #5) > (In reply to comment #4) > > I wouldn't use an asterisks. On Mac the convention is to have a dimmed icon. > > How would a dimmed icon work for the styles panel? Currently, the icon is > dimmed if the user "disables" the rule (which comments all the properties). > Would we not want to bother with that and instead implement something akin > to <https://webkit.org/b/161965>. I should have said darken, not dim. Created attachment 292111 [details]
Xcode Darkens
|
Created attachment 287539 [details] [Image] Proposed change Chrome DevTools do it in their Sources tab. I think we should do the same for our Resources and Debugger tabs, and also for the Styles sidebar.