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

Handle the case when a project doesn't have a long description #790

Closed
dstufft opened this issue Nov 20, 2015 · 6 comments
Closed

Handle the case when a project doesn't have a long description #790

dstufft opened this issue Nov 20, 2015 · 6 comments
Labels
good first issue This issue is ideal for first-time contributors!

Comments

@dstufft
Copy link
Member

dstufft commented Nov 20, 2015

When a project doesn't have a description we currently land on a blank pane on the UI. Is this acceptable? Should we switch to a different pane?

@nlhkabu
Copy link
Contributor

nlhkabu commented Nov 20, 2015

I think for the description pane, we should add a default message like "This package does not have a long description. If you are the owner of this package you can provide a description by .".

But for the other panes, we should simply hide them. For example, when there are no downloads, we should hide the download pane and link altogether.

@nlhkabu nlhkabu added the good first issue This issue is ideal for first-time contributors! label Nov 22, 2015
@nlhkabu nlhkabu modified the milestone: Become PyPI Dec 12, 2015
@nlhkabu
Copy link
Contributor

nlhkabu commented Dec 29, 2015

@dstufft I've got a styled solution for this ready to go...

{% if release.description %}
<div class="release-description">
  {{ release.description|readme(format="rst") }}
</div>
{% else %}
<div class="callout-block">
  <p>The author of this package has not provided a project description.</p>
</div>
{% endif %}

The only problem is that when a package description is not available, the code is returning 'unknown' as a string. Should it be doing this? How can I get around it? I'm not keen on string matching for 'unknown' in the template...

@dstufft
Copy link
Member Author

dstufft commented Dec 29, 2015

Don't special case UNKNOWN.

There's some history there where distutils would "helpfully" fill in a missing but required value with UNKNOWN which has caused a bunch of UNKNOWN in the database to show up. Warehouse correctly sanitizes out the UNKNOWN values upon new uploads and stores them as NULL or "" in the database (which will show up as None or "" in Python). That leaves the existing packages that still have UNKNOWN in the database, and my plan is once legacy PyPI is gone and no longer able to add more of them into the database, then I'll do a data migration to clean the database of them. This is being tracked by #69.

For now, Warehouse should just treat an UNKNOWN as if someone actually typed that into the description and render it as such.

@nlhkabu
Copy link
Contributor

nlhkabu commented Dec 29, 2015

Ok, thanks for the explanation. Sounds good to me :D

@dstufft
Copy link
Member Author

dstufft commented Dec 30, 2015

Is this handled now that #875 is merged?

@nlhkabu
Copy link
Contributor

nlhkabu commented Dec 30, 2015

Yes! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is ideal for first-time contributors!
Projects
None yet
Development

No branches or pull requests

2 participants