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

Bugfix: Loading state in DataViews when paginating #427

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

chriszarate
Copy link
Member

Currently when navigating through pages of results in DataViews, the user never sees a loading state. This is because the previous results continue to be passed to the component, which overrides the loading prop. This leads to some confusing "did it work?" UX:

before.mov

Instead we can withhold the results when the request is loading:

after.mov

Also noticing some alignment issues for the pagination links, not sure if that's because of our overlay or not. cc: @brookewp

@chriszarate chriszarate requested a review from brookewp March 18, 2025 13:54
Copy link

Test this PR in WordPress Playground.

Copy link
Contributor

@brookewp brookewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So strange! I'd be curious to see what the DOM looks like in your 'before', since the footer is fixed and shouldn't be moving 😕

Although I can't replicate this in trunk, this is a good safety measure to have, so thanks for adding it!

@chriszarate chriszarate merged commit 33fa9c5 into trunk Mar 18, 2025
13 checks passed
@chriszarate chriszarate deleted the fix/dataviews-loading-state branch March 18, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants