[Django] #32443: Remove shifted class from main when nav-sidebar is disabled.

7 views
Skip to first unread message

Django

unread,
Feb 13, 2021, 2:25:04 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-----------------------------------------+------------------------
Reporter: Amir Ajorloo | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I faced an issue in disabling the nav-sidebar. When I disable the nav-
sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
class is still remaining, because this class is hard-coded in the main
tag. Currently check both of shifted class of the main tag and the
existence of the nav-sidebar together to apply the styles, but it can be
more simple and prevent issues happening in the third-party modules.

In the below screenshot, the nav-sidebar is enabled and it's open. So the
main tag should have the shifted class to move its content to right:
[[Image()]]

In this screenshot, the nav-sidebar is enabled but it's close and the main
tag doesn’t have the shifted class:
[[Image()]]


Bug
In this screenshot, the nav-sidebar is disabled, but the main tag has
shifted class (but it shouldn't):
[[Image()]]

--
Ticket URL: <https://code.djangoproject.com/ticket/32443>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 13, 2021, 2:29:21 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+--------------------------------------

Reporter: Amir Ajorloo | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Amir Ajorloo):

* Attachment "Screen Shot 2021-02-11 at 20.05.07.png" added.

opened nav side bar

Django

unread,
Feb 13, 2021, 2:29:37 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+--------------------------------------

Reporter: Amir Ajorloo | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Amir Ajorloo):

* Attachment "Screen Shot 2021-02-11 at 20.05.19.png" added.

closed nav side bar

Django

unread,
Feb 13, 2021, 2:29:51 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+--------------------------------------

Reporter: Amir Ajorloo | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Amir Ajorloo):

* Attachment "Screen Shot 2021-02-11 at 20.05.37.png" added.

disabled nav side bar

Django

unread,
Feb 13, 2021, 2:31:00 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+----------------------------------------
Reporter: Amir Ajorloo | Owner: Amir Ajorloo
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------------
Changes (by Amir Ajorloo):

* owner: nobody => Amir Ajorloo
* status: new => assigned


Old description:

> I faced an issue in disabling the nav-sidebar. When I disable the nav-
> sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
> class is still remaining, because this class is hard-coded in the main
> tag. Currently check both of shifted class of the main tag and the
> existence of the nav-sidebar together to apply the styles, but it can be
> more simple and prevent issues happening in the third-party modules.
>
> In the below screenshot, the nav-sidebar is enabled and it's open. So the
> main tag should have the shifted class to move its content to right:
> [[Image()]]
>
> In this screenshot, the nav-sidebar is enabled but it's close and the
> main tag doesn’t have the shifted class:
> [[Image()]]
>

> Bug
> In this screenshot, the nav-sidebar is disabled, but the main tag has
> shifted class (but it shouldn't):
> [[Image()]]

New description:

I faced an issue in disabling the nav-sidebar. When I disable the nav-
sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
class is still remaining, because this class is hard-coded in the main
tag. Currently check both of shifted class of the main tag and the
existence of the nav-sidebar together to apply the styles, but it can be
more simple and prevent issues happening in the third-party modules.

In the below screenshot, the nav-sidebar is enabled and it's open. So the
main tag should have the shifted class to move its content to right:

[[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.07.png)]]

In this screenshot, the nav-sidebar is enabled but it's close and the main
tag doesn’t have the shifted class:

[[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.19.png)]]


Bug
In this screenshot, the nav-sidebar is disabled, but the main tag has
shifted class (but it shouldn't):

[[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.37.png)]]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:1>

Django

unread,
Feb 13, 2021, 2:31:40 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+----------------------------------------
Reporter: Amir Ajorloo | Owner: Amir Ajorloo
Type: Bug | Status: assigned
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1

-------------------------------+----------------------------------------
Changes (by Amir Ajorloo):

* ui_ux: 0 => 1
* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:2>

Django

unread,
Feb 13, 2021, 2:32:47 PM2/13/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+----------------------------------------
Reporter: Amir Ajorloo | Owner: Amir Ajorloo
Type: Bug | Status: assigned
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+----------------------------------------
Description changed by Amir Ajorloo:

Old description:

> I faced an issue in disabling the nav-sidebar. When I disable the nav-
> sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
> class is still remaining, because this class is hard-coded in the main
> tag. Currently check both of shifted class of the main tag and the
> existence of the nav-sidebar together to apply the styles, but it can be
> more simple and prevent issues happening in the third-party modules.
>
> In the below screenshot, the nav-sidebar is enabled and it's open. So the
> main tag should have the shifted class to move its content to right:

> [[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.07.png)]]


>
> In this screenshot, the nav-sidebar is enabled but it's close and the
> main tag doesn’t have the shifted class:

> [[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.19.png)]]
>

> Bug
> In this screenshot, the nav-sidebar is disabled, but the main tag has
> shifted class (but it shouldn't):

> [[Image(https://code.djangoproject.com/attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.37.png)]]

New description:

I faced an issue in disabling the nav-sidebar. When I disable the nav-
sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
class is still remaining, because this class is hard-coded in the main
tag. Currently check both of shifted class of the main tag and the
existence of the nav-sidebar together to apply the styles, but it can be
more simple and prevent issues happening in the third-party modules.

In the below screenshot, the nav-sidebar is enabled and it's open. So the
main tag should have the shifted class to move its content to right:

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.07.png)]]

In this screenshot, the nav-sidebar is enabled but it's close and the main
tag doesn’t have the shifted class:

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.19.png)]]


Bug
In this screenshot, the nav-sidebar is disabled, but the main tag has
shifted class (but it shouldn't):

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.37.png)]]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:3>

Django

unread,
Feb 14, 2021, 12:54:25 AM2/14/21
to django-...@googlegroups.com
#32443: Remove shifted class from main when nav-sidebar is disabled.
-------------------------------+----------------------------------------
Reporter: Amir Ajorloo | Owner: Amir Ajorloo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+----------------------------------------
Changes (by Amir Ajorloo):

* component: Uncategorized => contrib.admin


--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:4>

Django

unread,
Feb 15, 2021, 12:21:15 AM2/15/21
to django-...@googlegroups.com
#32443: Remove "shifted" class from main when nav-sidebar is disabled.
-------------------------------------+-------------------------------------

Reporter: Amir Ajorloo | Owner: Amir
Type: | Ajorloo
Cleanup/optimization | Status: assigned

Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted


Old description:

> I faced an issue in disabling the nav-sidebar. When I disable the nav-
> sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
> class is still remaining, because this class is hard-coded in the main
> tag. Currently check both of shifted class of the main tag and the
> existence of the nav-sidebar together to apply the styles, but it can be
> more simple and prevent issues happening in the third-party modules.
>
> In the below screenshot, the nav-sidebar is enabled and it's open. So the
> main tag should have the shifted class to move its content to right:

> [[Image(https://code.djangoproject.com/raw-
> attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.07.png)]]


>
> In this screenshot, the nav-sidebar is enabled but it's close and the
> main tag doesn’t have the shifted class:

> [[Image(https://code.djangoproject.com/raw-
> attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.19.png)]]
>

> Bug
> In this screenshot, the nav-sidebar is disabled, but the main tag has
> shifted class (but it shouldn't):

> [[Image(https://code.djangoproject.com/raw-
> attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.37.png)]]

New description:

I faced an issue in disabling the nav-sidebar. When I disable the nav-
sidebar using ‍‍‍`admin.site.enable_nav_sidebar = False`, the shifted
class is still remaining, because this class is hard-coded in the main
tag. Currently check both of shifted class of the main tag and the
existence of the nav-sidebar together to apply the styles, but it can be
more simple and prevent issues happening in the third-party modules.

In the below screenshot, the nav-sidebar is enabled and it's open. So the
main tag should have the shifted class to move its content to right:

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.07.png,
80%)]]

In this screenshot, the nav-sidebar is enabled but it's close and the main
tag doesn’t have the shifted class:

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.19.png,
80%)]]


Bug
In this screenshot, the nav-sidebar is disabled, but the main tag has
shifted class (but it shouldn't):

[[Image(https://code.djangoproject.com/raw-
attachment/ticket/32443/Screen%20Shot%202021-02-11%20at%2020.05.37.png,
80%)]]

--

Comment:

[https://github.com/django/django/pull/13986 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:5>

Django

unread,
Feb 15, 2021, 5:33:01 AM2/15/21
to django-...@googlegroups.com
#32443: Remove "shifted" class from main when nav-sidebar is disabled.
-------------------------------------+-------------------------------------
Reporter: Amir Ajorloo | Owner: Amir
Type: | Ajorloo
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:6>

Django

unread,
Feb 18, 2021, 3:18:33 AM2/18/21
to django-...@googlegroups.com
#32443: Remove "shifted" class from main when nav-sidebar is disabled.
-------------------------------------+-------------------------------------
Reporter: Amir Ajorloo | Owner: Amir
Type: | Ajorloo
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"1710cdbe79c90665046034fe1700933d038d90ad" 1710cdbe]:
{{{
#!CommitTicketReference repository=""
revision="1710cdbe79c90665046034fe1700933d038d90ad"
Fixed #32443 -- Removed "shifted" CSS class when admin's sidebar is
disabled.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:7>

Django

unread,
Feb 18, 2021, 3:28:54 AM2/18/21
to django-...@googlegroups.com
#32443: Remove "shifted" class from main when nav-sidebar is disabled.
-------------------------------------+-------------------------------------
Reporter: Amir Ajorloo | Owner: Amir
Type: | Ajorloo
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:8>

Reply all
Reply to author
Forward
0 new messages