Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: don't display README section if it is empty #40867

Closed
julieqiu opened this issue Aug 18, 2020 · 6 comments
Closed

x/pkgsite: don't display README section if it is empty #40867

julieqiu opened this issue Aug 18, 2020 · 6 comments

Comments

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Aug 18, 2020

If a package doesn't have a README, don't display it.

What did you do?

Visited https://pkg.go.dev/github.com/gnuy/subdivx-get@v0.0.0-20200818145511-51d3e492f137?tab=overview

What did you expect to see?

No README section:

image

What did you see instead?

An empty README section:

image

@ironbatshashank
Copy link

@ironbatshashank ironbatshashank commented Aug 19, 2020

Instead of displaying no readme section, how about we autogenerate a readme section? I think it'll be more helpful.

@julieqiu
Copy link
Contributor Author

@julieqiu julieqiu commented Aug 19, 2020

@ironbatshashank - what are your thoughts on what that would look like?

@IamCathal
Copy link

@IamCathal IamCathal commented Aug 19, 2020

I think if there was to be some auto generated content it would be a bit difficult:

Pros

  • There is some more content on the screen and it doesn't look sparse

Cons

  • Would have to pull stats from the repo like stars/language and description possibly? Getting a usable structure of information from this that would work for all repos without a readme would be difficult. If a repo didn't have a readme in the first place I don't think they'd have much else information to take add generate our own.
  • Maybe nitpicking but users would expect this readme to be the actual readme and if the generated version and the actual version weren't the same it could lead to some confusion.

I would opt for just a simple box of placeholder text saying something like "Looks like this project doesn't have a readme yet" or something similar. It requires minimal work to implement and can't break. I've not contributed to a golang project before but I'd be up for learning the process of contributing after completing the contributing guide.

@julieqiu
Copy link
Contributor Author

@julieqiu julieqiu commented Aug 19, 2020

I would opt for just a simple box of placeholder text saying something like "Looks like this project doesn't have a readme yet" or something similar. It requires minimal work to implement and can't break.

Thanks for the input, @IamCathal! Let's go with that suggestion.

I've not contributed to a golang project before but I'd be up for learning the process of contributing after completing the contributing guide.

If you're interested in contributing this fix, let me know. Happy to help you get started and answer any questions in #pkgsite Slack.

https://github.com/golang/pkgsite/blob/master/CONTRIBUTING.md#getting-started is a good starting point.

@IamCathal
Copy link

@IamCathal IamCathal commented Sep 3, 2020

I failed to get the DB setup about 4 times on my own and couldn't progress with this issue, thank you very much @rahulw for the help with the setup.

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 3, 2020

Change https://golang.org/cl/252997 mentions this issue: internal/frontend: do not display empty READMEs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants