usdigitalresponse / usdr-gost

USDR-hosted grants management tools
http://grants.usdigitalresponse.org
Apache License 2.0
32 stars 21 forks source link

[Issue]: Back behavior #2575

Open ClaireValdivia opened 9 months ago

ClaireValdivia commented 9 months ago

Why is this issue important?

now that grant details are separate pages, we don't want users to lose their spot on the previous page

Current State

na

Expected State

When you navigate to a grant details page from any page within grant finder, clicking the "Back" link should:

Within the Browse grants tab

On My Grants tab

Implementation Plan

The following functions need to be added...

Relevant Code Snippets

No response

jsandlund commented 8 months ago

Dropping in a few thoughts on possible solutions:

  1. store prev. search state in SERP url params (if 1, SERP urls w/ url params should be shareable with other logged-in users)
  2. store prev. search state somewhere else, e.g. localstorage?
  3. don't store prev. search state. open SERP links in new a tab, remove back button.
  4. other?

Agnostic of LOE, I really like #1. Sharing search results via URLs would be a nice-to-have. It feels more intuitive. And, as a bonus, we'd get better viz into search query data.

If the LOE of #1 is much higher than 2 (or 3): +1 starting w/ 2 or 3 w/ the MVP.

3 might be the simplest? Not ideal on mobile as the user can't swipe left to return. But per Google analytics, <2% of GF users are on mobile devices.

ClaireValdivia commented 8 months ago

This is looking great. moving this to closed and will open new issues for adjustments!