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

Improve help popup #75976

Merged
merged 2 commits into from
Aug 27, 2020
Merged

Improve help popup #75976

merged 2 commits into from
Aug 27, 2020

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Aug 27, 2020

Fixes #75623.

The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot.

r? @jyn514

@rust-highfive
Copy link
Contributor

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 27, 2020
@GuillaumeGomez GuillaumeGomez changed the title Help popup Improve help popup Aug 27, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second commit I'm not comfortable approving ... I don't see anything wrong but I don't think the frontend is tested very well and it doesn't look obviously correct. Have you tested it locally?

I guess my concern is that there's a risk we break the help popup for not much gain.

@GuillaumeGomez
Copy link
Member Author

Have you tested it locally?

Yes I did. :) You can check easily this js code if you want:

function foo() {
    console.log("foo!");
    foo = function() {};
}
foo(); // will display "foo!"
foo(); // will display nothing

The dark magic from JS. :3

@GuillaumeGomez
Copy link
Member Author

Updated!

@jyn514
Copy link
Member

jyn514 commented Aug 27, 2020

Can you add a comment [above buildHelperPopup] that it has to be called every time before you use it? Before it was in the global namespace and you could assume it was there. Although maybe a comment would just be to say 'go through getHelpElement instead'.

r=me after that.

@jyn514
Copy link
Member

jyn514 commented Aug 27, 2020

Can you add a comment [above buildHelperPopup] that it has to be called every time before you use it? Before it was in the global namespace and you could assume it was there. Although maybe a comment would just be to say 'go through getHelpElement instead'.

We discussed this on discord - all the code is (or should be) using getHelpElement anyway, so nothing has changed from that perspective.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 27, 2020

📌 Commit 86e42c2 has been approved by jyn514

@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 Aug 27, 2020
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 27, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 27, 2020
Improve help popup

Fixes rust-lang#75623.

The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot.

r? @jyn514
@bors
Copy link
Collaborator

bors commented Aug 27, 2020

⌛ Testing commit 86e42c2 with merge 26160d4083c97f5a75a25f04f1d9ba6c7952aa1e...

@Dylan-DPC-zz
Copy link

@bors retry yield

(this was included in a rollup that i forgot to start after creating it :P )

@bors
Copy link
Collaborator

bors commented Aug 27, 2020

⌛ Testing commit 86e42c2 with merge 397b390...

@bors bors mentioned this pull request Aug 27, 2020
@bors
Copy link
Collaborator

bors commented Aug 27, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: jyn514
Pushing 397b390 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 27, 2020
@bors bors merged commit 397b390 into rust-lang:master Aug 27, 2020
@GuillaumeGomez GuillaumeGomez deleted the help-popup branch August 28, 2020 07:48
@cuviper cuviper added this to the 1.48.0 milestone Nov 17, 2023
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: confusing use of "type"
6 participants