Make WordPress Core

Opened 5 months ago

Last modified 2 months ago

#54091 assigned defect (bug)

Attachment details pane navigation not working after opening 81st (or greater) item and refreshing the browser

Reported by: ppetrov2c Owned by: joedolson
Milestone: 6.0 Priority: normal
Severity: trivial Version: 5.8
Component: Media Keywords:
Focuses: ui, javascript Cc:

Description

Setup:

  • clean 5.8;
  • twentytwentyone active;
  • no plugins active.

Steps to reproduce:

  • open media page;
  • click on the 41st item in the list;
  • notice the left arrow is enabled (which is to be expected, since there are previous items);
  • refresh the page.

Notice the left arrow now - it's disabled.

Not sure if this is intended, but since the item isn't loaded (in the grid), there's no previous but there's only next, which points to the first item. Clicking the right arrow goes to the it and you can't go back to the previous item.

Change History (7)

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


5 months ago

#2 @antpb
5 months ago

  • Milestone changed from Awaiting Review to 5.9

Thanks for reporting this @ppetrov2c ! I'm leaving a comment to note that in 5.8.1 the count per page was increased to 80 so in the case of this report, you'll be wanting to check the 81st result to reproduce what's being reported in this ticket.

Marking 5.9 as we investigate. :)

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


3 months ago

#4 @antpb
3 months ago

  • Owner set to joedolson
  • Status changed from new to assigned
  • Summary changed from Attachment details pane navigation not working after opening 41st (or greater) item and refreshing the browser to Attachment details pane navigation not working after opening 81st (or greater) item and refreshing the browser

Noting with the changes that doubled the count loaded initially, the problem number will now be 81st or greater. :)

Last edited 3 months ago by antpb (previous) (diff)

#5 @joedolson
3 months ago

This is directly caused by the fact that if you load more, then refresh the page, the collection is reset to the first 80 items, regardless of the additional items you've loaded. This doesn't stop a currently selected item from loading, but does break the item navigation, since the current item is effectively not in the collection.

There are a couple possible paths I can think of:

1) Implement a URL parameter that tracks the collection, so a refresh reloads everything previously loaded and the collection is inclusive. This would also be beneficial for introducing pagination.

2) Introduce an update to the previous item navigation so that it goes back to the last item in the current collection if the item is not itself in the current collection. Probably easier to implement, but I'm not sure it creates a particularly useful UI.

#6 @sabernhardt
2 months ago

  • Milestone changed from 5.9 to 6.0

Moving to 6.0 for now, though this might be appropriate in a minor release.

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


2 months ago

Note: See TracTickets for help on using tickets.