Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#33156 closed Bug (fixed)

Admin Sidebar search value stays forever

Reported by: Collin Anderson Owned by: Maxim Milovanov
Component: contrib.admin Version: 4.0
Severity: Release blocker Keywords:
Cc: Maxim Milovanov Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (7)

comment:1 by Mariusz Felisiak, 3 years ago

Cc: Maxim Milovanov added
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Thanks for the report. IMO we should still preserve typed value (see comment), however sessionStorage() seems to be more appropriate.

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

comment:2 by Maxim Milovanov, 3 years ago

Owner: changed from nobody to Maxim Milovanov
Status: newassigned

comment:3 by Maxim Milovanov, 3 years ago

Resolution: fixed
Status: assignedclosed

hey guys,

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

Thanks for the suggestion.

comment:4 by Carlton Gibson, 3 years ago

Has patch: set
Resolution: fixed
Status: closednew

Hi Maxim. Thanks for the patch.

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

comment:5 by Carlton Gibson, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: newclosed

In 1c802ca:

Fixed #33156 -- Used sessionStorage to preserve quick filter for admin's navigation sidebar.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In f6c7e75:

[4.0.x] Fixed #33156 -- Used sessionStorage to preserve quick filter for admin's navigation sidebar.

Backport of 1c802ca2a9d3c66fb723695fe7ea597fb4802402 from main

Note: See TracTickets for help on using tickets.
Back to Top