diff --git a/crates/bin/docs_rs_web/templates/core/home.html b/crates/bin/docs_rs_web/templates/core/home.html index 5ddc6dae9..e88924679 100644 --- a/crates/bin/docs_rs_web/templates/core/home.html +++ b/crates/bin/docs_rs_web/templates/core/home.html @@ -57,7 +57,8 @@

{{ crate::icons::IconCubes.render_solid(false, false, "") }} D
{{- release.name }}-{{ release.version -}}
-
+
{{- release.description.as_deref().unwrap_or_default() -}}
diff --git a/crates/bin/docs_rs_web/templates/releases/releases.html b/crates/bin/docs_rs_web/templates/releases/releases.html index 7746e79f9..26684a311 100644 --- a/crates/bin/docs_rs_web/templates/releases/releases.html +++ b/crates/bin/docs_rs_web/templates/releases/releases.html @@ -36,7 +36,8 @@
{{ name }}
-
Documentation not available on docs.rs
+
Documentation not available on docs.rs
{%- when ReleaseStatus::External(release) -%} @@ -46,7 +47,8 @@ {{- release.name -}}
-
+
{{- release.description -}}
@@ -81,7 +83,8 @@ {%- endif -%}
{#- -#} -
+
{{- release.description.as_deref().unwrap_or_default() -}}
diff --git a/crates/bin/docs_rs_web/templates/style/style.scss b/crates/bin/docs_rs_web/templates/style/style.scss index 036de8b82..e011b31f7 100644 --- a/crates/bin/docs_rs_web/templates/style/style.scss +++ b/crates/bin/docs_rs_web/templates/style/style.scss @@ -389,13 +389,6 @@ div.recent-releases-container { } } - .description:hover { - @media #{$media-sm} { - overflow: visible; - white-space: normal; - } - } - .date, .duration, .memory { diff --git a/gui-tests/long-crate-description.goml b/gui-tests/long-crate-description.goml index 2cfb0fee1..99fe223df 100644 --- a/gui-tests/long-crate-description.goml +++ b/gui-tests/long-crate-description.goml @@ -16,3 +16,15 @@ store-property: (|description_selector|, {"scrollWidth": description_width}) // It should be smaller due to padding, but if it overflows it'll be wider than the screen anyway. assert-false: |description_width| > |screen_width| +// Desktop release descriptions are truncated, but hovering them should not change +// the row height and make the release list jump around. +set-window-size: (1200, 800) +store-value: (release_selector, "div.recent-releases-container a.release") +set-text: (|description_selector|, "A very long crate description that should remain on one line when hovered instead of expanding and moving nearby release rows") + +store-property: (|release_selector|, {"clientHeight": release_height}) +move-cursor-to: |description_selector| +store-property: (|release_selector|, {"clientHeight": release_height_after_hover}) + +assert: |release_height_after_hover| == |release_height| +