-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add support for previewing blog posts in list view #6245
Conversation
@willbarton This might be a side task we can pick up after addressing the post preview cache in our performance epic. |
05ce0f0
to
9844513
Compare
Wagtail 5.2 introduces a new |
Now that we're on Wagtail 6, is this unblocked? |
@anselmbradford I was actually looking at this again recently. I have some local changes I can try to push up to this PR. It turns out this wasn't blocked by Wagtail 6 after all, since we're using Jinja for this cache tag, not the Django template language, so we can't use Wagtail's |
9844513
to
7f8687a
Compare
To test, create or edit a BlogPage and look at the sidebar preview.
7f8687a
to
b035d44
Compare
@csebianlander @willbarton this is now unblocked; I've updated the screenshot above. Note the "Preview mode" at the bottom of the preview sidebar. This PR has been around since 2021; is there still interest in this feature? |
If it can now be added without too much trouble, it'd be a great feature to add! |
@csebianlander all it takes is your approval of this PR! 😄 |
This change prototypes using Wagtail's page preview modes to allow for previewing of blog posts in their list view, i.e. how they show up on the blog page.
How to test this PR
Run a local server and edit a blog page. Note that the Preview button is now a dropdown, and you can either preview as normal or preview the post in its "post preview" mode.
Screenshots
Screenshots (OLD)
Notes and todos
This can't be merged right now because the use of Django template caching here means that previewing changes either won't work as expected or will incorrectly cache draft data. A solution to this might involve checkingrequest.is_preview
and somehow skipping the{% cache %}
tag or (preferably) removing the need for that caching altogether.This is no longer an issue after #8450.
Checklist