Skip to content
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

Fix rustdoc output performance #22769

Merged
merged 1 commit into from
Mar 12, 2015
Merged

Fix rustdoc output performance #22769

merged 1 commit into from
Mar 12, 2015

Conversation

mahkoh
Copy link
Contributor

@mahkoh mahkoh commented Feb 24, 2015

Fixes #22325

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@nagisa
Copy link
Member

nagisa commented Feb 24, 2015

This snippet actually does something useful, although it might not look like it is a case at the first sight.

It truncates short descriptions in the list of items such as in search or at the bottom of the module page. Without this script, horizontal scrolling appears on smaller viewports (ignore the terrible fonts, this is many-years old version of chrome being dumb):

screenshot from 2015-02-24 21 05 44

There’s not really a good way to preserve this functionality without javascript, because that’s how HTML tables work.

@mahkoh
Copy link
Contributor Author

mahkoh commented Feb 24, 2015

All the better. Whoever thought that hiding information from people with small screens was a good idea should be punished by having all descriptions removed from their rustdoc searches.

An alternative to the scrolling is breaking like this.
2015-02-24-201245_683x501_scrot

@huonw
Copy link
Member

huonw commented Feb 24, 2015

Could you amend the commit message to contain more details? As it stands it doesn't even contain a reference to the issue in question.

@mahkoh
Copy link
Contributor Author

mahkoh commented Feb 24, 2015

Done.

@retep998
Copy link
Member

Another solution is to use CSS which has a built in feature to cut off overflow with ellipses.
text-overflow: ellipsis;
Why are we simulating CSS with a terribly slow JS solution?

@nagisa
Copy link
Member

nagisa commented Mar 10, 2015

Because that doesn't work on tables.
On Mar 10, 2015 11:43 AM, "Peter Atashian" [email protected] wrote:

Another solution is to use CSS which has a built in feature to cut off
overflow with ellipses.
text-overflow: ellipsis;
Why are we simulating CSS with a terribly slow JS solution?


Reply to this email directly or view it on GitHub
#22769 (comment).

@brson
Copy link
Contributor

brson commented Mar 10, 2015

@bors: rollup r+

@bors
Copy link
Contributor

bors commented Mar 10, 2015

@bors r=brson 1275c11

@brson
Copy link
Contributor

brson commented Mar 10, 2015

Sorry for the delay.

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 11, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 12, 2015
@bors bors merged commit 1275c11 into rust-lang:master Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Responsive rustdoc output is unresponsive (literally)
7 participants