Django-jet: Make menu sidebar visibility toggle with a button.

Created on 27 Feb 2017  路  14Comments  路  Source: geex-arts/django-jet

Feature request

I thought it would be a nice idea to be able to toggle the sidebar menu visibility on and off with a button.

Here is a toy example of what I mean:

Many web apps have this functionality in order to save screen space.

image
image

In this example we can see that the maps goes way to much to the right, even when changing the size of the text input fields:

class RouteUbicationInline(SortableInlineAdminMixin, TabularInline):
    model = RouteUbication
    extra = 2
    show_change_link = True

    formfield_overrides = {
        models.CharField: {'widget': TextInput(attrs = {'size': '20'})}
    }

Without django-jet, using the normal admin and the snippet above, I am able to visualize all the fields including the map without having to use the horizontal scroll.

I hope I can soon get a one time license from Jet in order for this to be considered, or even maybe try to implement this myself if I get some time.

Most helpful comment

@Ismael-VC i'm agreed with you!

All 14 comments

Just as reference here is a Gitter chat room which has both left and right toggle buttons for the sidebars:

image

As you can see this makes the sidebars go away when not needed:

image

@Ismael-VC i'm agreed with you!

I've noticed this already works in small screens:

image

Could we have an option to have this feature with whatever screen size?

image

I think is possible apply the same performance with a button in the normal screen.

I've seen that in http://demo.jet.geex-arts.com/admin/ this feature is already available.
I've updated django-jet from pip but this feature is not present.
We have to put something in settings to activate this functionality? Or something to add to the template?

@f1nality I'm asking to me the same question.

It is a very recent addition, thanks to @f1nality ! I did the following, in order to test this now:

  • uninstall django-jet (just in case)
  • reinstall with:

    • pip install --upgrade git+git://github.com/geex-arts/django-jet@dev

  • run python manage.py collectstatic
  • reset the widgets

It works perfectly! Thanks!

@Ismael-VC Re open this, this feautre isn't in the last release version, so, isn't solved yet.

@SalahAdDin makes sense, thanks!

@Ismael-VC Man, what's about you?

This feature is available in 1.0.6

Please come to the django-jet Discord server so we can organize if you like:

Welcome! 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mapleflow picture mapleflow  路  8Comments

kevin-miles picture kevin-miles  路  5Comments

erayerdin picture erayerdin  路  5Comments

nikolas310 picture nikolas310  路  4Comments

pwndr00t picture pwndr00t  路  4Comments