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

style: database modal updates #11311

Merged
merged 3 commits into from
Nov 4, 2020
Merged

Conversation

riahk
Copy link
Contributor

@riahk riahk commented Oct 16, 2020

SUMMARY

  • Add syntax highlighting to Secure Extra and Extra fields
  • Create new InfoTooltip component that uses ant-d Tooltip
  • Add storybook for InfoTooltip

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2020-10-16 at 3 16 40 PM

Screen Shot 2020-10-16 at 3 17 07 PM

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Oct 16, 2020

Codecov Report

Merging #11311 into master will decrease coverage by 4.34%.
The diff coverage is 38.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11311      +/-   ##
==========================================
- Coverage   65.78%   61.43%   -4.35%     
==========================================
  Files         839      841       +2     
  Lines       39828    39858      +30     
  Branches     3652     3659       +7     
==========================================
- Hits        26200    24487    -1713     
- Misses      13528    15190    +1662     
- Partials      100      181      +81     
Flag Coverage Δ
#cypress ?
#javascript 62.60% <38.23%> (-0.06%) ⬇️
#python 60.73% <ø> (-0.17%) ⬇️

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

Impacted Files Coverage Δ
...-frontend/src/common/components/common.stories.tsx 0.00% <0.00%> (ø)
...end/src/views/CRUD/data/database/DatabaseModal.tsx 57.93% <30.76%> (-13.50%) ⬇️
...set-frontend/src/common/components/InfoTooltip.tsx 53.84% <53.84%> (ø)
...uperset-frontend/src/common/components/Tooltip.tsx 100.00% <100.00%> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/setup/setupColors.js 0.00% <0.00%> (-100.00%) ⬇️
... and 178 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 3a0fcda...4911e68. Read the comment docs.

@riahk riahk force-pushed the moriah/db-modal-tweaks branch from 28750e4 to 4911e68 Compare October 20, 2020 23:28
Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

className?: string;
tooltip: string;
placement?:
| 'bottom'
Copy link
Member

Choose a reason for hiding this comment

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

I was looking before for a way to import type specifications from antd but couldn't find an easy way. It sucks to have to redefine/align the type defs on our side as these could get out of sync as we upgrade antd. Would it make more sense to import this? https://github.com/ant-design/ant-design/blob/master/components/tooltip/index.tsx#L14

import { InfoTooltipProps } from 'antd/components/tooltip/';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to import TooltipPlacement but got an error about it not being exported, so I don't think it's exposed. :/

Copy link
Member

Choose a reason for hiding this comment

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

Mmmh. We may need to start growing a antdCommonTypes / antdTypeHelpers somewhere for this use case. It's likely that we'll want to reuse these!

Copy link
Member

Choose a reason for hiding this comment

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

@rusackas , any thoughts?

*/
import { Tooltip } from 'src/common/components';

export default Tooltip;
Copy link
Member

Choose a reason for hiding this comment

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

What's the thought-process around this wrapper component? I saw that we have similar ones that wrap antd but with our styles applied on top. Should the styled tooltip css above be in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to leave it open in case we wanted to add custom styles at a later time. It might make sense to take the custom styles in InfoTooltip and just apply them to the general Tooltip component here though!

@nytai
Copy link
Member

nytai commented Oct 27, 2020

Let's get this file rebased and merged. We can continue discussion around best approach for handling antd types/styling separately.

@riahk riahk force-pushed the moriah/db-modal-tweaks branch from 4911e68 to 60e4a54 Compare November 3, 2020 19:51
@nytai nytai merged commit 6981017 into apache:master Nov 4, 2020
@nytai nytai deleted the moriah/db-modal-tweaks branch November 4, 2020 19:03
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants