WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#22628 closed defect (bug) (fixed)

Improve switching between browser and upload state

Reported by: koopersmith Owned by: ryan
Priority: normal Milestone: 3.5
Component: Media Version: 3.5
Severity: normal Keywords: has-patch
Cc:

Description

Currently, the attachments browser falls back to the upload state when there are no items in the collection. There are two major failings with the current implementation:

  1. When first navigating to the media library, you see a flash of the upload state before the attachments load.
  2. When a filter with no items is selected, we show an empty content area.

By moving the upload state and switching code into the browser view, we can fix both of these problems and eliminate complexity in the state.

Attachments (4)

22628.diff (4.2 KB) - added by koopersmith 7 months ago.
22628.filter.fix.png (75.4 KB) - added by koopersmith 7 months ago.
22628.2.diff (4.1 KB) - added by koopersmith 7 months ago.
22628.3.diff (4.3 KB) - added by koopersmith 7 months ago.

Download all attachments as: .zip

Change History (13)

koopersmith7 months ago

comment:1 koopersmith7 months ago

A nice touch after this would be to add spinners when attachments are loading.

Last edited 7 months ago by koopersmith (previous) (diff)

comment:2 koopersmith7 months ago

This is what an empty filter looks like.

koopersmith7 months ago

comment:3 koopersmith7 months ago

Latest patch fixes vanishing view when switching back and forth.

comment:4 ryan7 months ago

Looks good.

comment:5 ryan7 months ago

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

This snuck in with [22919].

comment:6 ryan7 months ago

In 22923:

Revert accidental bits from r22919. see #22628

comment:7 ryan7 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This caused some problems with creating and editing galleries.

koopersmith7 months ago

comment:8 koopersmith7 months ago

Ah. Gallery problems were caused because they didn't have a content mode set. Fixed in latest patch.

comment:9 ryan7 months ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from reopened to closed

In 22945:

Improve switching between browser and upload state.

Props koopersmith
fixes #22628

Note: See TracTickets for help on using tickets.