rustdoc: fixes #64305: disable search field instead of hidding it#66298
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 20, 2019
Merged
rustdoc: fixes #64305: disable search field instead of hidding it#66298bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
GuillaumeGomez
requested changes
Nov 11, 2019
a67c3bd to
09cfb78
Compare
src/librustdoc/html/static/main.js
Outdated
Member
There was a problem hiding this comment.
Can you please move this block in the function addSearchOptions? I just realized that there is no point into enabling the search bar if the content wasn't loaded yet.
src/librustdoc/html/static/main.js
Outdated
Member
There was a problem hiding this comment.
Also: no need anymore for onEachLazy: just grab the output of getSearchOutput and use it:
var e = getSearchInput();
if (e) {
e.removeAttribute('disabled');
}09cfb78 to
0ee15e5
Compare
src/librustdoc/html/static/main.js
Outdated
Member
There was a problem hiding this comment.
At this stage, I think you can used the search_input variable created at line 83. Otherwise, seems all good to me, thanks a lot!
0ee15e5 to
2e131ff
Compare
2e131ff to
221bcfb
Compare
src/librustdoc/html/static/main.js
Outdated
221bcfb to
8d4d8f3
Compare
…ng it Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
8d4d8f3 to
5721338
Compare
GuillaumeGomez
approved these changes
Nov 20, 2019
Member
|
Thanks! I confirm that it works locally. I added a commit to change the background color if the search input is disabled. @bors: r+ rollup |
Collaborator
|
📌 Commit 5721338 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Nov 20, 2019
…laumeGomez rustdoc: fixes rust-lang#64305: disable search field instead of hidding it The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all. @GuillaumeGomez Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
bors
added a commit
that referenced
this pull request
Nov 20, 2019
Rollup of 7 pull requests Successful merges: - #66060 (Making ICEs and test them in incremental) - #66298 (rustdoc: fixes #64305: disable search field instead of hidding it) - #66457 (Just derive Hashstable in librustc) - #66496 (rustc_metadata: Privatize more things) - #66514 (Fix selected crate search filter) - #66535 (Avoid ICE when `break`ing to an unreachable label) - #66573 (Ignore run-make reproducible-build-2 on Mac) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.
@GuillaumeGomez
Signed-off-by: Maxime “pep” Buquet pep@bouah.net