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

fix: show dock_to_right only if nav sidebar is enabled #1167

Closed
wants to merge 1 commit into from

Conversation

SukiCZ
Copy link
Contributor

@SukiCZ SukiCZ commented Mar 19, 2025

When AdminSite.enable_nav_sidebar is set to False, Django will hide the sidebar (here) which also applies to Unfold just fine.

The issue is the icon dock_to_right is still visible and when user is on a change view, the icon moves the submit buttons (in bottom-right corner) out of the screen.

This PR will show dock_to_right only if nav sidebar is enabled.
Fixes: #943

@lukasvinclav
Copy link
Contributor

From Django docs:

https://docs.djangoproject.com/en/5.1/ref/contrib/admin/#django.contrib.admin.AdminSite.enable_nav_sidebar

The docs are saying that variable enable_nav_sidebar controls if the sidebar is displayed on larger screens. In your code you are only controlling display of the toggle button.

@SukiCZ
Copy link
Contributor Author

SukiCZ commented Mar 23, 2025

Yes, control of the nav bar is done here already. The only issue IS the icon.

See comment here in Issue #943 .

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.

feat: hide sidebar globally
2 participants