WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

Last modified 3 days ago

#41914 closed feature request (fixed)

Widgets: Add gallery widget

Reported by: westonruter Owned by: westonruter
Milestone: 4.9 Priority: high
Severity: normal Version:
Component: Widgets Keywords: has-patch commit has-unit-tests has-screenshots has-dev-note
Focuses: Cc:

Description (last modified by westonruter)

As media widgets were introduced in #32417 and an image widget in #39993, there should also be a Gallery widget as outlined at https://github.com/xwp/wp-core-media-widgets/issues/62

Pull request with implementation in Core Media Widgets feature plugin: https://github.com/xwp/wp-core-media-widgets/pull/120

GitHub project for gallery: https://github.com/xwp/wp-core-media-widgets/projects/4

Attachments (7)

41914.0.diff (30.6 KB) - added by westonruter 4 weeks ago.
https://github.com/xwp/wordpress-develop/pull/265
41914.1.diff (35.7 KB) - added by westonruter 4 weeks ago.
https://github.com/xwp/wordpress-develop/pull/265/files/9fca87f..2562ac1
41914.2.diff (39.2 KB) - added by westonruter 3 weeks ago.
https://github.com/xwp/wordpress-develop/pull/265/files/2562ac1..79890bd
gallery-widget-populated.png (372.5 KB) - added by westonruter 3 weeks ago.
Gallery widget populated with images
gallery-widget-select-frame.png (655.8 KB) - added by westonruter 3 weeks ago.
Selecting images for adding to gallery widget
gallery-widget-edit-frame.png (865.1 KB) - added by westonruter 3 weeks ago.
Editing images that had been selected for gallery
gallery-widget-empty.png (23.6 KB) - added by westonruter 3 weeks ago.
Gallery widget empty in initial state

Download all attachments as: .zip

Change History (24)

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


4 weeks ago

#2 @westonruter
4 weeks ago

  • Keywords has-patch needs-testing added

Gallery widget now available in the Core Media Widgets v0.2.0 feature plugin. Please test to support WP4.9 merge: https://wordpress.org/plugins/wp-core-media-widgets/

Report any issues at https://github.com/xwp/wp-core-media-widgets/issues

#3 @westonruter
4 weeks ago

  • Priority changed from normal to high

Bumping priority to high for visibility and alignment with 4.9 goals, and given proximity to beta 1 deadline.

#4 @westonruter
4 weeks ago

Issues reported for Gallery widget:

  • 190: Columns in gallery widget preview do not match the frontend
  • 191: Ensure core themes have styling compatibilities for gallery widgets

#5 @westonruter
4 weeks ago

  • Keywords commit added; needs-testing removed

@joemcgill FYI, see 41914.1.diff for a delta of additional changes I've made to the gallery widget in the core patch.

@westonruter
3 weeks ago

Gallery widget populated with images

@westonruter
3 weeks ago

Selecting images for adding to gallery widget

@westonruter
3 weeks ago

Editing images that had been selected for gallery

#6 @westonruter
3 weeks ago

  • Description modified (diff)
  • Keywords has-unit-tests has-screenshots added

@westonruter
3 weeks ago

Gallery widget empty in initial state

#7 @westonruter
3 weeks ago

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

In 41590:

Widgets: Introduce Gallery widget for displaying image galleries.

  • Galleries are managed in the widget in the same way they are managed in the post editor, both using the media manager.
  • Gallery widget is merged from the Core Media Widgets v0.2.0 feature plugin and it extends WP_Widget_Media in the same way as is done for image, audio, and video widgets.
  • Model syncing logic is updated to support booleans and arrays (of integers).
  • Placeholder areas in media widgets are now clickable shortcuts for selecting media.
  • Image widget placeholder is updated to match gallery widget where clicking preview is shortcut for editing media.

Props westonruter, joemcgill, timmydcrawford, m1tk00, obenland, melchoyce.
See #32417.
Fixes #41914.

#8 @westonruter
3 weeks ago

Follow-up: #41969 (Ensure Gallery widget is styled properly across widget areas in bundled themes)

#10 follow-up: @rabmalin
3 weeks ago

Small issue I noticed when I was testing the gallery widget. I opened Gallery widget in Customizer and changed only image caption, it does not refresh the preview.

#11 in reply to: ↑ 10 @westonruter
3 weeks ago

Replying to rabmalin:

Small issue I noticed when I was testing the gallery widget. I opened Gallery widget in Customizer and changed only image caption, it does not refresh the preview.

@rabmalin thanks, good catch. I opened a defect in #41979.

#13 @westonruter
2 weeks ago

In 41772:

Widgets: Remove "Replace Gallery" button from Gallery widget since redundant with "Edit Gallery".

Props Presskopp, juhise, melchoyce.
See #41914.
Fixes #41994.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


10 days ago

#15 @westonruter
8 days ago

In 41840:

Widgets: Update default link_type for Gallery widget from none to post for consistency with wp.media.galleryDefaults.

Props bor0.
See #41914.
Fixes #41985.

#16 @westonruter
3 days ago

In 41872:

Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.

  • Ensure that changes to captions are shown in preview when modified in media modal.
  • Also keep wp.customize.widgetsPreview.renderedWidgets updated when widgets are added or removed.

See #41914, #37887, #40403.
Fixes #41979.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


3 days ago

Note: See TracTickets for help on using tickets.