Skip to content

In redesigned rustdoc toolbar: Adjust spacings and sizing to improve behavior with over-long names #131002

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

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

steffahn
Copy link
Member

Fixes #130993.

Some additional adjustments also fix more issues I’ve noticed such as:

  • on small screens, opening search made the 3 bottons move down very slightly (because the row with the crate picker got larger, enlarging the whole grid), this is fixed with a min-height: 60px on the toolbar
  • with long names in the “breadcrumps” area, wrapping was very broken
    • Screenshot_20240929_031831
    • fixed:
    • Screenshot_20240929_035312
  • the left grid area has a minimal width (105px); like before, that leaves about enough space for crate names becoming as short as “all cra…”;
    to save even more space, there’s support for a little bit of extra squeezing of the buttons
    • Screenshot_20240929_034511
    • Screenshot_20240929_034525
    • Screenshot_20240929_034535

I’m really not super good with HTML or CSS stuff at all; there seem to be many magical numbers already, I’ve just used px values until things look right, I hope that’s okay 🤷‍♂️

r? @GuillaumeGomez

cc @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2024

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@steffahn
Copy link
Member Author

I suppose the diff of the 2nd commit is small enough (see below) that I can already squash without creating confusion in review.

cf8ed46

.rustdoc-breadcrumbs {
	grid-area: main-heading-breadcrumbs;
	line-height: 1.25;
+	display: flex;
+	flex-wrap: wrap;
	align-items: end;
	padding-top: 5px;
}

@steffahn steffahn force-pushed the rustdoc-long-names-fix branch from cf8ed46 to 6683c04 Compare September 29, 2024 02:29
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2024

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 29, 2024

📌 Commit c27b54a has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 29, 2024
@GuillaumeGomez
Copy link
Member

Thanks to both of you for the fix and the regression test! :)

@bors
Copy link
Collaborator

bors commented Sep 29, 2024

⌛ Testing commit c27b54a with merge 0d6e130...

@bors
Copy link
Collaborator

bors commented Sep 30, 2024

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 0d6e130 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 30, 2024
@bors bors merged commit 0d6e130 into rust-lang:master Sep 30, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 30, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0d6e130): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 1.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 767.898s -> 768.13s (0.03%)
Artifact size: 341.39 MiB -> 341.39 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: toolbar redesign no longer properly handles shortening of long crate names in search dropdown
7 participants