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

make rustdoc more responsive #16277

Merged
merged 1 commit into from
Aug 8, 2014
Merged

make rustdoc more responsive #16277

merged 1 commit into from
Aug 8, 2014

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Aug 5, 2014

  • move some sidebar contents to a title bar when small
  • inline description toggle when small
  • make out-of-band and in-band content share space, rather than float and clash
  • compress wording of out-of-band content to avoid line-wrap as much as possible

Live Version Here

Pages Of Interest:

TBD in a future PR is to convert links in the sidebar into a series of nest ul/li's, so that they can easily be moved to a drop-down in the new title bar. I think this is out of scope for this PR, but am willing to implement it now if desired.

@Gankra
Copy link
Contributor Author

Gankra commented Aug 5, 2014

Fixes #16269

@steveklabnik
Copy link
Member

"Stability dashboard" was just changed to 'stability', so this should as well, for consistency

@steveklabnik
Copy link
Member

I'm on Firefox on ubuntu, and this seems a little odd:
screenshot from 2014-08-06 14 00 50

i'd expect the - to be level with the text rather than above

* move some sidebar contents to a title bar when small
* inline description toggle when small
* make out-of-band and in-band content share space, rather than float and clash
* compress wording of out-of-band content to avoid line-wrap as much as possible
@Gankra
Copy link
Contributor Author

Gankra commented Aug 6, 2014

Currently rebuilding from rebase, may take a bit.

@Gankra
Copy link
Contributor Author

Gankra commented Aug 6, 2014

@steveklabnik that's actually the current behaviour of master before this change. I can try to fix it (the problem is that the heading is big with extra padding), but that might be out-of-scope for this change. Your call.

@Gankra
Copy link
Contributor Author

Gankra commented Aug 6, 2014

Merge and build successful.

@Gankra
Copy link
Contributor Author

Gankra commented Aug 7, 2014

Unclear on the status of this. Should I be fixing @steveklabnik's issue, or is this a-ok?

bors added a commit that referenced this pull request Aug 8, 2014
* move some sidebar contents to a title bar when small
* inline description toggle when small
* make out-of-band and in-band content share space, rather than float and clash
* compress wording of out-of-band content to avoid line-wrap as much as possible

## [Live Version Here](http://cg.scs.carleton.ca/~abeinges/doc/index.html)

Pages Of Interest:
* [Vec](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html) (small path)
* [TreeSet](http://cg.scs.carleton.ca/~abeinges/doc/collections/treemap/struct.TreeSet.html) (long path)
* [std](http://cg.scs.carleton.ca/~abeinges/doc/std/index.html) (for stability dash)

TBD in a future PR is to convert links in the sidebar into a series of nest ul/li's, so that they can easily be moved to a drop-down in the new title bar. I think this is out of scope for this PR, but am willing to implement it now if desired.
@bors bors closed this Aug 8, 2014
@bors bors merged commit dd437ee into rust-lang:master Aug 8, 2014
@Gankra Gankra deleted the responsive-docs branch August 18, 2014 19:10
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2024
Resolve panic in `generate_delegate_methods`

Fixes rust-lang#16276

This PR addresses two issues:

1. When using `PathTransform`, it searches for the node corresponding to the `path` in the `source_scope` during `make::fn_`. Therefore, we need to perform the transform before `make::fn_` (similar to the problem in issue rust-lang#15804). Otherwise, even though the tokens are the same, their offsets (i.e., `span`) differ, resulting in the error "Can't find CONST_ARG@xxx."

2. As mentioned in the first point, `PathTransform` searches for the node corresponding to the `path` in the `source_scope`. Thus, when transforming paths, we should update nodes from right to left (i.e., use **reverse of preorder** (right -> left -> root) instead of **postorder** (left -> right -> root)). Reasons are as follows:

    In the red-green tree (rowan), we do not store absolute ranges but instead store the length of each node and dynamically calculate offsets (spans). Therefore, when modifying the left-side node (such as nodes are inserted or deleted), it causes all right-side nodes' spans to change. This, in turn, leads to PathTransform being unable to find nodes with the same paths (due to different spans), resulting in errors.
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.

4 participants