diff --git a/tests/frontend/filter_list_controller_test.js b/tests/frontend/filter_list_controller_test.js index ad9a00554a7e..42849c568958 100644 --- a/tests/frontend/filter_list_controller_test.js +++ b/tests/frontend/filter_list_controller_test.js @@ -15,23 +15,56 @@ const testFixtureHTMLShowing = `
`; const testFixtureHTMLFilters = ` - - + + `; const testFixtureHTMLItems = ` -When a field is not editable, you can use me instead
Some help text here
+ + + Modifiers: + - flex-width: makes fields inside the group flexible width (instead of 350px wide) */ .form-group { @@ -126,6 +130,39 @@ } } + &--flex-width { + max-width: unset; + + :where( + input:not([type]), + select, + textarea, + [type="color"], + [type="date"], + [type="datetime"], + [type="datetime-local"], + [type="email"], + [type="month"], + [type="month"], + [type="number"], + [type="password"], + [type="search"], + [type="tel"], + [type="text"], + [type="time"], + [type="url"], + [type="week"] + ).form-group__field, + select.form-group__field { + width: 100%; + max-width: 100%; + } + + select.form-group__field { + padding-right: $spacing-unit; + } + } + // Specific cases for input validation using `pattern` attribute /* stylelint-disable-next-line selector-id-pattern -- Form sets name */ diff --git a/warehouse/static/sass/blocks/_table.scss b/warehouse/static/sass/blocks/_table.scss index 10df7f4217ef..bfab883edf76 100644 --- a/warehouse/static/sass/blocks/_table.scss +++ b/warehouse/static/sass/blocks/_table.scss @@ -31,8 +31,9 @@ Modifiers: - information: table for displaying table data - ideally with row level headings - downloads: specific styles for downloads table on project detail page + - files: specific styles for files table on project detail page - releases: specific styles for releases table on manage project page - - files: specific styles for files table on releases tab + - manage-files: specific styles for files table on the releases tab - history: specific styles for project journals - hashes: specific styles for the hashes table on an individual file - collaborators: specific styles for managing a project's collaborators @@ -59,6 +60,7 @@ tbody tr td:last-child { display: block; width: 100%; + max-width: 100%; text-align: left; border-bottom: 0; padding: 2px 0; @@ -169,8 +171,8 @@ &--information { th { - width: 1%; - white-space: nowrap; + width: 1%; + white-space: nowrap; } td, @@ -197,6 +199,19 @@ } } + &--files { + margin-bottom: $half-spacing-unit; + + td.file-name { + word-wrap: break-word; + max-width: 250px; + } + + @media only screen and (max-width: $desktop) { + @include mobile-friendly-table; + } + } + &--releases { word-wrap: break-word; margin-bottom: $spacing-unit; @@ -207,7 +222,7 @@ } } - &--files, + &--manage-files, &--history { margin-top: $half-spacing-unit; diff --git a/warehouse/static/sass/warehouse.scss b/warehouse/static/sass/warehouse.scss index 7c3200981c1e..684e91ada890 100644 --- a/warehouse/static/sass/warehouse.scss +++ b/warehouse/static/sass/warehouse.scss @@ -96,6 +96,7 @@ @import "blocks/project-description"; /*rtl:end:ignore*/ @import "blocks/files"; +@import "blocks/filter-wheels"; @import "blocks/radio-toggle-form"; @import "blocks/release"; @import "blocks/release-timeline"; diff --git a/warehouse/templates/manage/project/release.html b/warehouse/templates/manage/project/release.html index 6f3277ed9997..ec37bfbf1c0e 100644 --- a/warehouse/templates/manage/project/release.html +++ b/warehouse/templates/manage/project/release.html @@ -32,7 +32,7 @@| {% trans %}File{% endtrans %} | +{% trans %}Uploaded{% endtrans %} | +{% trans %}Size{% endtrans %} | +{% trans %}Type{% endtrans %} | +{% trans %}Details{% endtrans %} | + + {% for file in files %} +
|---|---|---|---|---|
| + {% trans %}File{% endtrans %} + + {{ file.filename }} + | ++ {% trans %}Uploaded{% endtrans %} + {% trans upload_time=humanize(file.upload_time) %}Uploaded {{ upload_time }}{% endtrans %} + | ++ {% trans %}Size{% endtrans %} + {{ file.size|filesizeformat() if file.size else 0|filesizeformat() }} + | ++ {% trans %}Type{% endtrans %} + {% trans %}Source{% endtrans %} + | ++ {% trans %}View details{% endtrans %} + {% trans %}Details{% endtrans %} + | +
| {% trans %}File{% endtrans %} | +{% trans %}Interpreter{% endtrans %} | +{% trans %}ABI{% endtrans %} | +{% trans %}Platform{% endtrans %} | +{% trans %}Details{% endtrans %} | + + {% for file in files %} +|||
|---|---|---|---|---|---|---|---|
|
+ {% trans %}File{% endtrans %}
+
+ Download file
+ + + {{ file.size|filesizeformat() if file.size else 0|filesizeformat() }}. + {% trans upload_time=humanize(file.upload_time) %}Uploaded {{ upload_time }}{% endtrans %}. + + |
+ {% if 'Egg' in file.pretty_wheel_tags %}
+ + {{ file.filename }} + {% for tag in file.pretty_wheel_tags %} + {% if loop.first %}-{% endif %} + {{ tag }} + {% if not loop.last %} {% endif %} + {% endfor %} + | + {% else %} +
+ {% trans %}Interpreter{% endtrans %}
+ {% for key, value in file.wheel_filters.items() %}
+ {% if key == 'interpreter' %}
+ {% for interpreter_value, interpreter_label in value.items() %}
+ {{ interpreter_label }}
+ {% if not loop.last %} {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + |
+
+ {% trans %}ABI{% endtrans %}
+ {% for key, value in file.wheel_filters.items() %}
+ {% if key == 'abi' %}
+ {% for abi_value, abi_label in value.items() %}
+ {{ abi_label }}
+ {% if not loop.last %} {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + |
+
+ {% trans %}Platform{% endtrans %}
+ {% for key, value in file.wheel_filters.items() %}
+ {% if key == 'platform' %}
+ {% for platform_value, platform_label in value.items() %}
+ {{ platform_label }}
+ {% if not loop.last %} {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + |
+ {% endif %}
+ + {% trans %}View details{% endtrans %} + {% trans %}Details{% endtrans %} + | +||
- {% trans href='https://packaging.python.org/tutorials/installing-packages/', title=gettext('External link') %}Download the file for your platform. If you're not sure which to choose, learn more about installing packages.{% endtrans %} + {% trans href='https://packaging.python.org/en/latest/discussions/package-formats/#package-formats', title=gettext('External link') %}For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.{% endtrans %}
- {% trans %}Filter files by name, interpreter, ABI, and platform.{% endtrans %} -
-- {% trans href='https://packaging.python.org/en/latest/specifications/binary-distribution-format/', title=gettext('External link') %}If you're not sure about the file name format, learn more about wheel file names.{% endtrans %} -
- -- {% trans %}Copy a direct link to the current filters {% endtrans %} - - -
-- -
-+ +
+{% endif %} +{% endif %}