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

fix(sqllab): Removed the tooltip from CopyToClipboard button in sqllab #18749

Merged

Conversation

prosdev0107
Copy link
Contributor

@prosdev0107 prosdev0107 commented Feb 15, 2022

SUMMARY

Removed the tooltip from CopyToClipboard button in sqllab

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image
After:
image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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.getDecoratedCopyNode()}
</Tooltip>
this.getDecoratedCopyNode()
Copy link
Member

Choose a reason for hiding this comment

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

It was a generic component and it was used in other components. You shouldn't remove the tooltip.

image

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, the solution should be prop-based. Either

  • render the tooltip conditionally (if it was passed a meaningful title)
  • provide a prop or other means (e.g. title={false}) to intentionally hide the tooltip

@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 16, 2022
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

I think this solves the issue in a much more simple/estensible way.

Two non-blocking things worth consideration:

  • Minor, but: since the norm is that the tooltip is visible, should the (optional) prop be hideTooltip with a default of false? Just a philosophy question, it works either way.
  • The two blocks of JSX in renderNotWrapped and renderLink are nearly identical. Should we DRY that up while we're at it here?

@rusackas
Copy link
Member

Oh, it would also be nice if the new prop is reflected/togglable in the Storybook entry.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Sorry to keep asking for things, but... can we add an RTL (React Testing Library) test here to make sure it stays working with and without the prop?

@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #18749 (babd0e1) into master (5bb406b) will decrease coverage by 0.00%.
The diff coverage is 87.93%.

❗ Current head babd0e1 differs from pull request most recent head 04c1c35. Consider uploading reports for the commit 04c1c35 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18749      +/-   ##
==========================================
- Coverage   66.32%   66.32%   -0.01%     
==========================================
  Files        1620     1620              
  Lines       63060    63089      +29     
  Branches     6368     6373       +5     
==========================================
+ Hits        41823    41842      +19     
- Misses      19579    19590      +11     
+ Partials     1658     1657       -1     
Flag Coverage Δ
javascript 51.26% <84.09%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s/legacy-plugin-chart-country-map/src/countries.ts 100.00% <ø> (ø)
...frontend/src/SqlLab/components/ResultSet/index.tsx 50.73% <ø> (ø)
superset-frontend/src/components/Button/index.tsx 100.00% <ø> (ø)
...board/components/nativeFilters/FilterBar/index.tsx 69.82% <ø> (ø)
...d/src/explore/components/PropertiesModal/index.tsx 70.00% <ø> (+1.66%) ⬆️
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...frontend/src/views/CRUD/alert/AlertReportModal.tsx 52.23% <0.00%> (ø)
superset/initialization/__init__.py 90.65% <ø> (+0.45%) ⬆️
superset/reports/api.py 89.84% <ø> (ø)
...ontend/src/explore/components/QueryAndSaveBtns.tsx 50.00% <80.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb406b...04c1c35. Read the comment docs.

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://52.24.232.107:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@rusackas rusackas merged commit 91236a5 into apache:master Feb 18, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants