Bug 118970 - [Web Inspector] When right-clicking on a DataGrid column, show editing menu option as "Edit <columnName>" instead of just "Edit"
Summary: [Web Inspector] When right-clicking on a DataGrid column, show editing menu o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-22 07:36 PDT by Diego Pino
Modified: 2013-07-22 10:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2013-07-22 07:46 PDT, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (3.01 KB, patch)
2013-07-22 08:53 PDT, Diego Pino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2013-07-22 07:36:38 PDT
Right click on a data column in a Grid shows up a context menu for Adding a new value, delete the current one or edit it. There's a FIXME comment suggesting to add the name of the column to be edited, for instance, "Edit 'Key'" instead of just simply "Edit", as it may be more clear what it does.
Comment 1 Radar WebKit Bug Importer 2013-07-22 07:36:57 PDT
<rdar://problem/14509359>
Comment 2 Diego Pino 2013-07-22 07:46:28 PDT
Created attachment 207247 [details]
Patch
Comment 3 Antoine Quint 2013-07-22 07:52:58 PDT
Comment on attachment 207247 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=207247&action=review

> Source/WebInspectorUI/UserInterface/DataGrid.js:1111
> +        function getColumnIdentifier(node) {
> +            var element = node.enclosingNodeOrSelfWithNodeName("td");
> +            return parseInt(element.className.match(/\b(\d+)-column\b/)[1], 10);
> +        }

I think it's a little overkill to add this inline function which is only used once.
Comment 4 Timothy Hatcher 2013-07-22 08:00:17 PDT
Comment on attachment 207247 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=207247&action=review

> Source/WebInspectorUI/ChangeLog:9
> +        * Localizations/en.lproj/localizedStrings.js: Add literal "Edit '%s'"

If you didn't, you should use the update-webkit-localized-strings script, which will update this file for you.

> Source/WebInspectorUI/UserInterface/DataGrid.js:1128
> +                    contextMenu.appendItem(WebInspector.UIString("Edit '%s'").format(columnTitle), this._startEditing.bind(this, event.target));

This should use double curly quotes (“”) and not single quotes.
Comment 5 Diego Pino 2013-07-22 08:53:41 PDT
Created attachment 207251 [details]
Patch
Comment 6 WebKit Commit Bot 2013-07-22 10:04:37 PDT
Comment on attachment 207251 [details]
Patch

Clearing flags on attachment: 207251

Committed r152979: <http://trac.webkit.org/changeset/152979>
Comment 7 WebKit Commit Bot 2013-07-22 10:04:40 PDT
All reviewed patches have been landed.  Closing bug.