django-unfold
django-unfold copied to clipboard
Sidebar Scroll to "current-app" or "current-model"
When clicking through the apps/models in the side nav, the page will refresh on each click and you lose your spot in the side nav. This is a minor inconvenience but one you notice if you have a lot of apps/models and just want to focus on the current app. You'll have to scroll down the side nav to get back your context.
I created a simple script that starts the side navbar navigation from the current app and included it into unfold template. (i.e. grab "nav .current-app" element and then call "scrollIntoView"). This feature might be useful for everyone though. Would something like this be supported by default?
@cleor41 I'm not sure if I undertstand the issue correctly. Would you mind to create a video where it is possible to see the problem?
Something like this
https://github.com/unfoldadmin/django-unfold/assets/6909067/da7c763c-e63c-4473-93b8-f360632bcb82
Because of the page reload on click - if you have a lot of elements in the sidebar then you'll lose your place in the sidebar.
Do we want to add this or should we close this issue?