Making the admin more navigable

191 views
Skip to first unread message

Tom Carrick

unread,
Nov 24, 2019, 1:29:36 PM11/24/19
to Django developers (Contributions to Django itself)
Hi folks,

One thing that every Django admin skin seems to do is add a sidebar or some other navigation to every admin page. It's clear that there is a want for this and personally, those skins don't offer much more that I need other than this, and they often end up unmaintained or lagging behind Django version support.

I'm happy to work on this perhaps over the holidays, but I wanted to at least sound it out a bit.

To be clear, this is what I'm proposing:

We have some kind of navigation (sidebar, etc.) that essentially replicates the admin home page - links to list pages for models categorised by apps.

This raises in my mind a few things...

1. Is this something people actually want, or is it just me?

2. How is the navigation best done? Since some projects can be very large, I'm partial to something vertical, rather than horizontal, so a sidebar seems good. What the best UX is on smaller screens would be I'm a little less sure.

3. Should we provide an API for adding more links? I guess we could have some overridable structure, perhaps in the form of `{"category": ["link1", "link2", ...], ...}`

4. Would this have an impact on projects / apps overriding the admin and how important is this?

5. Would this make the admin home page redundant, and if so should we replace it with something, and what should that something be? Generally the only other thing on there is the admin change history.

6. The admin's current browser compatibility is very wide, per https://docs.djangoproject.com/en/2.2/faq/admin/#what-browsers-are-supported-for-using-the-admin - I don't know if we need still support such old browsers, but the implementation (and time to test) will likely be affected by this.

I welcome any input / thoughts on this.

Cheers,
Tom

Tobias Kunze

unread,
Nov 24, 2019, 5:20:39 PM11/24/19
to django-d...@googlegroups.com
On 19-11-24 10:29:36, Tom Carrick wrote:
>1. Is this something people actually want, or is it just me?

+1, especially with a flag to disable it. Thank you for taking this up!

We live in the days of wide screens, where using the screen for something
meaningful is definitely a good idea. I find it tedious to always click back
to the start of admin pages to then select another category/model.

>2. How is the navigation best done? Since some projects can be very large,
>I'm partial to something vertical, rather than horizontal, so a sidebar
>seems good. What the best UX is on smaller screens would be I'm a little
>less sure.

For the beginning, you can just hide the sidebar on smaller screens. They
won't lose any functionality, and users on larger screens will still profit.

Later on, you can consider having a navigation hidden behind some menu button,
to be shown when tapped, but I don't think that's required.

>3. Should we provide an API for adding more links? I guess we could have
>some overridable structure, perhaps in the form of `{"category": ["link1",
>"link2", ...], ...}`

I'd say for the beginning the sidebar should show the links the admin home
page shows, so adding a link to one would also add it to the other.

In a second step we can distinguish between the two (and also figure out if a
link should be shown as "active" in the sidebar.)

>5. Would this make the admin home page redundant, and if so should we
>replace it with something, and what should that something be?

I don't think the main admin page would be redundant or should be replaced.
It'd still be used for mobile pages/smaller screens, at the very least, and
changing the main site is also a major/breaking modification. Adding a
sidebar, especially with an option to disable it, won't hurt in upgrades
generally, but losing/changing home page functionality would be painful.

Tobias
signature.asc

Tom Carrick

unread,
Dec 3, 2019, 5:55:10 AM12/3/19
to Django developers (Contributions to Django itself)
I've added a PR here https://github.com/django/django/pull/12159

I'd appreciate if someone can give it a look, it's been a while since I've done any front end dev so there are probably nicer ways to do it.

I'm also getting a test failure, and I don't quite understand how my code could have caused it, so would also appreciate some help debugging that if it's possible.

Cheers,
Tom

Carlton Gibson

unread,
Apr 15, 2020, 3:33:38 AM4/15/20
to Django developers (Contributions to Django itself)
Do we know anyone who's a Design/CSS/UX specialist that can offer some input here? 

Hi Tom. Thanks for this PR.


I think it's a good addition. It's perhaps not perfect, but we can take it as an incremental change and then improve it over time.

There's one comment re the styling of the sidebar headers and the breadcrumbs bar, that I think we should do something about.

But then, I think a small dose of Actual Designer™ would go a long way here.
I have insecurities about a bunch of backend devs discussing CSS & design as if we really know anything about it... 🙂
(Maybe you do. I don't.)

We're a community of web professionals. We must know some people with bone fide chops here.
To all: Can anybody input or ask somebody to input?
(Posting here to ask that.)

Otherwise, I think we should probably accept, with a last round of tweaking.

Kind Regards,

Carlton


Reply all
Reply to author
Forward
0 new messages