Make WordPress Core

Opened 21 months ago

Last modified 4 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's profile ppetrov2c Owned by: antpb's profile antpb
Milestone: 6.3 Priority: normal
Severity: trivial Version: 5.8
Component: Media Keywords: needs-patch dev-feedback
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 (18)

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


21 months ago

#2 @antpb
21 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.


19 months ago

#4 @antpb
19 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 19 months ago by antpb (previous) (diff)

#5 follow-up: @joedolson
19 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
19 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.


19 months ago

This ticket was mentioned in Slack in #core by costdev. View the logs.


14 months ago

#9 @costdev
14 months ago

  • Keywords needs-patch dev-feedback added

Per the discussion in the bug scrub, I'm adding needs-patch and also dev-feedback so that the suggestions Joe outlined in this comment can get some input from others.

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


14 months ago

#11 @antpb
14 months ago

  • Milestone changed from 6.0 to 6.1

Considering the time remaining in milestone and the workload of folks that can bring this across the line, this should move to 6.1. Happy to move back if anyone is able to help out on it! :D

#12 in reply to: ↑ 5 @mdawaffe
9 months ago

Replying to joedolson:

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.

We could also decide that left/right navigation does not makes sense for a media item unless that media item is loaded by clicking through to it from the list view. That is, if you visit, for example, http://localhost:8889/wp-admin/upload.php?item=6 directly (or if you reload the page when on that URL), we could not show the left/right navigation buttons at all.

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


9 months ago

#14 @antpb
9 months ago

  • Milestone changed from 6.1 to 6.2

considering the new recommended path forward, this needs time to have an agreed and developed fix. Moving this to 6.2 to allow it the time needed.

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


7 months ago

#16 @antpb
7 months ago

  • Owner changed from joedolson to antpb

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


4 months ago

#18 @antpb
4 months ago

  • Milestone changed from 6.2 to 6.3

Joe and I have been discussing this one but think that it is likely best fit for 6.3 as any changes here have high risk of introducing issues.

Note: See TracTickets for help on using tickets.