Closed
Bug 1332085
Opened 8 years ago
Closed 8 years ago
Add Color Name field to Color Widget
Categories
(DevTools :: Inspector: Rules, defect, P3)
DevTools
Inspector: Rules
Tracking
(firefox55 fixed)
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: gl, Assigned: sroddick)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files, 4 obsolete files)
Add the Named Color component to the Color Widget. This bug is reserved for UCOSP students.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → sheldon.roddick
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8828993 -
Flags: review?(gl)
Reporter | ||
Comment 2•8 years ago
|
||
Comment on attachment 8828993 [details] [diff] [review]
Bug1332085.patch v1
Review of attachment 8828993 [details] [diff] [review]:
-----------------------------------------------------------------
::: devtools/client/locales/en-US/colorwidget.properties
@@ +2,5 @@
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +# LOCALIZATION NOTE These strings are used in the CSS Color Editor Widget
> +# which can be found in a tooltip that appears in the Rule View when clicking
s/Rule/Rules
@@ +3,5 @@
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +# LOCALIZATION NOTE These strings are used in the CSS Color Editor Widget
> +# which can be found in a tooltip that appears in the Rule View when clicking
> +# on a color swatch displayed next to CSS declarations like 'color: #FFF'
Add a period to the end of the sentence.
@@ +6,5 @@
> +# which can be found in a tooltip that appears in the Rule View when clicking
> +# on a color swatch displayed next to CSS declarations like 'color: #FFF'
> +
> +# LOCALIZATION NOTE (colorNameLabel):
> +# This string is displayed to indicate the field in which the currently
I think we should move the string so it starts right after the ":", and I think we can simplify the string to read:
The label for the current color widget's color name field.
::: devtools/client/shared/test/browser_color-widget-01.js
@@ +117,5 @@
> +function testChangingColorShouldUpdateColorNameDisplay(container) {
> + let s = new ColorWidget(container, [255, 255, 255, 1]);
> + s.show();
> + s.updateUI();
> + ok(s.colorName.textContent === "white", "Color Name should be white, ColorWidget name change failed");
We should be using is so we know the expected value.
is(s.colorName.textContent, "white", "The Color Name is White");
The is() signature is is(actual, expected, message).
::: devtools/client/shared/widgets/ColorWidget.js
@@ +14,1 @@
> const XHTML_NS = "http://www.w3.org/1999/xhtml";
Move XHTML_NS after the L10N declaration with a new line to separate it.
@@ +344,4 @@
> },
>
> destroy: function () {
> this.element.removeEventListener("click", this.onElementClick);
We need to set this.colorName to null in destroy()
::: devtools/shared/css/color.js
@@ +175,3 @@
> return this.hex;
> }
> + let {r, g, b} = tuple;
Add a new line after if statement block.
@@ +548,5 @@
> cssRGBMap[key] = name;
> }
> }
> }
> + return cssRGBMap[JSON.stringify([r, g, b, 1])] || "";
We should update the @return {String} to indicate the name of the color or an empty string if the color does not have a name. We also need to update the JSDoc to say it doesn't throw but returns an empty string as well.
Attachment #8828993 -
Flags: review?(gl)
Reporter | ||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8829139 -
Flags: review?(gl)
Reporter | ||
Updated•8 years ago
|
Attachment #8828993 -
Attachment is obsolete: true
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8829142 -
Flags: review?(gl)
Assignee | ||
Updated•8 years ago
|
Attachment #8829139 -
Attachment is obsolete: true
Attachment #8829139 -
Flags: review?(gl)
Assignee | ||
Comment 6•8 years ago
|
||
Attachment #8829142 -
Attachment is obsolete: true
Attachment #8829142 -
Flags: review?(gl)
Attachment #8829143 -
Flags: review?(gl)
Assignee | ||
Comment 7•8 years ago
|
||
Attachment #8829143 -
Attachment is obsolete: true
Attachment #8829143 -
Flags: review?(gl)
Attachment #8829144 -
Flags: review?(gl)
Reporter | ||
Updated•8 years ago
|
Summary: Add Named Color to the Color Widget → Add Color Name field to Color Widget
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e329450e4d25
Add Color Name field to Color Widget. r=gl
Reporter | ||
Updated•8 years ago
|
Attachment #8829144 -
Flags: review?(gl) → review+
Comment 9•8 years ago
|
||
Sorry, backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/26366617b865 for pretty frequent failures like https://treeherder.mozilla.org/logviewer.html#?job_id=70968730&repo=mozilla-inbound
Reporter | ||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/98530de82f5c
Add Color Name field to Color Widget. r=gl
Comment 12•8 years ago
|
||
Sorry, backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/b03d23d20564 for pretty frequent failures like https://treeherder.mozilla.org/logviewer.html#?job_id=71032748&repo=mozilla-inbound
Comment hidden (mozreview-request) |
Reporter | ||
Comment 14•8 years ago
|
||
mozreview-review |
Comment on attachment 8865729 [details]
Bug 1332085 - Add Color Name Field to Color Widget.
https://reviewboard.mozilla.org/r/137354/#review140882
Attachment #8865729 -
Flags: review?(gl) → review+
Comment 15•8 years ago
|
||
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c40129d19820
Add Color Name Field to Color Widget. r=gl
Comment 16•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•