hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Link to last working doc

Open AliasQli opened this issue 2 years ago • 4 comments

This pull request implements issue #668 as an GSoC project, mentored by @gbaz. It adds an indicator for each package version with a working doc. It looks like this, where version 0.1.0 has doc but 0.1.1 not:

Screenshot_20220708_164253

Actually I'm not very satisfied with the UI and am expecting a better idea.

This is my first time contributing here, so if I did something wrong in code style or structure please point it out.

AliasQli avatar Jul 08 '22 08:07 AliasQli

Now I changed the UI and this time it's much better. When the current version doesn't have a doc built, it tries to find the greatest version with a working doc that is not depcrated. Screensoht:

2

AliasQli avatar Jul 08 '22 10:07 AliasQli

I think that find code is correct. However, I think the link should not be in the versions listing.

Rather, it should be either above or below the modules listing in the main pane, not the sidebar. (As the modules listing is where people would click through to get the docs, should they exist:

image

Additionally, maybe the redirect for docs, as described in this issue, could pick last working docs: https://github.com/haskell/hackage-server/issues/1095

gbaz avatar Jul 08 '22 14:07 gbaz

The described redirect for docs is added. Now DocumentationFeature depend on VersionsFeature, since it has to find out the package status. Unpreferred versions are also excluded from redirection. Will work on UI tomorrow.

AliasQli avatar Jul 08 '22 18:07 AliasQli

Screenshot:

3

AliasQli avatar Jul 09 '22 09:07 AliasQli

was accidentally included in https://github.com/haskell/hackage-server/pull/1116 and hence already merged

gbaz avatar Dec 31 '22 23:12 gbaz