#20346 closed enhancement (fixed)
Improve layout of Appearance > Header with flexible-height headers added
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Appearance | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | sabreuse@…, aaroncampbell, tomaugerdotcom@…, mercijavier@…, zamoose@… |
Description
Support for flexible-height header images was added in #17242. In that ticket @aaroncampbell suggested we use Masonry to improve the layout of the Headers layout, http://core.trac.wordpress.org/ticket/17242#comment:63.
His patch applying Masonry to that page was then added in [20060], but @nacin found a bugs where the header images would overlap when Masonry was enabled, http://core.trac.wordpress.org/ticket/17242#comment:68. Masonry was then disabled in [20206] and removed entirely in [20340].
This ticket is to reintroduce Aaron's patch with Masonry, http://core.trac.wordpress.org/attachment/ticket/17242/17242.masonry.2.diff, and debug the overlapping images @nacin found. Or, create a different method for doing the same thing.
Attachments (6)
Change History (31)
comment:2
aaroncampbell
— 15 months ago
- Cc aaroncampbell added
comment:6
zamoose
— 9 months ago
This quite obviously requires the Masonry JS files to be put into wp-includes/js. Wasn't sure how to account for that in the .diff.
comment:7
SergeyBiryukov
— 9 months ago
- Version changed from trunk to 3.3
Version number indicates when the enhancement was initially suggested.
comment:8
zamoose
— 9 months ago
Whoops. Pass #2 -- let's move the Masonry enqueueing inside of the if().
comment:9
nacin
— 9 months ago
This doesn't look any different from [20060] except that we're actually waiting until DOM ready this time. If that was our original problem, d'oh.
comment:10
zamoose
— 9 months ago
That and the fact that Masonry freaks out if you don't wrap images in a call to imagesLoaded.
comment:11
follow-up:
↓ 13
nacin
— 9 months ago
- Milestone changed from Awaiting Review to 3.5
I was going to say that we should move that code into custom-header.js and make masonry a dependency, but we don't have a custom-header.js. wp_enqueue_script('custom-header') is fairly useless, in that case. :-)
comment:12
nacin
— 9 months ago
- Component changed from Themes to Appearance
comment:13
in reply to:
↑ 11
SergeyBiryukov
— 9 months ago
comment:14
nacin
— 9 months ago
Looks to me like the enqueueing in [20060] looks better than masonry2.diff. I don't remember what step 3 is, but masonry should be enqueued even when the theme doesn't support header-text, right?
comment:15
nacin
— 9 months ago
- Keywords needs-patch added; needs-testing has-patch removed
We should combine the approach in [20060] with the corrections in masonry2.diff.
SergeyBiryukov
— 9 months ago
comment:16
SergeyBiryukov
— 9 months ago
- Keywords has-patch added; needs-patch removed
20346.patch introduces custom-header.js (also useful for #20855) and adds Masonry as a dependency. Left out the 'columnWidth: 230' part, seems better without it.
comment:17
follow-up:
↓ 19
zamoose
— 9 months ago
- Version changed from 3.3 to trunk
Two notes:
1) Yes, it looks better without the columnWidth. I think I had that in as a legacy concern before I started messing with the imagesLoaded functionality.
2) I only enqueued it for custom headers since that's the only place it gets called and, well, efficiency?
comment:18
zamoose
— 9 months ago
- Version changed from trunk to 3.3
Crap. Not sure why it moved the version. Reverting.
comment:19
in reply to:
↑ 17
;
follow-up:
↓ 20
nacin
— 9 months ago
- Keywords needs-refresh commit added
Replying to zamoose:
2) I only enqueued it for custom headers since that's the only place it gets called and, well, efficiency?
I was referring specifically to the fact that it was in a current_theme_supports( 'custom-header', 'header-text' ) block. I assumed the 'header-text' part was simply missed, but wanted to be sure of the intent.
I'm game for 20346.patch — does need an enqueue, though.
comment:20
in reply to:
↑ 19
SergeyBiryukov
— 9 months ago
Replying to nacin:
I'm game for 20346.patch — does need an enqueue, though.
custom-header.js is already enqueued in js_includes():
http://core.trac.wordpress.org/browser/tags/3.4.2/wp-admin/custom-header.php#L173
comment:21
zamoose
— 9 months ago
What needs done here? Do I need to issue a refresh?
comment:22
SergeyBiryukov
— 9 months ago
- Keywords needs-refresh removed
comment:23
zamoose
— 9 months ago
Awesome.
comment:24
nacin
— 8 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [22228]:
comment:25
koopersmith
— 7 months ago
In 22504:
I worked up a new patch that's consistent with the current version of trunk AND should account for images. Take a look.