Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataviews Pagination: Deleting the last item on a page should navigate to the previous page (if exists) instead of showing No results #68707

Open
3 of 6 tasks
yogeshbhutkar opened this issue Jan 16, 2025 · 0 comments · May be fixed by #68709
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@yogeshbhutkar
Copy link
Contributor

Description

When there is only one data item on a page in the DataViewsPagination component, and that item is deleted, the pagination should automatically navigate to the previous page.

Currently, the behavior results in displaying a 'No results' message, which is not the expected behavior. This issue needs to be addressed to improve the user experience by ensuring that the pagination correctly navigates to the previous page (if exists) when the last item on the current page is deleted.

This can be reproduced in both All Patterns and All Templates pages.

Step-by-step reproduction instructions

  1. Navigate to site editor.
  2. Navigate to Patterns.
  3. Confirm all the patterns are displayed in a pagination.
  4. Make sure, on a particular page, that there's just one data item being displayed.
  5. Delete that particular data item.
  6. Confirm, that a no results message is displayed and the page didn't navigate back even though previous pages are available.

Screenshots, screen recording, code snippet

issue.mov

Environment info

  • WordPress Version: 6.8-alpha-59361
  • Gutenberg Version: Trunk (74986ed)
  • OS: macOS Sequoia

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@yogeshbhutkar yogeshbhutkar added the [Type] Bug An existing feature does not function as intended label Jan 16, 2025
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant