Opened 3 months ago

Closed 2 months ago

#23584 closed defect (bug) (fixed)

Twenty Thirteen: Gallery captions are hidden

Reported by: trepmal Owned by: lancewillett
Priority: normal Milestone: 3.6
Component: Bundled Theme Version: trunk
Severity: normal Keywords: has-patch
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 3 months ago.
23584.2.diff (539 bytes) - added by lancewillett 3 months ago.
Adds styling for caption text and alignment
23584.3.diff (376 bytes) - added by SergeyBiryukov 3 months ago.
23584.4.diff (624 bytes) - added by obenland 3 months ago.
23584.5.diff​ (1.1 KB) - added by obenland 2 months ago.
Hidden captions, visible on hover, preserving image margins.
23584.5​.diff (1.1 KB) - added by obenland 2 months ago.
Hidden captions, visible on hover, preserving image margins.
23584.5.diff (1.1 KB) - added by kwight 2 months ago.
23584.6.diff (1.3 KB) - added by obenland 2 months ago.
Gallery captions, props Joen

Download all attachments as: .zip

Change History (37)

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

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

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.

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

  • Keywords ui-feedback removed

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

Adds styling for caption text and alignment

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

  • 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: ↓ 8   obenland3 months ago

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

comment:8 in reply to: ↑ 7   SergeyBiryukov3 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.

comment:9 follow-up: ↓ 10   obenland3 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: ↓ 11 ↓ 13   lancewillett2 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   obenland2 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.

Hidden captions, visible on hover, preserving image margins.

Hidden captions, visible on hover, preserving image margins.

Refreshed.

comment:13 in reply to: ↑ 10   SergeyBiryukov2 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.

It's invisible and is hard to spot in UTF-8, but becomes visible in ISO-8859-1, for example.

Version 1, edited 2 months ago by SergeyBiryukov (previous) (next) (diff)

No way! :) Thanks for the heads up!

The second .5 is good though. Finally.

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.

kwight2 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.

  • 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.

Gallery captions, props Joen

  • Keywords needs-testing added; ui-feedback removed

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).

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.

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 2 months ago by RDall (previous) (diff)

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

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.

  • 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.

  • Keywords 2nd-opinion removed

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

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?

@obenland Here is the opened ticket #23742

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

In 23671:

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

  • 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.