Skip to content

Update tooltips style to integrate better#9451

Merged
fregante merged 22 commits into
mainfrom
copilot/replace-aria-label-with-tooltip
May 14, 2026
Merged

Update tooltips style to integrate better#9451
fregante merged 22 commits into
mainfrom
copilot/replace-aria-label-with-tooltip

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

I am a tool

Comment thread source/features/close-as-unplanned.tsx Outdated
addToolTip({
label: 'Close as not planned.\nWon’t fix, can’t repro, duplicate, stale',
direction: 'nw',
}, unplannedButton);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's looking pretty good. I'll just have to verify that these all work

Comment thread source/features/jump-to-conversation-close-event.tsx
Comment thread source/features/one-click-diff-options.tsx Outdated
Comment thread source/features/open-all-notifications.tsx Outdated
Comment thread source/features/pr-commit-lines-changed.tsx Outdated
Comment thread source/features/unreleased-commits.tsx Outdated
Copilot AI requested a review from fregante May 13, 2026 16:43
Comment thread source/features/one-click-diff-options.tsx Outdated
Comment thread source/features/open-all-notifications.tsx
Comment thread source/features/open-all-notifications.tsx Outdated
Comment thread source/features/quick-review.tsx Outdated
Copilot AI changed the title Refactor tooltip usage to helper APIs Refactor tooltip usage to helper APIs and single-fragment tooltipped May 13, 2026
Copilot AI requested a review from fregante May 13, 2026 17:00
Comment thread eslint-rules/restricted-syntax.js
Comment thread source/features/default-branch-button.tsx Outdated
Comment thread source/features/quick-review.tsx Outdated
Copilot AI changed the title Refactor tooltip usage to helper APIs and single-fragment tooltipped Refactor tooltip usage to helper APIs, single-fragment tooltipped, and hotkey-tooltip linting May 13, 2026
Copilot AI requested a review from fregante May 13, 2026 17:18
Comment thread source/features/open-all-notifications.tsx Outdated
Comment thread source/features/open-all-notifications.tsx Outdated
Copilot AI requested a review from fregante May 13, 2026 17:29
@fregante fregante changed the title Refactor tooltip usage to helper APIs, single-fragment tooltipped, and hotkey-tooltip linting Update tooltips style May 13, 2026
@fregante fregante changed the title Update tooltips style Update tooltips style to integrate better May 13, 2026
@fregante fregante marked this pull request as ready for review May 13, 2026 17:40
Copy link
Copy Markdown
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Code looks good so far. Not completely tested.

I had to undo a couple of features because they were too messy.

These new helpers aren't necessarily better than what we had, they just look good when hotkeys are involved and when there are some overlap or ::before issues

Comment on lines +97 to +101
addToolTip({
label: 'Open unread notifications',
shortcut: 'g u',
direction: 'sw',
}, button);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😍

Before After
Image Image

@SunsetTechuila
Copy link
Copy Markdown
Member

SunsetTechuila commented May 13, 2026

We also should remove now redundant overflow: visible rules like this one: https://github.com/refined-github/refined-github/blob/ed3769c89128b6e4119fafd29b729d8d744c1c55/source/features/jump-to-conversation-close-event.css

Copy link
Copy Markdown
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

oof, it had been a while since I had to verify this many features at once. The PR works, even if there are a lot of bugs I found along the way. Some tooltips should probably be repositioned, they don't look great.

direction=s is best. I think tool-tip avoids causing viewport overflows, clippings, and z-index flights, so most of the reasons why we chose alternative positioning should be reviewed.

@@ -10,6 +10,7 @@ import api from '../github-helpers/api.js';
import {expectToken} from '../github-helpers/github-token.js';
Copy link
Copy Markdown
Member

@fregante fregante May 14, 2026

Choose a reason for hiding this comment

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

@@ -15,6 +15,7 @@ import {fixFileHeaderOverlap, isRepoCommitListRoot} from '../github-helpers/inde
import isDefaultBranch from '../github-helpers/is-default-branch.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -11,6 +11,7 @@ import {expectToken} from '../github-helpers/github-token.js';
import {cacheByRepo} from '../github-helpers/index.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -10,6 +10,7 @@ import {$, $$, $$optional, $closest, $optional} from 'select-dom';
import features from '../feature-manager.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -8,6 +8,7 @@ import {conversationCloseEvent} from '../github-helpers/selectors.js';
import {wrap} from '../helpers/dom-utils.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -13,6 +13,7 @@ import {legacyCommentField} from '../github-helpers/selectors.js';
import {is} from '../helpers/css-selectors.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -10,6 +10,7 @@ import {$, $closest, $optional} from 'select-dom';
import features from '../feature-manager.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Buttons also shift on hover:

chrome_gReriLfl94

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can either:

  • Revert this change
  • Use newer "ButtonGroup" (more LOC)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indeed, I saw the same issue in the screenshot above:

Image

I think tool-tip does not need to live in the same component, so I wonder if we should just place it a couple of layers up and avoid issues.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll try a couple of things

@@ -1 +1 @@
import './tag-changes-link.css';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -5,6 +5,7 @@ import {lastElementOptional} from 'select-dom';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@@ -1 +1 @@
import * as pageDetect from 'github-url-detection';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@fregante
Copy link
Copy Markdown
Member

We also should remove now redundant overflow: visible rules like this one: ed3769c/source/features/jump-to-conversation-close-event.css

👌 Done and verified:

Screenshot 16 Screenshot

@fregante fregante enabled auto-merge (squash) May 14, 2026 12:07
@fregante fregante merged commit 2abb5bd into main May 14, 2026
9 checks passed
@fregante fregante deleted the copilot/replace-aria-label-with-tooltip branch May 14, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants