Skip to content

Fix tooltipped grouped buttons borders#9482

Merged
fregante merged 3 commits into
mainfrom
tooltipped
May 16, 2026
Merged

Fix tooltipped grouped buttons borders#9482
fregante merged 3 commits into
mainfrom
tooltipped

Conversation

@fregante

Copy link
Copy Markdown
Member

Fixes #9451 (comment)

Test URLs

Here and https://github.com/pyca/cryptography/releases

Screenshot

Screenshot 8
Before After
bad ok

@fregante fregante requested a review from SunsetTechuila May 16, 2026 07:19
@fregante fregante changed the title Top-level tool-tip Fix tooltipped grouped buttons borders May 16, 2026
@fregante fregante added the bug label May 16, 2026
Comment thread source/helpers/tooltip.tsx Outdated
import {upperCaseFirst} from '../github-helpers/index.js';

function getAjaxContainer(): Element | undefined {
return lastElementOptional('#js-repo-pjax-container, #js-pjax-container, #repo-content-turbo-frame, #repo-content-pjax-container');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In my first attempt I added the tool-tip to the closest known ajax container (which is cleared on navigation) however somehow the tooltips did not show up on hover 🤷‍♂️

}

element.after(createTooltipFor(element, content));
element.append(createTooltipFor(element, content));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Interestingly, it does show when placed inside. This is the resulting DOM

Image

@SunsetTechuila SunsetTechuila left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clever

@fregante fregante merged commit 6f53509 into main May 16, 2026
17 checks passed
@fregante

Copy link
Copy Markdown
Member Author

I told myself "make no mistakes"

@SunsetTechuila SunsetTechuila deleted the tooltipped branch May 16, 2026 12:49
kidonng added a commit that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants