Opened 17 months ago

Closed 9 months ago

#19616 closed enhancement (duplicate)

Color Picker consistency

Reported by: trepmal Owned by:
Priority: normal Milestone:
Component: UI Version: 3.2
Severity: normal Keywords: has-patch
Cc: michael.d.beckwith@…, sabreuse@…, lancewillett, melissachoyce@…, sararcannon@…, georgemamadashvili@…

Description

The color pickers used on the custom background page and custom header pages appear and behave slightly differently.

Custom Background:
http://cl.ly/CjWS/custom-background.png

On the Custom Background page, the picker uses a non-button/text trigger, and once a color is entered a 'clear' option is added.

Custom Header:
http://cl.ly/CiPg/custom-header.png

On the Custom Header page, the picker uses a button trigger. No 'clear' option is offered.

Twenty Eleven's Theme Options includes another variation:
http://cl.ly/Cihf/theme-options.png
It is very similar to the Custom Header style, but with an added color swatch preview.

Attachments (6)

custombg.diff (1.1 KB) - added by tw2113 17 months ago.
uses button style for color choosing instead of text link
custombg.2.diff (1.1 KB) - added by tw2113 17 months ago.
Accidentally had the 2011 text domain in the first patch.
customheader.diff (2.0 KB) - added by tw2113 17 months ago.
custom-header.php color selecting changes
customheader.2.diff (2.0 KB) - added by tw2113 17 months ago.
updated to remove prefixes on trepmal's suggestion
19616.diff (4.8 KB) - added by aaroncampbell 14 months ago.
Twentyeleven style
19616.2.diff (5.1 KB) - added by aaroncampbell 14 months ago.

Download all attachments as: .zip

Change History (29)

  • Keywords needs-patch added
  • Type changed from defect (bug) to enhancement

+1

  • Milestone changed from Awaiting Review to 3.4

Let's do it.

I got this. Working on getting patches soon.

uses button style for color choosing instead of text link

Here's the custom-background.php diff file. It was pretty straightforward overall. I didn't include the little swatch preview because of the preview at the top is so prominent. http://core.trac.wordpress.org/attachment/ticket/19616/custombg.diff

A bit curious how to go about the color swatch option. I believe a lot of that part is utilizing some jquery + css, to restrict the size of the swatch and make it clickable with the color wheel. However, as I'm still new to the core editing, I am not sure which files the js/css should go into.

Accidentally had the 2011 text domain in the first patch.

custom-header.php color selecting changes

Just added the diff files for adding the color swatch for the Custom Header page

updated to remove prefixes on trepmal's suggestion

  • Keywords has-patch added; needs-patch removed
  • Cc michael.d.beckwith@… added
  • Cc sabreuse@… added
  • Cc lancewillett added
  • Keywords needs-refresh commit added

This needs a slight refresh for trunk, I imagine.

Twentyeleven style

  • Keywords needs-refresh removed

The new patch (19616.diff) moves everything to the Twentyeleven style with the swatch. I like the swatch, it seems like the friendliest option. I also went with the button instead of the link and added the clear link when a color is selected. I even did that on the background page for two reasons:

  1. Consistency is nice, even if there are two color previews (swatch and big preview box at the top)
  2. If the background image is set to tile, you can't see the background color. I know that this means you can't see the background color on the site either (in theory), but since the color picker is still there having the swatch makes it more usable.

comment:13 in reply to: ↑ 12 ; follow-up: ↓ 14   lancewillett14 months ago

Replying to aaroncampbell:

The new patch (19616.diff) moves everything to the Twentyeleven style with the swatch.

One issue I saw in testing: the swatch should trigger the same click event as the "Select a Color" button (broken in both Background and Header).

The rest tests out, works as expected.

comment:14 in reply to: ↑ 13   aaroncampbell14 months ago

Replying to lancewillett:

One issue I saw in testing: the swatch should trigger the same click event as the "Select a Color" button (broken in both Background and Header).

Good catch. Fixed it in 19616.2.diff

  • Milestone changed from 3.4 to Future Release
17:13	koopersmith	For the love of everything, punt.

Related: #21206

Why is the hexadecimal representation of the colour the primary input method and primary display? That's not very user-friendly.

The colour picker JS should hide the text input and show it below the colour chart when it's clicked.

http://i.imgur.com/wBoR6.png

  • Keywords commit removed
  • Cc melissachoyce@… added
  • Cc sararcannon@… added
  • Cc georgemamadashvili@… added

This issue has been addressed with the new colorpicker. See: http://core.trac.wordpress.org/ticket/21206

A patch has been submitted if anyone wants to help test.

Version 0, edited 9 months ago by downstairsdev (next)
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.