Document how to disable diazo for ajax requests and completly. - #1961
Conversation
There was a problem hiding this comment.
Pull Request Overview
Updates the Diazo theming documentation to explain how to:
- Disable Diazo transformations on AJAX requests via the
ajax_loadparameter and<notheme>rule. - Completely disable Diazo by setting the
X-Theme-Disabledheader 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. |
stevepiercy
left a comment
There was a problem hiding this comment.
@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: |
stevepiercy
left a comment
There was a problem hiding this comment.
A few MyST syntax and grammar fixes. Please verify that I didn't mess up the qualification for which version the instructions apply. Thank you!
|
@thet From what I can see, this is almost ready, but waiting for you to apply Steve's suggestions. |
|
@davisagli @stevepiercy tnx for the heads up and the corrections! This slipped out of my attention while being on vacation early August. I took over all suggestions and will merge as soon as the the tests go green. |
|
@thet thanks for wrapping this up. I really appreciate it. |
Documentation of a change introduced in plone/plonetheme.barceloneta#404
📚 Documentation preview 📚: https://plone6--1961.org.readthedocs.build/