WordPress.org

Make WordPress Core

#23584 closed defect (bug) (fixed)

Twenty Thirteen: Gallery captions are hidden

Reported by: trepmal Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Looking at style.css, hiding image captions in galleries seems like it was an intentional choice.

Maybe it's just me, but I found that to be rather unexpected and first wondered if there was a bug somewhere rather than assume the theme was doing that on purpose.

Attachments (8)

23584.diff (442 bytes) - added by trepmal 14 months ago.
23584.2.diff (539 bytes) - added by lancewillett 14 months ago.
Adds styling for caption text and alignment
23584.3.diff (376 bytes) - added by SergeyBiryukov 14 months ago.
23584.4.diff (624 bytes) - added by obenland 14 months ago.
23584.5.diff​ (1.1 KB) - added by obenland 14 months ago.
Hidden captions, visible on hover, preserving image margins.
23584.5​.diff (1.1 KB) - added by obenland 14 months ago.
Hidden captions, visible on hover, preserving image margins.
23584.5.diff (1.1 KB) - added by kwight 14 months ago.
23584.6.diff (1.3 KB) - added by obenland 14 months ago.
Gallery captions, props Joen

Download all attachments as: .zip

Change History (37)

trepmal14 months ago

comment:1 lancewillett14 months ago

  • Keywords ui-feedback added
  • Milestone changed from Awaiting Review to 3.6

Thanks for the report -- I think they should be displayed.

comment:2 obenland14 months ago

We should check back with Joen, AFAIK it was a design decision to "only" show them on attachment pages. Otherwise it would break up the 4px margin we have on all galleries.

comment:3 DrewAPicture14 months ago

I also think captions should be displayed by default. This is something users would expect out of the box.

comment:4 lancewillett14 months ago

  • Keywords ui-feedback removed

I agree with DrewAPicture, gallery captions are expected output of a gallery, we'll need to style accordingly.

lancewillett14 months ago

Adds styling for caption text and alignment

comment:5 lancewillett14 months ago

I updated trepmal's patch to add in basic styles: italic, lighter color, better alignment.

comment:6 lancewillett14 months ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In 23559:

Twenty Thirteen: display caption in galleries. Fixes #23584.

comment:7 follow-up: obenland14 months ago

What was the reason for separating out the width from the other attributes?

SergeyBiryukov14 months ago

comment:8 in reply to: ↑ 7 SergeyBiryukov14 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to obenland:

What was the reason for separating out the width from the other attributes?

Doesn't look intended to me.

obenland14 months ago

comment:9 follow-up: obenland14 months ago

Can we talk a little bit more about this? We already have caption styles, can't we use those?

comment:10 in reply to: ↑ 9 ; follow-ups: lancewillett14 months ago

Replying to obenland:

Can we talk a little bit more about this? We already have caption styles, can't we use those?

Yes, open to discussing a better style if we already have one. I didn't see it when I looked. Do you mean only visible on hover?

Replying to obenland:

What was the reason for separating out the width from the other attributes?

Oops, my mistake. Was not intentional.

BTW, something is wrong with your .5 patch, looks unformatted when I view it in Trac.

comment:11 in reply to: ↑ 10 obenland14 months ago

Replying to lancewillett:

Yes, open to discussing a better style if we already have one. I didn't see it when I looked. Do you mean only visible on hover?
BTW, something is wrong with your .5 patch, looks unformatted when I view it in Trac.

Whops, let me refresh that. Yes, .5 introduces a hover solution, similar to how captions in tiled galleries are handled.

obenland14 months ago

Hidden captions, visible on hover, preserving image margins.

obenland14 months ago

Hidden captions, visible on hover, preserving image margins.

comment:12 obenland14 months ago

Refreshed.

comment:13 in reply to: ↑ 10 SergeyBiryukov14 months ago

Replying to lancewillett:

BTW, something is wrong with your .5 patch, looks unformatted when I view it in Trac.

It contains %E2%80%8B (zero width space) as a part of filename extension, so Trac doesn't recognize it. Happens when copying file names from Trac along with the .trac-rawlink icon.

Version 0, edited 14 months ago by SergeyBiryukov (next)

comment:14 obenland14 months ago

No way! :) Thanks for the heads up!

The second .5 is good though. Finally.

comment:15 lancewillett14 months ago

That style is much nicer. I'd personally love to see more than 1-2 words in my captions, though. Let's discuss more during Tuesday office hours.

kwight14 months ago

comment:16 kwight14 months ago

I took a crack at adding a taller ( 50%) caption (still leaving the top 50% for the image link).

Also reduced line-height to display 3 lines well, and a cut-off fourth, if it exists, to demonstrate there's more.

comment:17 lancewillett14 months ago

  • Keywords ui-feedback added

We're looping this back to the theme designer, Joen, to get his take on the best approach. Will update here with a refreshed patch tomorrow.

obenland14 months ago

Gallery captions, props Joen

comment:18 obenland14 months ago

  • Keywords needs-testing added; ui-feedback removed

comment:19 lancewillett14 months ago

Testing out patch, it looks really great.

Noting one small UX issue, you can't click on the captions to get to single image view (could be an OK tradeoff).

comment:20 kwight14 months ago

Patch looks awesome.

Re: single image link; I would vote leaving it as-is. I don't think users will be confused, and it avoids having to add link markup for the caption too.

comment:21 RDall13 months ago

Hi I tried adding a gallery to my dev build of the twenty thirteen and found a couple layout issues.

See attached Screenshot. (Screenshot is reduced to show full gallery view)

2 col gallery

The details:

8 images in single post gallery view.
The thumbnail size was increased to 200px from the default 150px.
Gallery set to 3 column view
Caption on the second image is 40 words long and a typical caption.

The text at the bottom of the page is in the content are of the page and not in the gallery.

If the gallery is set to 2 column the view is still the same.
If the gallery is set to 1 column the images do follow the one column and the caption is aligned left.

Last edited 13 months ago by RDall (previous) (diff)

comment:22 obenland13 months ago

@RDall, is that in the current state or with the latest patch applied?

comment:23 RDall13 months ago

Hi @obenland I grabbed the build from https://github.com/WordPress/WordPress/ But it is only locally hosted. To be sure I clone a new install on my server and recreate scenario.

comment:24 RDall13 months ago

  • Keywords 2nd-opinion added

@obenland I just replicated scenario with fresh clone from the github repo and saw exactly same results. http://sandbox.robertdall.com/?p=16 The default gallery in WordPress never did very well handling large captions of 41 words or so.

Year(s) ago before I as knowledgeable with WordPress as I am now. I posted a question to WordPress forums on how to only show the title of the image when in the thumbnail gallery view http://wordpress.org/support/topic/gallery-short-code-1?replies=3. Forum moderator Alchymyth was kind enough to drum up a snippet of code for a function file that would make it possible to only show the title of the image instead of the entire caption. I tried this snippit last night and it just messed up the index gallery CSS in twenty thirteen. With the difference sizes etc…

But maybe a return to this idea of having the caption show only on the single photo of the gallery and image titles on the gallery thumbnails would alleviate these formatting issues. Just a thought.

comment:25 obenland13 months ago

  • Keywords 2nd-opinion removed

Could you do me a favor and retest it, after applying the latest patch from this ticket?

comment:26 obenland13 months ago

Never mind, it's about the images breaking to a new line, not about the caption itself right? Would you mind opening a new ticket for that?

comment:27 RDall13 months ago

@obenland Here is the opened ticket #23742

Last edited 13 months ago by SergeyBiryukov (previous) (diff)

comment:28 lancewillett13 months ago

In 23671:

Twenty Thirteen: better styles for gallery captions. Props obenland, see #23584.

comment:29 lancewillett13 months ago

  • Keywords needs-testing removed
  • Resolution set to fixed
  • Status changed from reopened to closed

Please open new issues tickets in new tickets.

Note: See TracTickets for help on using tickets.