You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Varfish there is a case where several new views are implemented as single page apps and they don't really work with the base SODAR Core template.
It was requested to add Ajax views to provide the content for the sidebar and the user dropdown, so they can be rendered as suits best by the SPA. This can also be useful in other cases in the future where we may have views or entire sites which forego the base server side template.
Naturally, we want to reuse existing server side context code and wrap it in Ajax views.
Also call sidebar_processor() and add its results into the return data
Challenge: where to get the current server-side URL to determine the active state?
The request URL will, of course, be the URL to the Ajax view itself. So that doesn't help..
In my opinion we have two options:
Figure out how to get the current URL the browser is on from the client (either from the request somehow or by an explicit parameter provided by the client to the Ajax view call)
Or, skip active for the Ajax views altogether: add a parameter to leave it out from the AppLinkContent methods
Let me know when you reach this point and if you'll figure out a nice way to implement it
Add Ajax view UserDropdownContentAjaxView in projectroles
URL name = ajax_user_dropdown
No project context (irrelevant for user dropdown as we only show site/admin apps)
Use the AppLinkContent helper again
Add documentation via docstrings and sphinx
Add tests
Tasks
Add SidebarContentAjaxView
Add UserDropdownContentAjaxView
Document
Test
The text was updated successfully, but these errors were encountered:
In Varfish there is a case where several new views are implemented as single page apps and they don't really work with the base SODAR Core template.
It was requested to add Ajax views to provide the content for the sidebar and the user dropdown, so they can be rendered as suits best by the SPA. This can also be useful in other cases in the future where we may have views or entire sites which forego the base server side template.
Naturally, we want to reuse existing server side context code and wrap it in Ajax views.
We'll need to return the following:
namespace:id
, e.g.mdi:home
)Spec
SidebarContentAjaxView
in projectrolesajax_sidebar
project:uuid
given in the URL (no reason to call this without a project context)get()
sidebar_processor()
and add its results into the return dataactive
state?active
for the Ajax views altogether: add a parameter to leave it out from theAppLinkContent
methodsUserDropdownContentAjaxView
in projectrolesajax_user_dropdown
AppLinkContent
helper againTasks
SidebarContentAjaxView
UserDropdownContentAjaxView
The text was updated successfully, but these errors were encountered: