Bug 147578

Summary: Web Inspector: Add Visual editors for CSS properties with comma separated values
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: agomez, commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 147576, 147579    
Bug Blocks: 147563, 147570, 147623    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
timothy: review+
Patch
timothy: review+
Patch none

Devin Rousso
Reported 2015-08-03 11:43:30 PDT
Add tree outline style list editors for CSS properties with comma separated values. Will be use in the new Visual style details panel in the CSS sidebar.
Attachments
Patch (34.72 KB, patch)
2015-08-03 11:48 PDT, Devin Rousso
no flags
Patch (34.73 KB, patch)
2015-08-05 18:27 PDT, Devin Rousso
no flags
Patch (35.22 KB, patch)
2015-08-06 23:22 PDT, Devin Rousso
timothy: review+
Patch (34.65 KB, patch)
2015-08-14 00:19 PDT, Devin Rousso
timothy: review+
Patch (34.64 KB, patch)
2015-08-14 12:13 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2015-08-03 11:48:07 PDT
Devin Rousso
Comment 2 2015-08-05 18:27:35 PDT
Devin Rousso
Comment 3 2015-08-06 23:22:36 PDT
Timothy Hatcher
Comment 4 2015-08-11 23:16:32 PDT
Comment on attachment 258462 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258462&action=review > Source/WebInspectorUI/UserInterface/Images/Minus.svg:2 > +<!-- Copyright © 2014 Apple Inc. All rights reserved. --> 2015 > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:124 > + _onTreeItemSelect(item, selectedByUser) No on prefix. Just _treeElementSelected. Also why item and not treeElement? It would tell you more what it is. > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:137 > + let newItem = this._addCommaSeparatedKeyword(null, this._commaSeparatedKeywords.selectedTreeElementIndex); newTreeElement? > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:152 > + for (let treeItem of this._commaSeparatedKeywords.children) { treeElement > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:167 > + if (indexIsSet) { > + this._commaSeparatedKeywords.insertChild(valueElement, indexIsSet ? index + !this._insertNewItemsBeforeSelected : 0); > + } else Nit: No need for the braces. > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:175 > + if (!treeElement) See! > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:185 > + _createNewListItem(value) _createNewTreeElement > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js:92 > + _itemEditorKeyDown(event) _treeElementKeyDown > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js:136 > + let treeItem = this._commaSeparatedKeywords.selectedTreeElement; treeElement > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeItem.js:26 > +WebInspector.VisualStyleFontFamilyTreeItem = class VisualStyleFontFamilyTreeItem extends WebInspector.GeneralTreeElement VisualStyleFontFamilyTreeElement. Classes should always end in a common suffix as what they subclass. > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeItem.js:34 > + this._keywordEditor.placeholder = "(" + WebInspector.UIString("modify the boxes below to add a value") + ")"; The () should be part of the UIString. I am also not sure the () are needed. Sentence case with a period might be best. Is a placeholder even needed?
Devin Rousso
Comment 5 2015-08-11 23:45:50 PDT
(In reply to comment #4) > > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeItem.js:34 > > + this._keywordEditor.placeholder = "(" + WebInspector.UIString("modify the boxes below to add a value") + ")"; > > The () should be part of the UIString. I am also not sure the () are needed. > Sentence case with a period might be best. Is a placeholder even needed? Not having a placeholder made the empty rows appear very odd when the list is empty, as it would appear as a blue row with nothing in it. I added the parenthesis to make it clear that the text was not meant to be the actual value and more like a hint, but I can remove it.
Timothy Hatcher
Comment 6 2015-08-12 00:00:42 PDT
(In reply to comment #5) > (In reply to comment #4) > > > Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeItem.js:34 > > > + this._keywordEditor.placeholder = "(" + WebInspector.UIString("modify the boxes below to add a value") + ")"; > > > > The () should be part of the UIString. I am also not sure the () are needed. > > Sentence case with a period might be best. Is a placeholder even needed? > > Not having a placeholder made the empty rows appear very odd when the list > is empty, as it would appear as a blue row with nothing in it. I added the > parenthesis to make it clear that the text was not meant to be the actual > value and more like a hint, but I can remove it. Okay, I think the parenthesis is fine. It should just be localized. Not all locales use the same parenthesis.
Devin Rousso
Comment 7 2015-08-14 00:19:30 PDT
Radar WebKit Bug Importer
Comment 8 2015-08-14 00:20:04 PDT
Timothy Hatcher
Comment 9 2015-08-14 11:00:50 PDT
Comment on attachment 258991 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258991&action=review > Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:115 > + filter: opacity(0.7); opacity: 0.7;
Devin Rousso
Comment 10 2015-08-14 12:13:33 PDT
WebKit Commit Bot
Comment 11 2015-08-14 13:05:30 PDT
Comment on attachment 259019 [details] Patch Clearing flags on attachment: 259019 Committed r188483: <http://trac.webkit.org/changeset/188483>
WebKit Commit Bot
Comment 12 2015-08-14 13:05:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.