Forty-Bot / trends.tf

Team Fortress 2 Stats and Trends
https://trends.tf
Other
14 stars 2 forks source link

Keep filters when navigating between pages #93

Open alexkosla opened 1 year ago

alexkosla commented 1 year ago

When going from a tab like "Overview", if you pick any/all of the filters (class, dates, format, etc.), the filters will disappear when switching to a new section like "Logs". I think by default it would be nice to have these filters carry over in local storage, as it's annoying to have to set stuff like the same dates on all of the pages.

Forty-Bot commented 1 year ago

Hm, I'm not sure about this. I've thought about implementing this in the past, but I was concerned about changing the defaults. We also don't currently have a way to clear filters, other than by navigating away from a page.

This doesn't require any local storage, as we already have the machinery in place to add filters to links to other pages. However, it might be nice to use cookies to store a preference here.

Before implementing this, I want to investigate what other sites (dotabuff, opendota, etc) do.

Forty-Bot commented 10 months ago

OK, so I saw this feature in Thunderbird. Effectively what they have is a button which you can select to keep filters when navigating between folders. I think that would work analogously with a checkbox. I think this would need to be implemented in javascript, since we want to make sure that you can check the box and then click a link.