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.
* Attachment "Screen Shot 2021-02-11 at 20.05.07.png" added.
opened nav side bar
* Attachment "Screen Shot 2021-02-11 at 20.05.19.png" added.
closed nav side bar
* Attachment "Screen Shot 2021-02-11 at 20.05.37.png" added.
disabled nav side bar
* 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:
In this screenshot, the nav-sidebar is enabled but it's close and the main
tag doesn’t have the shifted class:
Bug
In this screenshot, the nav-sidebar is disabled, but the main tag has
shifted class (but it shouldn't):
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:1>
* ui_ux: 0 => 1
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:2>
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>
* component: Uncategorized => contrib.admin
--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:4>
* 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>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:6>
* 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>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/32443#comment:8>