WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 8 months ago

#22058 new enhancement

Custom background vertical position

Reported by: grapplerulrich Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4.2
Component: Appearance Keywords: 2nd-opinion has-patch needs-testing ui-feedback ux-feedback
Focuses: Cc:

Description

For the the custom background display options there is only left, centre and right position. The top and bottom position is missing.

Attachments (8)

custom-background.php (17.1 KB) - added by grapplerulrich 18 months ago.
custom-background
theme.php (52.7 KB) - added by grapplerulrich 18 months ago.
theme.php
22058.patch (4.4 KB) - added by SergeyBiryukov 18 months ago.
A patch with grapplerulrich's changes
22058.2.patch (5.6 KB) - added by grapplerulrich 18 months ago.
22058.patch
22058.3.patch (7.2 KB) - added by grapplerulrich 18 months ago.
22058.2.patch​
22058.diff (10.6 KB) - added by cdog 12 months ago.
22058-editor.png (15.3 KB) - added by cdog 8 months ago.
22058-presets.png (14.4 KB) - added by cdog 8 months ago.

Download all attachments as: .zip

Change History (33)

comment:1 SergeyBiryukov19 months ago

  • Component changed from Themes to Appearance

comment:2 MikeHansenMe19 months ago

  • Cc mdhansen@… added

Related post on the forum http://wordpress.org/support/topic/twenty-ten-align-background-to-bottom


I think adding this to customizer is a good idea. I tested background-position: left bottom; and it works in Chromium 20 and Firefox 15. We may need to check if IE8 would support the vertical position.

comment:3 grapplerulrich18 months ago

  • Keywords 2nd-opinion added

I created a solution. I attached the two files that I edited.
Here is the test site I am running on.
http://www.grappler.tk/wpdev/

This is my first edit so please bear with me.

comment:4 SergeyBiryukov18 months ago

  • Keywords needs-patch added

Rather than full files, you can submit a patch using Subversion:
http://make.wordpress.org/core/handbook/submitting-a-patch/

grapplerulrich18 months ago

custom-background

grapplerulrich18 months ago

theme.php

comment:5 grapplerulrich18 months ago

I have changed the files to patches.
Here is a screenshot of the admin view.
http://pix.am/LSq0/

I tested in in IE7-9, Opera, FF and Chrome on Win7 and it works.

SergeyBiryukov18 months ago

A patch with grapplerulrich's changes

comment:6 SergeyBiryukov18 months ago

  • Keywords has-patch added; needs-patch removed

comment:7 MikeHansenMe18 months ago

Tested the patch and it works well. We need to also add this to customizer.

grapplerulrich18 months ago

22058.patch

comment:8 grapplerulrich18 months ago

I have added the patch with the customizer. Here is a screenshot.
http://pix.am/dPVz/

comment:9 follow-up: MikeHansenMe18 months ago

@grapplerurlrich the patch works if you set horizontal then the vertical but if you go back to change the horizontal after setting vertical it sets vertical to top. At least in the preview, it does save them correctly and display as expected on the site.

comment:10 in reply to: ↑ 9 grapplerulrich18 months ago

Replying to MikeHansenMe:

@grapplerurlrich the patch works if you set horizontal then the vertical but if you go back to change the horizontal after setting vertical it sets vertical to top. At least in the preview, it does save them correctly and display as expected on the site.

What tool do you use to minifiy the js?

comment:11 MikeHansenMe18 months ago

Set define( 'SCRIPT_DEBUG', true); then edit the dev.js file instead of the min file.

grapplerulrich18 months ago

22058.2.patch​

comment:12 follow-up: grapplerulrich18 months ago

@MikeHansenMe Thanks, I updated the patch. I also saw a problem with the "background-attachment:" and fixed that too. How long will it take for it to be implemented in WordPress?

comment:13 in reply to: ↑ 12 MikeHansenMe18 months ago

Replying to grapplerulrich:

@MikeHansenMe Thanks, I updated the patch. I also saw a problem with the "background-attachment:" and fixed that too. How long will it take for it to be implemented in WordPress?

Tested and can confirm the customizer is now working as expected. We are currently in a feature freeze for this release cycle so it will likely be reviewed after 3.5 comes out when enhancements are being considered. Thanks for contributing.

comment:15 follow-up: MikeHansenMe12 months ago

Patch still applies but tested again and the changing the vertical position to center shows no change. It does save the change but does not show the change immediately as the horizontal change does.

Last edited 12 months ago by MikeHansenMe (previous) (diff)

cdog12 months ago

comment:16 in reply to: ↑ 15 cdog12 months ago

Replying to MikeHansenMe:

Patch still applies but tested again and the changing the vertical position to center shows no change. It does save the change but does not show the change immediately as the horizontal change does.

Please check: attachment:22058.diff. I've refreshed the patch and filled out missing parts.

comment:17 follow-up: MikeHansenMe12 months ago

Patch does not seem to show the change when center or bottom are selected.

comment:18 in reply to: ↑ 17 cdog12 months ago

Replying to MikeHansenMe:

Patch does not seem to show the change when center or bottom are selected.

I'm testing it in Firefox 16 with Twenty Eleven and it works as intended, both from Theme Customizer and Appearance > Background.

comment:19 follow-up: MikeHansenMe12 months ago

When you change the vertical positioning of the background image the preview does not update. It does after saving and refreshing. However, it should happen like horizontal does with immediate preview before saving. I tested using FF 20 and Chrome 25 on Ubuntu. I can test on Windows tonight to see if it works on Windows w/ IE.

comment:20 in reply to: ↑ 19 cdog12 months ago

  • Keywords needs-testing added

Replying to MikeHansenMe:

When you change the vertical positioning of the background image the preview does not update. It does after saving and refreshing.

Are you sure you're testing the latest patch? Please revert any changes and then apply attachment:22058.diff. Just tested it on IE and it seems to behave correctly. Where exactly do you encounter the issue, in Theme Customizer, in Appearance > Background or both? What are the steps to repoduce it? Thanks for helping.

comment:21 follow-up: MikeHansenMe12 months ago

I am running the most current trunk version(3.6-beta1-24023) and reverting all patches prior to testing. Then applying your patch 22058.diff

Please see the video for explanation
http://bit.ly/11CSUBC

Last edited 12 months ago by MikeHansenMe (previous) (diff)

comment:22 in reply to: ↑ 21 cdog12 months ago

Replying to MikeHansenMe:

Please see the video for explanation
http://bit.ly/11CSUBC

Well, that's really strange. Just tested it again, now using IE9 and FF21 on Windows and it works as expected. Please check that you have defined SCRIPT_DEBUG in your wp-config.php file:

define('WP_DEBUG', true);
define('SCRIPT_DEBUG', true);

It seems that everything is loaded, except recent changes to JS. Maybe you're using the minified scripts which are not affected by the patch. If it's not this, please take a look at the console and let me know if there are any errors. Thanks!

comment:23 follow-up: bpetty12 months ago

I'm seeing the same thing as MikeHansenMe in Chrome 25.0.1364.160.

... and yes, I'm using SCRIPT_DEBUG.

comment:24 in reply to: ↑ 23 cdog12 months ago

Replying to bpetty:

I'm seeing the same thing as MikeHansenMe in Chrome 25.0.1364.160.

... and yes, I'm using SCRIPT_DEBUG.

After applying the patch go to Appearance > Background (or Customize). Then press Ctrl + F5 to reload (override cache) and try uploading an image again. Please let me know if it helps.

cdog8 months ago

cdog8 months ago

comment:25 cdog8 months ago

  • Cc catalin.dogaru@… added
  • Keywords ui-feedback ux-feedback added

Current patch still applies but I'm not really satisfied with the growing list of radio buttons. I've attached two concepts illustrating variations of the idea that could improve the interface and usability.

attachment:22058-editor.png puts accent not only on functionality but on UI improvements too.

attachment:22058-presets.png simplifies the idea even more exposing only common background settings presets. It's not as flexible as the first solution but it's much easier to use.

What do you think and which one do you prefer? Would it improve the existing UI/UX?

Last edited 8 months ago by cdog (previous) (diff)
Note: See TracTickets for help on using tickets.