Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22725 closed defect (bug) (fixed)

Gallery Cleared Unexpectedly

Reported by: miqrogroove's profile miqrogroove Owned by: koopersmith's profile koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

To reproduce:

  1. Select images.
  2. Click Create a new gallery.
  3. Click Add to Gallery.
  4. Click Cancel Gallery.

Compare to:

  1. Select images.
  2. Click Create a new gallery.
  3. Click Add to Gallery.
  4. Click Edit Gallery.
  5. Click Cancel Gallery.

Depending on which page the user clicks Cancel Gallery, the image selection may or may not be preserved.

Attachments (1)

22725.diff (6.1 KB) - added by koopersmith 12 years ago.

Download all attachments as: .zip

Change History (11)

#1 @miqrogroove
12 years ago

Also: Any additions or edits made to the gallery will be reverted when clicking Cancel from the Edit page. So there are three different outcomes: Gallery preserved, gallery reverted, and gallery cleared.

#2 @jeremyfelt
12 years ago

Can reproduce.

First scenario in the description results in 'Create Gallery' view with no images selected. Second scenario results in 'Create Gallery' view with the original images selected.

Question is what the expected behavior should be...

#3 @jeremyfelt
12 years ago

IMO...

Images should stay selected. It's easy enough to clear the selected set if you want to redo a gallery build. If you were to accidentally hit cancel and lose your selections, that would suck more.

So, results from second scenario would be ideal.

#4 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5
  • Owner set to koopersmith
  • Status changed from new to assigned

koopersmith is working on smoothing over the selection sharing.

@koopersmith
12 years ago

#5 @koopersmith
12 years ago

  • Keywords has-patch needs-testing added

Patch improves selection sharing. It will update the relevant parts of the selection while retaining any items that are not applicable in the current view (like videos in the create gallery tab). Generally, the behavior should be sensible.

#6 @lessbloat
12 years ago

22725.diff​ works for me. +1.

#7 @sabreuse
12 years ago

The patch works for me

#8 @helenyhou
12 years ago

Another +1

#9 @koopersmith
12 years ago

  • Keywords commit added; needs-testing removed

#10 @markjaquith
12 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 23089:

New method of managing media selections. There is now a "master" selection in the background. props koopersmith. fixes #22725

  • This especially helps when you switch between insert/gallery and have non-images selected (as galleries don't support non-images).
  • The views now act as filters on the "master" selection, instead of having their own selections that get passed around.
Note: See TracTickets for help on using tickets.