metacpan / metacpan-web

Web interface for MetaCPAN
http://metacpan.org
Other
414 stars 236 forks source link

Visually distinguish deprecated modules based on x_deprecated field #1435

Open haarg opened 9 years ago

haarg commented 9 years ago

In #toolchain, there has been discussion of establishing x_deprecated as a field to indicate deprecated modules. In the future, this could be used in search ranking. Initially though, it would be good to add a visual indicator of this somewhere when viewing modules.

oalders commented 9 years ago

+1

oalders commented 9 years ago

I saw some discussion about this being a boolean field for the dist. Is there any plan for deprecating just one module within a distribution or is that not a common enough use case?

haarg commented 9 years ago

@dagolden suggested handling per-module deprecations via x_deprecated fields in the provides hash. I think this is a sensible solution.

oalders commented 9 years ago

Once people start using this, could someone update this ticket with a couple of example dists that we can work from?

oalders commented 9 years ago

https://metacpan.org/release/POEx-Role-PSGIServer

karenetheridge commented 9 years ago

http://grep.cpan.me/?q=x_deprecated

https://metacpan.org/release/ETHER/Directory-Scratch-0.18 https://metacpan.org/release/ETHER/Any-Moose-0.26 https://metacpan.org/release/JLUIS/MetaCPAN-API-Tiny-1.150270 https://metacpan.org/release/BARBIE/Test-YAML-Meta-0.22

karenetheridge commented 9 years ago

Is there any plan for deprecating just one module within a distribution or is that not a common enough use case?

Yes, I've got this feature written for Dist::Zilla::Plugin::Deprecated, and will release it as soon as the necessary change to CPAN::Meta::Merge is released (likely at/by Berlin).

karenetheridge commented 9 years ago

@oalders these distributions now have individual modules marked as deprecated (vs. the entire distribution):

https://metacpan.org/release/Dist-Zilla-Plugin-Test-EOL https://metacpan.org/release/Dist-Zilla-Plugin-Test-NoTabs

oalders commented 9 years ago

@karenetheridge I don't see x_deprecated in https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-Test-EOL-0.17/META.json Am I looking at the wrong release?

karenetheridge commented 9 years ago

yes, it's 0.18, just uploaded. :)

oalders commented 9 years ago

Ah. I see it in https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-Test-EOL-0.18/META.json Thanks!

mickeyn commented 6 years ago

now that we have the field in the metadata, this can be done.

bluefeet commented 6 years ago

It would be nice if deprecated distributions didn't show, or are masked/greyed out, in search results by default so that the user can ignore them.

jjatria commented 5 years ago

I had a conversation about this feature yesterday with @neilb at LPW, but it looks like MetaCPAN doesn't yet make use of the deprecated flag.

Has a decision been made regarding what exactly we'd like to do with these distributions / modules? I imagine we want to mark them as deprecated in both the search result page and the module page. But how?

Also, would we want to do anything to further reduce their visibility in search like @bluefeet suggested? I'd like to see them at least ranked lower in search results, but we could even hide them entirely unless the search was for the literal name, or the user specifically asked for them (eg. clicking on some "include deprecated modules").

If that was clearer, I think I could try putting something together.