pkgstats.archlinux.de icon indicating copy to clipboard operation
pkgstats.archlinux.de copied to clipboard

Plot multiple packages

Open FranklinYu opened this issue 2 years ago • 2 comments

URL could be something like https://pkgstats.archlinux.de/packages/fish,zsh (comma-delimited list of packages), with some hard limit (e.g. 10 packages). It can be interesting to compare popularity of packages.

FranklinYu avatar Dec 01 '23 06:12 FranklinYu

You can compare multiple packages by building an URL like https://pkgstats.archlinux.de/compare/packages#packages=fish,zsh It's not documented but does this fit what you were looking for?

pierres avatar Dec 01 '23 07:12 pierres

Yes, this is exactly what I was looking for. Any concern of documenting this? Or maybe even better, add a web form to generate this link?

FranklinYu avatar Dec 16 '23 04:12 FranklinYu

I am on it (a frontend form/something for this feature)

Update

I think the views are closely related so I moved the implementation to /packages

Todos:

  • [x] wip: test coverage (basic cypress test is added but not all functionalities covered yet)

First Draft

First draft if we integrate it into the /packages view is on branch allow-selection-of-packages-to-compare . I made a new route for local development, /compare/packages/custom (only for fast switching between old and new, if we chose this, the prod route would be /packages)

packageComparisonDesignDraft

The Graph is displayed in a new tab. If we go for this approach, we could add the selection of time range in the graph tab.

~~# Alternative Idea~~ ~~We could also separate the package popularity and the comparison. /packages would stay untouched and we could have a second page working roughly the same -> search, display results but without popularity, allow addition to packages to be compared but with the graph on the page + the graph instantly updating on package selection/deselection~~

m1rm avatar May 20 '24 10:05 m1rm