Skip to content

Commit

Permalink
Fix project detail sidebar issues. (pypi#16746)
Browse files Browse the repository at this point in the history
* Meta details should not be vertical tabs

* Remove inline style and per-link checks

* Update translations
  • Loading branch information
di authored Sep 18, 2024
1 parent 888e1b6 commit 73165b8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 54 deletions.
61 changes: 29 additions & 32 deletions warehouse/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2806,103 +2806,100 @@ msgstr ""
msgid "Members"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:16
#: warehouse/templates/includes/packaging/project-data.html:17
msgid "Verified details"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:18
msgid "(What is this?)"
#, python-format
msgid "Verified by PyPI on %(release_date)s"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:21
msgid "These details have been verified by PyPI"
#, python-format
msgid "These details have been <a href=\"%(href)s\">verified by PyPI</a>"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:23
#: warehouse/templates/includes/packaging/project-data.html:140
#: warehouse/templates/includes/packaging/project-data.html:139
msgid "Project links"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:31
#, python-format
msgid "URL verified by PyPI on %(release_date)s"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:51
#: warehouse/templates/includes/packaging/project-data.html:50
msgid "GitHub Statistics"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:57
#: warehouse/templates/includes/packaging/project-data.html:56
msgid "Repository"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:64
#: warehouse/templates/includes/packaging/project-data.html:63
msgid "Stars:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:72
#: warehouse/templates/includes/packaging/project-data.html:71
msgid "Forks:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:80
#: warehouse/templates/includes/packaging/project-data.html:79
msgid "Open issues:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:88
#: warehouse/templates/includes/packaging/project-data.html:87
msgid "Open PRs:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:96
#: warehouse/templates/includes/packaging/project-data.html:95
msgid "Maintainers"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:98
#: warehouse/templates/includes/packaging/project-data.html:97
msgid "Avatar for {username} from gravatar.com"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:113
#: warehouse/templates/includes/packaging/project-data.html:156
#: warehouse/templates/includes/packaging/project-data.html:112
#: warehouse/templates/includes/packaging/project-data.html:155
msgid "Meta"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:118
#: warehouse/templates/includes/packaging/project-data.html:168
#: warehouse/templates/includes/packaging/project-data.html:174
#: warehouse/templates/includes/packaging/project-data.html:117
#: warehouse/templates/includes/packaging/project-data.html:167
#: warehouse/templates/includes/packaging/project-data.html:173
msgid "Author:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:126
#: warehouse/templates/includes/packaging/project-data.html:181
#: warehouse/templates/includes/packaging/project-data.html:187
#: warehouse/templates/includes/packaging/project-data.html:125
#: warehouse/templates/includes/packaging/project-data.html:180
#: warehouse/templates/includes/packaging/project-data.html:186
#: warehouse/templates/pages/help.html:620
msgid "Maintainer:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:137
#: warehouse/templates/includes/packaging/project-data.html:136
msgid "Unverified details"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:138
#: warehouse/templates/includes/packaging/project-data.html:137
msgid "These details have <b>not</b> been verified by PyPI"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:161
#: warehouse/templates/includes/packaging/project-data.html:160
msgid "License:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:195
#: warehouse/templates/includes/packaging/project-data.html:194
msgid "Tags"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:207
#: warehouse/templates/includes/packaging/project-data.html:206
msgid "Requires:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:214
#: warehouse/templates/includes/packaging/project-data.html:213
msgid "Provides-Extra:"
msgstr ""

#: warehouse/templates/includes/packaging/project-data.html:224
#: warehouse/templates/includes/packaging/project-data.html:223
#: warehouse/templates/pages/classifiers.html:16
#: warehouse/templates/pages/classifiers.html:21
#: warehouse/templates/pages/sitemap.html:39
Expand Down
6 changes: 0 additions & 6 deletions warehouse/static/sass/blocks/_verified.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
padding-top: 0;
}

li {
a {
display: inline;
}
}

h3 {
padding-bottom: 0;
}
Expand Down
31 changes: 15 additions & 16 deletions warehouse/templates/includes/packaging/project-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
-#}

<div class="sidebar-section verified">
<h3 class="sidebar-section__title">{% trans %}Verified details{% endtrans %}&nbsp;
<a href="https://docs.pypi.org/project_metadata/#verified-details">
<small><i>{% trans %}(What is this?){% endtrans %}</i></small>
</a>
</h3>
<small><i>{% trans %}These details have been verified by PyPI{% endtrans %}</i></small>
<h3 class="sidebar-section__title">
{% trans %}Verified details{% endtrans %}
<i class="fa fa-circle-check check" title="{% trans release_date=release.created.date() %}Verified by PyPI on {{ release_date }}
{% endtrans %}"></i>
</h3>
<small><i>{% trans href="https://docs.pypi.org/project_metadata/#verified-details" %}These details have been <a href="{{ href }}">verified by PyPI</a>{% endtrans %}</i></small>
{% if release.urls_by_verify_status(verified=True).values() | contains_valid_uris %}
<h6>{% trans %}Project links{% endtrans %}</h6>
<ul class="vertical-tabs__list">
Expand All @@ -28,7 +28,6 @@ <h6>{% trans %}Project links{% endtrans %}</h6>
<a class="vertical-tabs__tab vertical-tabs__tab--with-icon vertical-tabs__tab--condensed" href="{{ url }}" rel="nofollow">
{{ url_icon(name, url) }}{{ name }}
</a>
<i class="fa fa-circle-check check" title="{% trans release_date=release.created.date() %}URL verified by PyPI on {{ release_date }}{% endtrans %}"></i>
</li>
{% endif %}
{% endfor %}
Expand Down Expand Up @@ -111,7 +110,7 @@ <h6>{% trans %}Maintainers{% endtrans %}</h6>
{% if release.has_meta and (release.author_email_verified or release.maintainer_email_verified) %}
<div class="sidebar-section verified">
<h6>{% trans %}Meta{% endtrans %}</h6>
<ul class="vertical-tabs__list">
<ul>
{% if release.author_email and release.author_email_verified %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
Expand Down Expand Up @@ -154,43 +153,43 @@ <h6>{% trans %}Project links{% endtrans %}</h6>
{% if release.has_meta %}
<div class="sidebar-section unverified">
<h6>{% trans %}Meta{% endtrans %}</h6>
<ul class="vertical-tabs__list">
<ul>
{% if license %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}License:{% endtrans %}</strong> {{ license }}
</span>
</li>
{% endif %}
{% if release.author_email and not release.author_email_verified %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}Author:{% endtrans %}</strong> <a href="mailto:{{ release.author_email|format_email|last }}">{{ release.author or release.author_email|format_email|first }}</a>
</span>
</li>
{% elif release.author %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}Author:{% endtrans %}</strong> {{ release.author }}
</span>
</li>
{% endif %}
{% if release.maintainer_email and not release.maintainer_email_verified%}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}Maintainer:{% endtrans %}</strong> <a href="mailto:{{ release.maintainer_email|format_email|last }}">{{ release.maintainer or release.maintainer_email|format_email|first }}</a>
</span>
</li>
{% elif release.maintainer %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}Maintainer:{% endtrans %}</strong> {{ release.maintainer }}
</span>
</li>
{% endif %}
{% if release.keywords %}
<li class="tags">
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<i class="fa fa-tags" aria-hidden="true"></i>
<span class="sr-only">{% trans %}Tags{% endtrans %}</span>
{% for keyword in release.keywords | format_tags %}
Expand All @@ -203,7 +202,7 @@ <h6>{% trans %}Meta{% endtrans %}</h6>
{% endif %}
{% if release.requires_python %}
<li>
<span class="vertical-tabs__tab vertical-tabs__tab--condensed">
<span>
<strong>{% trans %}Requires:{% endtrans %}</strong> Python {{ release.requires_python|replace(',', ', ') }}
</span>
</li>
Expand Down

0 comments on commit 73165b8

Please sign in to comment.