The Pjax functionality in Bricksforge, while promising a smoother user experience, is currently exhibiting several bugs that negatively impact website functionality and user perception. These issues are present even when using only native Bricks elements, without any third-party plugins.
Observed Bugs/Issues:
Incompatibility with Native Bricks Elements: Ajax Search: The native Bricks Ajax search element stops functioning correctly when Pjax is enabled. Filters: Native Bricks filter elements also become non-functional or behave erratically when Pjax is enabled.
Audio Player Malfunction:
The native Bricks audio player element is not working reliably with Pjax.
Blank/White Page Loads:
Intermittently, clicking on a post or link when Pjax is enabled results in a blank or white page loading instead of the expected content. maybe it cause because some bricks elements are not compatible.
Without these fixes, Pjax is effectively unusable and it will be just useable for simple static websites. please consider fixing these bugs. i didn’t ask for compatibility with third party plugins but also full compatiblity with bricks itself.
First of all: Full compatibility cannot be guaranteed. As described in the docs, Pjax is intended for simple, non-dynamic pages. When it becomes more dynamic, it is difficult to offer an out of the box solution. For this, there are code fields in which individual functionality can be added. Even within Bricks, some areas (including the Ajax stuff) are so complex that they require a real page reload to work properly. Bricks is not inherently designed to function as a one-page application. In many aspects we can only do something with workarounds.
In Detail:
Ajax Search & Filters
I’ve noticed some code changed in current Bricks versions and the beta. In certain situations, this indeed could break things. I have just added some fixes to the Bricksforge core. This should handle Filters better. I will deploy the 3.0.0-beta.3 soon.
Audio Player
Works well for me. I cannot notice any issues here. Are you using the Bricks “Audio” element?
Blank/White Page Loads
You need to add your own animation to handle this. I assume your html has a white background by default, so the opacity: 0 animation will make it visible. Just create an animation to control this or change the background of your html element.
I am grateful if you draw my attention to such issues. If it’s good to fix, I’m happy to do so. However, if the site becomes too complex, you have to consider whether Pjax is really the right solution for it.