WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 12 months ago

#26695 new enhancement

Themes: add support for multiple screenshots in themes

Reported by: matveb Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.8
Component: Themes Keywords: dev-feedback
Focuses: ui, administration Cc:

Description

We left this out from the THX merge due to priorities. Let's bring them back.

Previously: #20546.

  • Method to get an array with all the screenshots with a maximum of 5.
  • Pass this data to wp_prepare_themes_for_js.
  • Adjust template to loop through all the screenshots (if available) and render them.
  • Set up a simple JS gallery with thumbnails on the detailed view of a theme.

Array begins with screenshot.png as the first item, then continues with screenshot-2.png.

Attachments (2)

26695.diff (5.1 KB) - added by matveb 6 years ago.
26695_v2.diff (6.2 KB) - added by ader 5 years ago.
Added: cache, most popular extensions, screenshot directory with directory listing, effects on click event

Download all attachments as: .zip

Change History (19)

@matveb
6 years ago

#1 @matveb
6 years ago

To-do: support all standard file types for screenshots, not just PNGs; and use the caching system.

#2 @matveb
6 years ago

  • Keywords dev-feedback added

#3 @dreamwhisper
6 years ago

  • Cc baumann@… added

#5 @nacin
6 years ago

Some thoughts:

  • Why five? Design reasons? Or is this arbitrary? Could we allow 10 if we wanted? Or an arbitrary number?
  • Screenshots are not tiny, and are getting bigger due to responsive and retina adjustments. We may be better off keeping these out of the zip and serving them from the WP.org CDN. (matveb actually suggested this.)
  • Why non-PNGs? Core will detect any screenshot type currently, but wordpress.org's themes directory will only allow PNG. Supporting only PNG for screenshot-2+ seems like no loss of functionality, if that was the concern. On the other hand: JPGs of course compress better and maybe it's time to allow those so authors can use them when they see fit?

#6 @matveb
6 years ago

Thanks for the feedback!

  • Mostly a design constrain, but pretty much an arbitrary one at that. Is it worth having such a constrain? Displaying 10 screenshots will probably not look that great. Still, themes do a lot of different stuff, and some come with crazy amounts of color schemes... What would be a sensible thing to present to people choosing one, though? It's also easier to add more than to remove in the future. (Also slightly connected with loading stuff from the CDN or bundling with the theme.)
  • Yes. Downloading a bunch of retina screenshots that are not critical to a theme functionality could become too much of a burden. If we can figure out a way to elegantly load them from .org it'll probably help, and give us more flexibility in the long run to try more things (like header-to-footer screenshots).
  • If we can go PNG only for screenshot-2+ I'd say great :)

#7 @ocean90
5 years ago

#19816 was marked as a duplicate.

#8 @nacin
5 years ago

  • Component changed from Appearance to Themes
  • Focuses administration added

#9 @johnbillion
5 years ago

  • Focuses ui added
  • Version changed from trunk to 3.8

@ader
5 years ago

Added: cache, most popular extensions, screenshot directory with directory listing, effects on click event

#10 @ader
5 years ago

  • Version changed from 3.8 to trunk

Hi,
I've extended submitted patch and fixed some bugs. Now it supports multiple images read from screenshots directory. Screenshots must follow "screenshot-{number}.{extension}" naming convention. I've also added support for all standard file extensions, added caching, fading effect when clicking on thumbnails. I didn't touch css because in my opinion it looks good. Diff was made on trunk version.

To do:

  1. Test caching.
  2. Perhaps limit the number of screenshots.
  3. I've just noticed that clicking on thumbs doesn't work when there is only one theme.

#11 @SergeyBiryukov
5 years ago

  • Version changed from trunk to 3.8

Version field indicates when the enhancement was initially suggested.

#12 @celloexpressions
4 years ago

  • Milestone changed from Awaiting Review to Future Release

Would be nice to bring this back at some point, possibly in 4.4 alongside theme-install in the Customizer. Shouldn't be too difficult to implement within the theme details modal, but we'd definitely want to load them from the .org API if possible rather than bundling with the theme.

This ticket was mentioned in Slack in #themereview by jcastaneda. View the logs.


4 years ago

This ticket was mentioned in Slack in #themereview by celloexpressions. View the logs.


3 years ago

This ticket was mentioned in Slack in #themereview by jcastaneda. View the logs.


2 years ago

This ticket was mentioned in Slack in #themereview by emiluzelac. View the logs.


20 months ago

This ticket was mentioned in Slack in #meta by sergey. View the logs.


12 months ago

Note: See TracTickets for help on using tickets.