gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Package registry: add description from UI

Open simmstein opened this issue 3 years ago • 2 comments

This PR fix #20604

  • The package has 2 new columns: description and readme
  • Settings contains 2 new fields dedicated to the description (plain text) and the readme (markdown)
  • Package page contains the description below the package name and the readme below the installation guide
  • The packages list show descriptions below each package title

simmstein avatar Aug 02 '22 12:08 simmstein

Some package types already contain a readme. (Pub (#20560), npm, PyPI)

All package types (except generic) have at minimum a description field which can be provided by the package. For your Docker case you can set the description with LABEL org.opencontainers.image.description=Your description of the image. So I don't think your description field is needed.

And keep in mind the readme may change from version to version. So it may be wrong to have the readme at the package level.

KN4CK3R avatar Aug 02 '22 18:08 KN4CK3R

The built-in package description is mainly interesting when you use the package search system. The proposed description is supposed to describe the package inside gitea. Like docker hub, the readme is a global description which does not depend of the shown version. This proposal unifies the way to manage descriptions of all packages 📦

simmstein avatar Aug 05 '22 13:08 simmstein

Could there be a conclusion from maintainers: go or no-go?

wxiaoguang avatar May 10 '23 06:05 wxiaoguang

Feature-wise I think it's good

lafriks avatar May 10 '23 12:05 lafriks

@KN4CK3R has your concern been addressed?

wxiaoguang avatar May 12 '23 17:05 wxiaoguang

@KN4CK3R has your concern been addressed?

I'm still not sure if we should have the readme part because some packages already provide a readme and then there would be two readmes shown.

We could store the provided readme in the new readme field, but the provided readme may be version dependend. I don't know if thats really a problem. It may be needed to set/update the readme and description fields from the package metadata (which may again be version dependend).

Github simply shows the README.md file if the package is linked to a (git) repository (similar to the profile readme feature).

KN4CK3R avatar May 21 '23 17:05 KN4CK3R

Then maybe it (this PR's proposal) needs some real cases for why a separate (non-package) README is needed, to see whether the separate README would be widely used and really needed.

wxiaoguang avatar May 21 '23 17:05 wxiaoguang

Maybe it's like repository which has both description and README.md?

lunny avatar May 22 '23 09:05 lunny

As I said the built-in package description is mainly interesting when you use the package search system. The proposed description is supposed to describe the package inside gitea. Like docker hub, the readme is a global description which does not depend of the shown version. This proposal unifies the way to manage descriptions of all packages package: a description shown in list, a readme/bigger description wrote in markdown to get more information (eg: overview of https://hub.docker.com/_/ubuntu).

simmstein avatar May 22 '23 10:05 simmstein

Would it make sense to consider using the OCI annotation for docmentation -- org.opencontainers.image.documentation then it could be condition (display if the field is provided, don't if it is not)

ref: https://github.com/opencontainers/image-spec/blob/main/annotations.md

ravensorb avatar Dec 19 '23 20:12 ravensorb