Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#53787 assigned enhancement

Allow changing number of attachments displayed

Reported by: grapplerulrich's profile grapplerulrich Owned by: antpb's profile antpb
Milestone: Future Release Priority: normal
Severity: normal Version: 5.8
Component: Media Keywords:
Focuses: ui, javascript, administration Cc:

Description

#50105 introduced a new load more button to replace infinite scroll for media library.

In the initial version the number of per page is set in the code to 40.

In #50105 was discussed adding a filter to make it developer customizable. There are use cases for having more or less than the default 40. This should apply for the initial and later requests.

In a second step:

It would be nice if this were user controllable like posts per page, or terms per page are from the screen options tab. We would need to integrate this into the modal itself though since it operates in numerous contexts.

from @adamsilverstein


Change History (18)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

#4 @shaunbowen
3 years ago

This should be a simple option in the WordPress Media Settings for logged in users.

Either ON or LIMIT to [Qty.]

This ticket was mentioned in Slack in #core-media by hellofromtonya. View the logs.


3 years ago

#6 @hellofromTonya
3 years ago

#53916 was marked as a duplicate.

#7 @hellofromTonya
3 years ago

Copying notes from a duplicate ticket opened today from the Media Components team:

@antpb wrote in ticket #53916:

In #53827 it was reported that the count of items loaded when clicking the "load more items" button in the Media Library was too low and caused many clicks to get to an item that folks wanted.

In 53827 we are increasing the count from 40 to 80 as a temporary way to solve this issue in a minor release. This value should be configurable in some way.

A future enhancement for this has a few directions we could go
1) Screen Option (which inherits a filter to set a value)
2) Just a plain filter that allows the value to be customized
3) ??? Any better ones?

@pbiron wrote:

My preference would be to add a screen option. this would be analogous to the Number of items per page screen option in list mode.

There has been some talk of "load as many items as are already showing" when the "Load more" button is clicked. That would be kind of hard to do with a screen option, but I'm not sure doing that is a good itea, anyway :-)

#8 @hellofromTonya
3 years ago

  • Milestone changed from Awaiting Review to 5.9

During today's Media Component meeting, it was agreed to address this enhancement in the 5.9 cycle.

Next step for this ticket? Discuss the different ways to achieve customization and then get consensus.

This ticket was mentioned in Slack in #core-media by hellofromtonya. View the logs.


3 years ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

#12 @antpb
3 years ago

Worth noting in this ticket that currently screen options are not visible in the grid view of the Media Library. Part of this task will likely be exposing that UI in the grid view.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

#14 @antpb
3 years ago

  • Milestone changed from 5.9 to Future Release

The remaining tasks for this would be

  1. Expose screen options in grid view (could be unintended issues)
  2. Add logic to control attachment count

Another option @joedolson pointed out is that we could add this control in settings > media

Either one is a good enhancement but may not make it in time for 5.9. If anyone has the availability to add this before November 9th please feel free!

Version 0, edited 3 years ago by antpb (next)

#15 @joedolson
3 years ago

  • Owner set to joedolson
  • Status changed from new to accepted

#16 @grapplerulrich
3 years ago

I think the first step of adding some type of filter so that developers can at least change the number has gone a bit under. That can be done before we need to tackle making changes to the screen options.

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


3 years ago

#18 @antpb
3 years ago

  • Owner changed from joedolson to antpb
  • Status changed from accepted to assigned

Owning this and hoping to have a patch soon!

Note: See TracTickets for help on using tickets.