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

rustdoc: merge doctest tooltip with notable traits tooltip #107340

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Jan 26, 2023

@rustbot rustbot added 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. labels Jan 26, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2023

A change occurred in the Ayu theme.

cc @Cldfire

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-log-analyzer

This comment has been minimized.

@notriddle notriddle force-pushed the notriddle/simplify-doctest-tooltip branch from afad8a3 to fe696a4 Compare January 26, 2023 23:57
@@ -1093,44 +1093,8 @@ pre.rust .doccomment {
display: block;
left: -25px;
top: 5px;
}

.example-wrap .tooltip:hover::after {
Copy link
Member

Choose a reason for hiding this comment

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

It seems like a regression to me to have it positioned using JS now.

Copy link
Contributor Author

@notriddle notriddle Jan 27, 2023

Choose a reason for hiding this comment

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

It still works without JavaScript.

If JS is disabled, the title attribute causes your browser’s built-in tooltip to appear. It’s only actually needed for click handling, which the old setup couldn’t do at all.

Copy link
Member

Choose a reason for hiding this comment

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

Without JS it gives:

image

Which seems completely fine to me?

Copy link
Member

Choose a reason for hiding this comment

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

Also: do we want to keep the text around? It makes sense for notable tooltips but what about these tooltips?

Copy link
Contributor Author

@notriddle notriddle Jan 27, 2023

Choose a reason for hiding this comment

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

Yeah,

The only reason the JS needs to exist at all is because Mobile Safari provides no way to see the title tooltip, and Mobile Chrome didn’t used to even provide a way to see the CSS tooltip (it was completely inaccessible on there, AFAIK).

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see. I forgot about mobile once again... Then can you add GUI test to confirm that the click maintain the tooltip display and then hide the tooltip please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, never mind about Mobile Chrome. Now that I test it again, it actually does allow getting at the :hover tooltip. It doesn't provide any reasonable way to see the title= attribute, though.

)
click: ".docblock .example-wrap.ignore .tooltip"
assert-false: ".popover.tooltip"
Copy link
Contributor Author

@notriddle notriddle Jan 27, 2023

Choose a reason for hiding this comment

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

What do I need to add to the test to finish it? @GuillaumeGomez

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I missed this check. Let's just keep the font and background colors checks and ten it'll be all good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I pushed a change that adds back the background, text color, and border color checks.

@notriddle notriddle force-pushed the notriddle/simplify-doctest-tooltip branch from fe696a4 to 7aa4a20 Compare January 27, 2023 16:04
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 13, 2023

📌 Commit 7aa4a20 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Feb 13, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#107340 (rustdoc: merge doctest tooltip with notable traits tooltip)
 - rust-lang#107838 (Introduce `-Zterminal-urls` to use OSC8 for error codes)
 - rust-lang#107922 (Print disk usage in PGO CI script)
 - rust-lang#107931 (Intern span when length is MAX_LEN with parent.)
 - rust-lang#107935 (rustc_ast: Merge impls and reorder methods for attributes and meta items)
 - rust-lang#107986 (layout: deal with placeholders, ICE on bound types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3054759 into rust-lang:master Feb 13, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 13, 2023
@notriddle notriddle deleted the notriddle/simplify-doctest-tooltip branch February 13, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Harmonize hover interactions
5 participants