Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23584 closed defect (bug) (fixed)

Twenty Thirteen: Gallery captions are hidden

Reported by: trepmal's profile trepmal Owned by: lancewillett's profile 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 11 years ago.
23584.2.diff (539 bytes) - added by lancewillett 11 years ago.
Adds styling for caption text and alignment
23584.3.diff (376 bytes) - added by SergeyBiryukov 11 years ago.
23584.4.diff (624 bytes) - added by obenland 11 years ago.
23584.5.diff​ (1.1 KB) - added by obenland 11 years ago.
Hidden captions, visible on hover, preserving image margins.
23584.5​.diff (1.1 KB) - added by obenland 11 years ago.
Hidden captions, visible on hover, preserving image margins.
23584.5.diff (1.1 KB) - added by kwight 11 years ago.
23584.6.diff (1.3 KB) - added by obenland 11 years ago.
Gallery captions, props Joen

Download all attachments as: .zip

Change History (37)

@trepmal
11 years ago

#1 @lancewillett
11 years ago

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

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

#2 @obenland
11 years 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.

#3 @DrewAPicture
11 years ago

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

#4 @lancewillett
11 years ago

  • Keywords ui-feedback removed

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

@lancewillett
11 years ago

Adds styling for caption text and alignment

#5 @lancewillett
11 years ago

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

#6 @lancewillett
11 years 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.

#7 follow-up: @obenland
11 years ago

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

#8 in reply to: ↑ 7 @SergeyBiryukov
11 years 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.

@obenland
11 years ago

#9 follow-up: @obenland
11 years ago

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

#10 in reply to: ↑ 9 ; follow-ups: @lancewillett
11 years 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.

#11 in reply to: ↑ 10 @obenland
11 years 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.

@obenland
11 years ago

Hidden captions, visible on hover, preserving image margins.

@obenland
11 years ago

Hidden captions, visible on hover, preserving image margins.

#12 @obenland
11 years ago

Refreshed.

#13 in reply to: ↑ 10 @SergeyBiryukov
11 years 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 hard to spot in UTF-8, but becomes visible in ISO-8859-1, for example.

Last edited 11 years ago by SergeyBiryukov (previous) (diff)

#14 @obenland
11 years ago

No way! :) Thanks for the heads up!

The second .5 is good though. Finally.

#15 @lancewillett
11 years 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.

@kwight
11 years ago

#16 @kwight
11 years 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.

#17 @lancewillett
11 years 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.

@obenland
11 years ago

Gallery captions, props Joen

#18 @obenland
11 years ago

  • Keywords needs-testing added; ui-feedback removed

#19 @lancewillett
11 years 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).

#20 @kwight
11 years 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.

#21 @RDall
11 years 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 11 years ago by RDall (previous) (diff)

#22 @obenland
11 years ago

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

#23 @RDall
11 years 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.

#24 @RDall
11 years 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.

#25 @obenland
11 years ago

  • Keywords 2nd-opinion removed

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

#26 @obenland
11 years 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?

#27 @RDall
11 years ago

@obenland Here is the opened ticket http://core.trac.wordpress.org/ticket/23742

Version 0, edited 11 years ago by RDall (next)

#28 @lancewillett
11 years ago

In 23671:

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

#29 @lancewillett
11 years 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.