madnight / githut

Github Language Statistics
https://madnight.github.io/githut
GNU Affero General Public License v3.0
967 stars 125 forks source link

Save language visibility in localStorage #39

Closed icholy closed 3 years ago

icholy commented 3 years ago

I wanted to store them in url search parameters, but idk how to use react.

madnight commented 3 years ago

Could you explain in a few sentences what are you trying todo? Maybe I can implement that feature for you as url search parameter.

icholy commented 3 years ago

I have two issues:

  1. I need to re-select the languages when cycling through the different views (issues, PRs, etc ...).
  2. There's no way to share a link with a set of pre-selected languages.

For example:

https://madnight.github.io/githut/#/pushes/2020/4?l=javascript&l=python&l=ruby

I imagine it working like this:

madnight commented 3 years ago

I wanted to store them in url search parameters, but idk how to use react.

Hi @icholy,

I just implemented this feature for you. As you can see its a rather small patchset: https://github.com/madnight/githut/commit/aefc16147d544cd8d73087a51fda6110442a0827

Now, it's possible to preselect languages for comparison in the language chart by adding them to the URL like so: https://madnight.github.io/githut/#/pull_requests/2021/1/Python,TypeScript,Shell,Lua

icholy commented 3 years ago

Awesome thanks!