Skip to content

Commit 95f37b5

Browse files
nlhkabubrainwane
authored andcommitted
Add classifier FAQ, link to from filters (#3484)
* Add classifier FAQ, link to from filters * Update text and positioning based on feedback
1 parent c6392cb commit 95f37b5

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

warehouse/static/sass/blocks/_tooltip.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ $tooltip-duration: 0.1s !default;
1515

1616
// This is the tooltip bubble
1717
.tooltipped::after {
18+
content: attr(aria-label);
1819
position: absolute;
1920
z-index: 1000000;
2021
display: none;
2122
padding: 5px 8px;
22-
font-size: 11px/1.5;
23+
font-size: $base-font-size;
24+
font-weight: normal;
2325
-webkit-font-smoothing: subpixel-antialiased;
2426
color: $tooltip-text-color;
2527
text-align: center;
@@ -30,7 +32,6 @@ $tooltip-duration: 0.1s !default;
3032
word-wrap: break-word;
3133
white-space: pre;
3234
pointer-events: none;
33-
content: attr(aria-label);
3435
background: $tooltip-background-color;
3536
border-radius: 2px;
3637
opacity: 0;

warehouse/templates/pages/help.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
{% macro packages() %}What's a package, project, or release?{% endmacro %}
2424
{% macro installing() %}How do I install a file (package) from PyPI?{% endmacro %}
2525
{% macro publishing() %}How do I package and publish my code for PyPI?{% endmacro %}
26+
{% macro trove_classifier() %}What's a trove classifier?{% endmacro %}
2627
{% macro verified_email() %}Why do I need a verified email address?{% endmacro %}
2728
{% macro mirroring() %}How can I run a mirror of PyPI?{% endmacro %}
2829
{% macro APIs() %}Does PyPI have APIs I can use?{% endmacro %}
@@ -58,6 +59,7 @@ <h2 class="faq-group__first"><a href="#basics">Basics</a></h2>
5859
<li><a href="#packages">{{ packages() }}</a></li>
5960
<li><a href="#installing">{{ installing() }}</a></li>
6061
<li><a href="#publishing">{{ publishing() }}</a></li>
62+
<li><a href="#trove-classifier">{{ trove_classifier() }}</a></li>
6163
<li><a href="#verified-email">{{ verified_email() }}</a></li>
6264
</ul>
6365
</section>
@@ -128,6 +130,12 @@ <h3 id="publishing">{{ publishing() }}</h3>
128130
For full instructions on configuring, packaging and distributing your Python project, refer to the <a href="https://packaging.python.org/distributing/">packaging tutorial</a> on the <a href="https://packaging.python.org">Python Packaging User Guide</a>.
129131
</p>
130132

133+
<h3 id="trove-classifier">{{ trove_classifier() }}</h3>
134+
135+
<p>Each project's maintainers provide PyPI with a list of "trove classifiers" to categorize each release, describing who it's for, what systems it can run on, and how mature it is.</p>
136+
<p>These standardized classifiers can then be used by community members to find projects based on their desired criteria.</p>
137+
<p>Instructions for how to add trove classifiers to a project can be found on the <a href="https://packaging.python.org/tutorials/distributing-packages/#classifiers">Python Packaging User Guide</a>. To read the original classifier specification, refer to <a href="https://www.python.org/dev/peps/pep-0301/#distutils-trove-classification">PEP 301</a>.</p>
138+
131139
<h3 id="verified-email">{{ verified_email() }}</h3>
132140
<p>
133141
Currently, PyPI requires a verified email address to perform the following operations:

warehouse/templates/search/results.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,16 @@ <h3 class="package-snippet__title">
100100
<i class="fa fa-close" aria-hidden="true"></i>
101101
<span class="sr-only">Close</span>
102102
</a>
103-
<h2 class="no-top-padding">Filter Projects</h2>
103+
<h2 class="no-top-padding">
104+
Filter by classifier
105+
<a href="{{ request.route_path('help')}}#trove-classifier"
106+
class="tooltipped tooltipped-s"
107+
aria-label="What's a trove classifier?"
108+
data-original-label="What's a trove classifier?">
109+
<i class="fa fa-question-circle" aria-hidden="true"></i>
110+
<span class="sr-only">Classifier information<span>
111+
</a>
112+
</h2>
104113
<form id="classifiers">
105114
<input id="search" type="hidden" name="q" value="{{ term }}">
106115
<input type="hidden" name="o" value="{{ order }}">

0 commit comments

Comments
 (0)