Skip to content

rustdoc: add emoji icons for unstable and deprecated to search results#153746

Open
lolbinarycat wants to merge 1 commit intorust-lang:mainfrom
lolbinarycat:rustdoc-search-mark-unstable-deprecated
Open

rustdoc: add emoji icons for unstable and deprecated to search results#153746
lolbinarycat wants to merge 1 commit intorust-lang:mainfrom
lolbinarycat:rustdoc-search-mark-unstable-deprecated

Conversation

@lolbinarycat
Copy link
Copy Markdown
Contributor

@lolbinarycat lolbinarycat commented Mar 11, 2026

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 11, 2026

Some changes occurred in GUI tests.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rustbot rustbot added A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Mar 11, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member

Please add a screenshot of the result.

@lolbinarycat
Copy link
Copy Markdown
Contributor Author

screenshots.

image image

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the rustdoc-search-mark-unstable-deprecated branch from 42654af to 35dfa18 Compare March 11, 2026 22:19
@GuillaumeGomez
Copy link
Copy Markdown
Member

screenshots.

Would make more sense to put the emoji before the name, no? The shift in the alignment would make them stand out as different, which is the goal here iuuc.

@lolbinarycat
Copy link
Copy Markdown
Contributor Author

hm, perhaps. I actually had them after the name initially.. it's a quick change lemme give it a try.

@GuillaumeGomez
Copy link
Copy Markdown
Member

(don't forget screenshot 😉 )

@lolbinarycat
Copy link
Copy Markdown
Contributor Author

did this by accident but we might as well consider it as an option:

image

the thing you actually asked for:

image image

@GuillaumeGomez
Copy link
Copy Markdown
Member

Not a big fan of putting the emoji at the very beginning. Also, can you add a whitespace after the emoji please?

We're gonna need a FCP from rustdoc-ui here I think.

@lolbinarycat lolbinarycat force-pushed the rustdoc-search-mark-unstable-deprecated branch from 35dfa18 to ec0af91 Compare March 11, 2026 23:00
@rustbot rustbot added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Mar 11, 2026
@lolbinarycat
Copy link
Copy Markdown
Contributor Author

lolbinarycat commented Mar 11, 2026

added padding

image image

i thought about making it so that if an item is unstable and deprecated, only the rightmost one will get the padding (well, actually i'd use + .path to add left padding to the path portion), but it seems unlikely that such an item would exist for long enough for the extra code to be worth it.

@lolbinarycat lolbinarycat force-pushed the rustdoc-search-mark-unstable-deprecated branch 2 times, most recently from 15488d7 to 17ac7ca Compare March 11, 2026 23:05
@GuillaumeGomez
Copy link
Copy Markdown
Member

added padding

Looks good to me!

@GuillaumeGomez GuillaumeGomez removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 12, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member

Code looks good to me as well, thanks! Let's open an FCP for it.

@rfcbot fcp merge

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

Error encounted:
Provided team `` is invalid

@GuillaumeGomez
Copy link
Copy Markdown
Member

Ah, no team for T-rustdoc-frontend? Strange.

@rfcbot poll T-rustdoc-frontend

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented Mar 12, 2026

Team member @GuillaumeGomez has asked teams: T-rustdoc-frontend, for consensus on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc: indicate unstable items in search results (and sidebar?)

5 participants