[Block Library - Query Pagination]: Try rendering hidden element when no next/previous link exists #40851
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Attempt to fix: #34997
Alternative of:#40553 and #36681.
I'm still not sure if we want to render an element for design purposes only and I think that the proper approach would be a new layout or some layout controls, that do not exist right now..
We need to weight the pros and cons of such approach and I haven't done all the testing and considered everything yet. But I acknowledge that this is a very common use case that needs to be handled somehow.
I started exploring a layout
grid
approach, but it needs exploration and if I come up with something good, I'll open a PR for that.How?
In this PR I render a hidden element only if there was no link for Query Pagination Next/Previous and only if the parent Query Pagination block has justification content
center or space-between
.