WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

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

Download all attachments as: .zip

Change History (37)

@trepmal2 years ago

comment:1 @lancewillett2 years 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 @obenland2 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.

comment:3 @DrewAPicture2 years ago

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

comment:4 @lancewillett2 years ago

  • Keywords ui-feedback removed

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

@lancewillett2 years ago

Adds styling for caption text and alignment

comment:5 @lancewillett2 years ago

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

comment:6 @lancewillett2 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.

comment:7 follow-up: @obenland2 years ago

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

@SergeyBiryukov2 years ago

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

@obenland2 years ago

comment:9 follow-up: @obenland2 years 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: @lancewillett2 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.

comment:11 in reply to: ↑ 10 @obenland2 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.

@obenland2 years ago

Hidden captions, visible on hover, preserving image margins.

@obenland2 years ago

Hidden captions, visible on hover, preserving image margins.

comment:12 @obenland2 years ago

Refreshed.

comment:13 in reply to: ↑ 10 @SergeyBiryukov2 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 2 years ago by SergeyBiryukov (previous) (diff)

comment:14 @obenland2 years ago

No way! :) Thanks for the heads up!

The second .5 is good though. Finally.

comment:15 @lancewillett2 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.

@kwight2 years ago

comment:16 @kwight2 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.

comment:17 @lancewillett2 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.

@obenland2 years ago

Gallery captions, props Joen

comment:18 @obenland2 years ago

  • Keywords needs-testing added; ui-feedback removed

comment:19 @lancewillett2 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).

comment:20 @kwight2 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.

comment:21 @RDall2 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 2 years ago by RDall (previous) (diff)

comment:22 @obenland2 years ago

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

comment:23 @RDall2 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.

comment:24 @RDall2 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.

comment:25 @obenland2 years ago

  • Keywords 2nd-opinion removed

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

comment:26 @obenland2 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?

comment:27 @RDall2 years ago

@obenland Here is the opened ticket #23742

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

comment:28 @lancewillett2 years ago

In 23671:

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

comment:29 @lancewillett2 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.