Notification for deprecated versions of packages
When browsing the versions of a package, if the currently viewed package is deprecated, there should be a warning (similar to the warning for entirely deprecated packages).
@dzackgarza maybe?
Since this is listed as a "good first issue", could someone with know-how quickly sketch an implementation plan for someone to follow?
Wait, maybe I can do it after 30 seconds of digging:
- Note that there are now two forms of deprecation:
- whole-package deprecation (see e.g. accelerate-cuda, which does have a deprecation notice)
- per-version deprecation. See network's deprecation information, and notice that the deprecated version is highlighted as such in the version list, but the deprecated version's specific page still has no notice (that's why this issue should remain open, although I presume it should have been "closed" for some decent portion of its life).
- Extend this use of
isDeprecated, or rename toisPackageDeprecatedand introduceisVersionDeprecated - Find where
is[Package]Deprecatedis defined, and make a similar definition forisVersionDeprecated - Consider making the deprecation notice stand out more in the design and layout!
Looks like you have the right of it!
https://github.com/haskell/hackage-server/blob/986fea22852c6171411b60453f0047405593025e/Distribution/Server/Pages/PackageFromTemplate.hs is the main place to look, to start.
Consider making the deprecation notice stand out more in the design and layout!
Fwiw, I wanted to try to use a colored box like e.g. the light red one used for the warnings at e.g.
http://hackage.haskell.org/package/bad-package-example-0/candidate
or something like that...
WIP is here: https://github.com/chreekat/hackage-server/pull/1
As the commit mentions, I'm having trouble with a Hackage mirror, so I haven't test-compiled the changes yet. :)
Trouble persists:
Resolving dependencies...
Notice: installing into a sandbox located at
/home/b/src/hackage-server/.cabal-sandbox
Downloading Cabal-2.2.0.1...
Downloading aeson-1.1.2.0...
Downloading safecopy-0.9.4.1...
Configuring aeson-1.1.2.0...
Configuring safecopy-0.9.4.1...
Downloading xss-sanitize-0.3.5.7...
Unexpected response 503for http://objects-us-west-1.dream.io/hackage-mirror/package/xss-sanitize-0.3.5.7.tar.gz
can't you just set your config to use the main server instead of a mirror?
Since this is offtopic (oops, my fault) I'll follow up elsewhere.