Problem/Motivation

Categories and other advanced filter criteria rarely change. They can be cached in localStorage to reduce load time. Because they could change, Project Browser still needs to check the endpoints, but we can compare that to what is in localStorage and only re-render if the value's don't match. This approach will eliminate at least 4 rerenders on load time, but will still perform the rerender if the data has changed.

Steps to reproduce

Proposed resolution

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bnjmnm created an issue. See original summary.

bnjmnm’s picture

Status: Active » Needs review

MR to review

bnjmnm’s picture

Issue tags: +Project Browser MVP

Tagging "Project Browser MVP" though this isn't MVP critical, but this can help get this visible to the group currently allocated on Project Browser as there should be bandwidth to include this in the work.

hooroomoo’s picture

Assigned: Unassigned » hooroomoo
hooroomoo’s picture

Assigned: hooroomoo » Unassigned
Status: Needs review » Needs work

I think Svelte store's subscribe method can be used here to update/set the localStorage like how it's currently being used right now for storing "page", "sort", "filters" inside the sessionStorage.

srishtiiee made their first commit to this issue’s fork.

srishtiiee’s picture

Status: Needs work » Needs review
hooroomoo’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work

NW due to one piece of unresolved feedback, feel free to reRTBC if @hooroomoo's point isn't relevant anymore

bnjmnm’s picture

Status: Needs work » Reviewed & tested by the community
tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks!

  • tim.plunkett committed 2bd3e07 on 1.0.x authored by bnjmnm
    Issue #3284463 by bnjmnm, srishtiiee, hooroomoo: Cache filter criteria...
tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.