You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "arunkumar0398 (via GitHub)" <gi...@apache.org> on 2026/04/11 04:28:48 UTC
[PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
arunkumar0398 opened a new pull request, #39289:
URL: https://github.com/apache/superset/pull/39289
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
In SQL Lab, the share/copy-link icon displayed two overlapping tooltips simultaneously: "Copy query link to your clipboard" (from the Button component's tooltip prop) and "Copy to clipboard" (the default tooltip rendered by CopyToClipboard's internal <Tooltip> wrapper). This caused overlapping tooltip text for international users with translated strings.
Fix passes `hideTooltip` to the CopyToClipboard usage in `ShareSqlLabQuery`, suppressing the redundant wrapper tooltip. The `hideTooltip` prop already existed in CopyToClipboard.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
1. Start Superset locally
2. Navigate to SQL Lab
3. Hover over the link/share icon in the query editor toolbar
4. Verify only one tooltip appears: "Copy query link to your clipboard"
5. Verify clicking the icon still copies the permalink to clipboard and shows the success toast
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue: #39272
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #39289:
URL: https://github.com/apache/superset/pull/39289#issuecomment-4281925565
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/39289?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.49%. Comparing base ([`fbd0621`](https://app.codecov.io/gh/apache/superset/commit/fbd062165e2362fb6e6c5d1926c82cd78c12b003?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7baa275`](https://app.codecov.io/gh/apache/superset/commit/7baa275bcf54c6d3f5d38c2924b50b3f58a6f74a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #39289 +/- ##
=======================================
Coverage 64.49% 64.49%
=======================================
Files 2557 2557
Lines 133191 133191
Branches 30935 30935
=======================================
Hits 85897 85897
Misses 45804 45804
Partials 1490 1490
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/39289/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/39289/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.32% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/39289?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber merged PR #39289:
URL: https://github.com/apache/superset/pull/39289
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #39289:
URL: https://github.com/apache/superset/pull/39289#issuecomment-4281934119
LGTM. Thanks for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39289:
URL: https://github.com/apache/superset/pull/39289#issuecomment-4229115685
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on code in PR #39289:
URL: https://github.com/apache/superset/pull/39289#discussion_r3106384636
##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -124,6 +124,22 @@ describe('ShareSqlLabQuery', () => {
).toEqual(expected);
});
+ test('does not show duplicate "Copy to clipboard" tooltip on hover', async () => {
+ await act(async () => {
+ render(<ShareSqlLabQuery {...defaultProps} />, {
+ useRedux: true,
+ store,
+ });
+ });
+ const button = screen.getByRole('button');
+ await userEvent.hover(button);
+ await waitFor(() => {
+ // CopyToClipboard default tooltip must NOT appear —
+ // only the Button-level "Copy query link to your clipboard" should show.
+ expect(screen.queryByText('Copy to clipboard')).not.toBeInTheDocument();
+ });
Review Comment:
@arunkumar0398 your current test passes even without `hideTooltip` attribute.
Suggest to use this one instead
```suggestion
expect(
await screen.findByText('Copy query link to your clipboard'),
).toBeInTheDocument();
await waitFor(() => {
// CopyToClipboard default tooltip must NOT appear —
// only the Button-level "Copy query link to your clipboard" should show.
expect(screen.queryByText('Copy to clipboard')).not.toBeInTheDocument();
});
```
##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -124,6 +124,25 @@ describe('ShareSqlLabQuery', () => {
).toEqual(expected);
});
+ test('does not show duplicate "Copy to clipboard" tooltip on hover', async () => {
+ await act(async () => {
+ render(<ShareSqlLabQuery {...defaultProps} />, {
+ useRedux: true,
+ store,
+ });
+ });
+ const button = screen.getByRole('button');
+ await userEvent.hover(button);
Review Comment:
This is synchronous.
```suggestion
userEvent.hover(button);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39289:
URL: https://github.com/apache/superset/pull/39289#issuecomment-4276851950
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39289:
URL: https://github.com/apache/superset/pull/39289#issuecomment-4228179800
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(sqllab): remove duplicate tooltip on share query link icon [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #39289:
URL: https://github.com/apache/superset/pull/39289#discussion_r3067600860
##########
superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx:
##########
@@ -124,6 +124,22 @@ describe('ShareSqlLabQuery', () => {
).toEqual(expected);
});
+ test('does not show duplicate "Copy to clipboard" tooltip on hover', async () => {
+ await act(async () => {
+ render(<ShareSqlLabQuery {...defaultProps} />, {
+ useRedux: true,
+ store,
+ });
+ });
+ const button = screen.getByRole('button');
+ await userEvent.hover(button);
+ await waitFor(() => {
+ // CopyToClipboard default tooltip must NOT appear —
+ // only the Button-level "Copy query link to your clipboard" should show.
+ expect(screen.queryByText('Copy to clipboard')).not.toBeInTheDocument();
+ });
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Incomplete tooltip test</b></div>
<div id="fix">
The test checks only the absence of the duplicate 'Copy to clipboard' tooltip but fails to confirm the correct Button tooltip displays, risking undetected regressions if the Button's tooltip breaks.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
await waitFor(() => {
// CopyToClipboard default tooltip must NOT appear —
// only the Button-level "Copy query link to your clipboard" should show.
expect(screen.queryByText('Copy to clipboard')).not.toBeInTheDocument();
expect(screen.getByText('Copy query link to your clipboard')).toBeInTheDocument();
});
````
</div>
</details>
</div>
<small><i>Code Review Run #044dc6</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org