-
-
Notifications
You must be signed in to change notification settings - Fork 175
Document how to disable diazo for ajax requests and completly. #1961
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
base: 6.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the Diazo theming documentation to explain how to:
- Disable Diazo transformations on AJAX requests via the
ajax_load
parameter and<notheme>
rule. - Completely disable Diazo by setting the
X-Theme-Disabled
header in a request event subscriber.
@thet I read all the related PRs and issues to better understand the change, but I wasn't clear about current behavior. Now I have questions.
Please let me know, then I can start a review. Thank you! |
@stevepiercy the docs I added actually apply to all versions plone.app.theming - which uses Diazo. It even applies to Plone 5. The changes in the Barceloneta PR only re-add Diazo disabling for ajax requests, which was present in Plone 5 but fell out somehow while migrating the codebase to Plone 6. And the CMFPlone PR tries to guess if a AJAX request is present and sets the There is one bold claim though:
The PR is not yet merged and actually it tries to guess if there is a AJAX request and there is no guarantee that every AJAX request is detected as such. |
I'm still having a hard time following the changes. Is this accurate?
We'll need to add some MyST admonitions as appropriate.
This gives readers the context they need to understand for which versions of Plone this new documentation applies.
What kind of parameter is
That was another thing that confused me. First, I think it's great that you were the first person to document a feature in Plone 6.x before it was released. That's never happened before. The claim must be accurate, not bold or hopeful. Consider it as a contract with the reader. We could say that it covers scenarios X and Y, but there may be other unknown scenarios that it doesn't cover. |
@stevepiercy I think we do not need to annotate the docs I added with version compatibility notes. Just because it documents how to disable Diazo which was possible since I can remember. The related change in barceloneta only re-adds the disabling diazo transforms for ajax requests to that specific theme. But it's good to know how to do these version annotations. I made another commit which hopefully makes some things clearer. |
Reorganize and rewrite content for better flow and Plone version context. Fix grammar, spelling, and typos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thet I reorganized and rewrote the content somewhat. Would you please take a look at it to make sure I didn't mess up anything? Thank you!
Link to preview changed docs: |
Documentation of a change introduced in plone/plonetheme.barceloneta#404
📚 Documentation preview 📚: https://plone6--1961.org.readthedocs.build/