[Django] #33156: Admin Sidebar search value stays forever

16 views
Skip to first unread message

Django

unread,
Sep 29, 2021, 3:58:33 PM9/29/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------------+------------------------
Reporter: Collin Anderson | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 4.0
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 tried out the new admin sidebar search which is really nice, however
days later I opened up an admin page and found the sidebar had the _same_
value I had put in days ago.

I think there needs to be some sort of expiration for that value (maybe
use sessionStorage?), or it might be better to not saving that value at
all between page loads (do we really want to be saving that sort of
information in the browser?) I'd expect it to work more like an
autocomplete-search to quickly find an item, rather than some sort of
persistent filter.

Clicking the x gets rid of the search query too, but I would expect it to
go away automatically when navigating to a new page.

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

Django

unread,
Sep 30, 2021, 1:00:22 AM9/30/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
---------------------------------+------------------------------------

Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

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

* cc: Maxim Milovanov (added)
* type: Uncategorized => Bug
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Thanks for the report. IMO we should still preserve typed value (see
[https://github.com/django/django/pull/13873#pullrequestreview-609660329
comment]), however `sessionStorage()` seems to be more appropriate.

Marking as a release blocker because this is a bug in the new feature (see
d915dd1c5809d7c2bb3679751cd5277571dcd9f7).

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

Django

unread,
Sep 30, 2021, 8:20:06 AM9/30/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.0

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Maxim Milovanov):

* owner: nobody => Maxim Milovanov
* status: new => assigned


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

Django

unread,
Sep 30, 2021, 8:21:50 AM9/30/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Maxim Milovanov):

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


Comment:

hey guys,

I've changed the storage from `localStorage` to `sessionStorage`.
https://github.com/django/django/pull/14917

Thanks for the suggestion.

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

Django

unread,
Sep 30, 2021, 8:27:30 AM9/30/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: new
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: closed => new
* has_patch: 0 => 1
* resolution: fixed =>


Comment:

Hi Maxim. Thanks for the patch.

I'll reopen the ticket as it's not "fixed" until that's merged.

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

Django

unread,
Oct 6, 2021, 2:27:43 AM10/6/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: new
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


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

Django

unread,
Oct 6, 2021, 3:01:48 AM10/6/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"1c802ca2a9d3c66fb723695fe7ea597fb4802402" 1c802ca]:
{{{
#!CommitTicketReference repository=""
revision="1c802ca2a9d3c66fb723695fe7ea597fb4802402"
Fixed #33156 -- Used sessionStorage to preserve quick filter for admin's
navigation sidebar.
}}}

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

Django

unread,
Oct 6, 2021, 3:03:28 AM10/6/21
to django-...@googlegroups.com
#33156: Admin Sidebar search value stays forever
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Maxim
| Milovanov
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.0

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"f6c7e75cdfab5af9ff8861a97df3d702b1c36056" f6c7e75]:
{{{
#!CommitTicketReference repository=""
revision="f6c7e75cdfab5af9ff8861a97df3d702b1c36056"
[4.0.x] Fixed #33156 -- Used sessionStorage to preserve quick filter for
admin's navigation sidebar.

Backport of 1c802ca2a9d3c66fb723695fe7ea597fb4802402 from main
}}}

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

Reply all
Reply to author
Forward
0 new messages