WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#22461 closed defect (bug) (fixed)

Remove header text 'restore' button left over from Farbtastic

Reported by: DrewAPicture Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch commit
Focuses: Cc:

Description

In custom-header.php, the old Farbtastic color picker relied on a separate button to reset back to the theme default text color. We don't need it anymore.

Patch attached.

Attachments (5)

22461.diff (717 bytes) - added by DrewAPicture 2 years ago.
22461.2.diff (1.1 KB) - added by DrewAPicture 2 years ago.
+ no-js label
22461.3.diff (1.3 KB) - added by lessbloat 2 years ago.
22461.4.diff (1.3 KB) - added by DrewAPicture 2 years ago.
errant space
22461.5.diff (1.6 KB) - added by DrewAPicture 2 years ago.
removes resettext $_POST bits

Download all attachments as: .zip

Change History (23)

@DrewAPicture2 years ago

comment:1 @nacin2 years ago

  • Milestone changed from Awaiting Review to 3.5

comment:2 follow-up: @helenyhou2 years ago

  • Keywords commit added

Man, that text was confusing to begin with. I was looking at this patch wondering since when you could restore header text and what it would even restore to, and what restoring it had to do with the color mod.

comment:3 in reply to: ↑ 2 @SergeyBiryukov2 years ago

Replying to helenyhou:

Man, that text was confusing to begin with.

Related: #17605

comment:4 follow-up: @nacin2 years ago

Could this still be needed for no JS?

comment:5 in reply to: ↑ 4 @DrewAPicture2 years ago

Replying to nacin:

Could this still be needed for no JS?

It's my understanding this is in no way connected to the new Iris color picker. That's not to say it couldn't be hooked up to it, but in its current form, it was part of Farbtastic.

Edit: I should add that the no-js fallback should just be a textbox, as it was pre-3.4, so I'm not sure this button would be useful in any current context.

Last edited 2 years ago by DrewAPicture (previous) (diff)

comment:6 follow-up: @helenyhou2 years ago

I guess it does help with no JS, since it's an actual form submit, but the fallback to an input is there as well.

comment:7 in reply to: ↑ 6 ; follow-up: @nacin2 years ago

Replying to helenyhou:

I guess it does help with no JS, since it's an actual form submit, but the fallback to an input is there as well.

Right, but does the input allow for falling back (resetting) to the default color?

comment:8 in reply to: ↑ 7 ; follow-up: @helenyhou2 years ago

  • Keywords commit removed

Replying to nacin:

Right, but does the input allow for falling back (resetting) to the default color?

Nope, unless you knew what it was and enter it yourself. Wonder if we can make a generic fallback for resetting to default. Too late?

comment:9 in reply to: ↑ 8 @DrewAPicture2 years ago

Replying to helenyhou:

Nope, unless you knew what it was and enter it yourself. Wonder if we can make a generic fallback for resetting to default. Too late?

What about just falling back to a text input and outputting a label next to it with the default color?

Header Text Color		#[	] Default: #000000
Last edited 2 years ago by DrewAPicture (previous) (diff)

@DrewAPicture2 years ago

+ no-js label

comment:10 @DrewAPicture2 years ago

  • Cc xoodrew@… added

An approach similar to comment:9 is in 22461.2.diff and looks like this: http://cl.ly/image/12411v3x2t2f

Also note the vertical alignments seem generally off in Chrome.

Version 0, edited 2 years ago by DrewAPicture (next)

@lessbloat2 years ago

comment:11 @lessbloat2 years ago

In 22461.3.diff​ just moved the default text up next to the field, and added class="description":

http://f.cl.ly/items/3l1D1l193R3s0u062Y41/22461.3.jpg

comment:12 @DrewAPicture2 years ago

Looks good to me. Also noticed there's an extra space after the hex code in the printf we can remove.

@DrewAPicture2 years ago

errant space

comment:13 @DrewAPicture2 years ago

22461.4.diff just removed the errant space in the string.

@DrewAPicture2 years ago

removes resettext $_POST bits

comment:14 @helenyhou2 years ago

22461.5.diff is looking good to me. Thanks for remembering to remove the $_POST part :)

comment:15 @helenyhou2 years ago

Also, opened #22509 for a generic default color fallback in no-JS.

comment:16 @nacin2 years ago

  • Keywords commit added

comment:17 @nacin2 years ago

  • Owner set to nacin
  • Status changed from new to accepted

comment:18 @nacin2 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 22695:

Custom Header: Remove Farbtastic-era "Reset Text Color" button. Show default color when JS is disabled. props DrewAPicture. fixes #22461.

Note: See TracTickets for help on using tickets.