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
Add HTMX to activity stream #8160
base: master
Are you sure you want to change the base?
Conversation
Hello @aleeexgreeen ! As a first approach it is good but let's be a little bit more specific on the interaction to take full advantage of HTMX. The "problem" with this PR is that we are rendering all the full template again and then replacing the body. Re-rendering the whole template might not be ideal since it needs to call a lot of logic for things that are not going to change (followers, dashboard, login menu, breadcrumb, etc). The pattern we want to follow here is the following: def my_view(request):
if request.htmx:
template_name = "partial.html"
else:
template_name = "complete.html"
return render(template_name, ...) Usually, while working with HTMX we look for two workflows:
So, what can we do to achieve this? We will need to do some work on out templates.
Does it makes sense? |
@pdelboca Hi! Thanks for the guidance, it all made sense! I came across a couple problems/questions that I wanted to bring up to you.
I've pushed my progress so far, so you could take a look |
Fixes #8129
Proposed fixes:
Use HTMX in activity stream's select element and navigating between pages instead of full page reload.
Features:
Please [X] all the boxes above that apply