Skip to content
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

Implement AJAX Summary Displays. #1462

Closed

Conversation

bri-gaia
Copy link

Add option to render summary displays using AJAX.

@collectiveaccess
Copy link
Owner

This is PR with changes in 23 files. Can you provide something more than a one line description of what you're trying to accomplish here, and why it is necessary?

@bri-gaia
Copy link
Author

Some of the data we are displaying in the summary tab is quite heavy, so we implemented AJAX loading so that the page would render immediately and we could show a loading graphic.

By individually loading in the data elements the smaller requests can be populated without being held up by the more intensive queries.

I have requested that my tech lead provide additional context to this PR if possible.

… from 6aa8724 for "default" display placement_ids (negative placement ids)
@kehh
Copy link
Contributor

kehh commented Jul 10, 2023

@collectiveaccess what @bri-gaia has put above is pretty much the gist of it. Essentially very complex templates can take some time to render especially if they are traversing many relationships / aggregating values from all descendants. This allows the page to render without being held up by slower templates.

@kehh
Copy link
Contributor

kehh commented Jul 10, 2023

There's a switch for this functionality in app.conf - that could be defaulted to off if you prefer?

@bri-gaia
Copy link
Author

Additional info:

  • The crux of the change of this is implemented in BaseEditorController.php refactoring Summary() into separate functions that can be called individually if configured to us AJAX while maintaining the current functionality if AJAX is not enabled.
  • I have implemented renderGeneric() and updated the call to template_test_html.php as the relative path only worked for summary's under the themes/default/views/editor directory, causing issues with, for example, the list_editor.
  • The changes to the 17 summary_html.php files should all be identical, and I have attempted to modify as little in those files as possible to make that visible.

Apologies for the massive PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants