Repository navigation
DataViews: better management of layout param in templates - #58116
Merged
Merged
Conversation
oandregal
requested review from
ellatrix,
jorgefilipecosta,
mcsf,
ntsekouras and
youknowriad
January 23, 2024 11:42
|
Size Change: +15 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
layout paramlayout param in templates
youknowriad
reviewed
Jan 23, 2024
youknowriad
approved these changes
Jan 23, 2024
- if the experiment is enabled, reloading the page maintains the layout param - if the experiment is disabled: - the layout param is removed from the URL - no layouts other than table are allowed to be loaded
oandregal
force-pushed
the
fix/templates-layout-param-reload
branch
from
January 23, 2024 14:18
ede830b to
4b918a6
Compare
oandregal
enabled auto-merge (squash)
January 23, 2024 14:19
ntsekouras
reviewed
Jan 23, 2024
| ( navigatorLocation.path === '/wp_template/all' && | ||
| ! window?.__experimentalAdminViews ) | ||
| window?.__experimentalAdminViews ) || | ||
| ( navigatorLocation.path === '/wp_template_part/all' && |
Contributor
There was a problem hiding this comment.
Thank you for handling this here too! ❤️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #55083
Follow-up to #58079
What
Improves how the
layoutURL parameter is handled.layoutparam is removed from the URLWhy?
The templates page has both a stable & an experimental dataviews-powered page. We need to make sure both experiences work great without leaking into each other.
How?
Testing Instructions
With the "admin views" experiment disabled:
layout=gridto the URL and hit enter. Verify it's removed, and the table layout is still displayed.Gravacao.do.ecra.2024-01-23.as.12.36.43.mov
With the "admin views" experiment enabled:
listand verify that it's updated, and the URL has alayout=listparameter.Gravacao.do.ecra.2024-01-23.as.12.37.15.mov