WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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:
PR Number:

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

Download all attachments as: .zip

Change History (25)

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


2 years ago

#2 @westonruter
2 years 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
2 years 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
2 years 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
2 years 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
2 years ago

Gallery widget populated with images

@westonruter
2 years ago

Selecting images for adding to gallery widget

@westonruter
2 years ago

Editing images that had been selected for gallery

#6 @westonruter
2 years ago

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

@westonruter
2 years ago

Gallery widget empty in initial state

#7 @westonruter
2 years 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
2 years ago

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

#10 follow-up: @rabmalin
2 years 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
2 years 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 years 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.


2 years ago

#15 @westonruter
2 years 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
2 years 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.


2 years ago

#18 @westonruter
2 years ago

In 41951:

Widgets: Improve extensibility of the Gallery widget and of media widgets generally.

  • Introduce a widget_{$id_base}_instance_schema filter for plugins to add new properties to a media widget's instance schema.
  • Pass all of a gallery widget's instance props to the gallery media frame, not just the ones that core supports.

See #32417, #41914.
Fixes #42285.

Note: See TracTickets for help on using tickets.