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

refactor: Replace react-bootstrap MenuItems with Antd Menu #11487

Merged
merged 9 commits into from
Nov 4, 2020

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Oct 29, 2020

SUMMARY

This PR is first of the series - the goal is to get rid of all react-bootstrap's MenuItem usages. In this PR I refactored CopyToClipboard, LanguagePicker, HeaderActionsDropdown and DateFilterControl. In the case of DateFilterControl, I also fixed styling bug (as on the screenshot below) and replaced Input component for UI consistency.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

DateFilterControl - before:
image
DateFilterControl - after:
image

HeaderActionsDropdown - before:
image
HeaderActionsDropdown - after:
image

TEST PLAN

ADDITIONAL INFORMATION

@kgabryje
Copy link
Member Author

@rusackas @etr2460 Can you take a look?
I just noticed that I forgot about uppercasing in DateFilterControl... but do we actually want it? In my opinion it looks a bit nicer now (see the first and second screenshot).

@codecov-io
Copy link

codecov-io commented Oct 29, 2020

Codecov Report

Merging #11487 into master will decrease coverage by 4.28%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11487      +/-   ##
==========================================
- Coverage   66.58%   62.29%   -4.29%     
==========================================
  Files         873      873              
  Lines       41767    41885     +118     
  Branches     3827     3856      +29     
==========================================
- Hits        27809    26094    -1715     
- Misses      13856    15611    +1755     
- Partials      102      180      +78     
Flag Coverage Δ
cypress ?
javascript 62.55% <50.00%> (-0.10%) ⬇️
python 62.14% <ø> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...et-frontend/src/dashboard/components/CssEditor.jsx 70.83% <ø> (ø)
.../src/dashboard/components/RefreshIntervalModal.jsx 90.00% <ø> (ø)
...et-frontend/src/dashboard/components/SaveModal.jsx 40.90% <ø> (-27.28%) ⬇️
.../explore/components/controls/DateFilterControl.jsx 53.89% <33.33%> (-12.18%) ⬇️
...src/dashboard/components/HeaderActionsDropdown.jsx 52.30% <43.75%> (-16.59%) ⬇️
...et-frontend/src/components/Menu/LanguagePicker.tsx 80.00% <60.00%> (-20.00%) ⬇️
superset-frontend/src/common/components/index.tsx 100.00% <100.00%> (ø)
...perset-frontend/src/components/CopyToClipboard.jsx 35.93% <100.00%> (-0.43%) ⬇️
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
... and 207 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 5d9448f...d1513fc. Read the comment docs.

@rusackas
Copy link
Member

Just a note that #11491 may affect this, or vice versa.

@kgabryje
Copy link
Member Author

kgabryje commented Nov 2, 2020

@rusackas I rebased it to use changes from #11491

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.

One remaining nit here about the 30px value we discussed on another PR, but in general this LGTM. Approving, but not yet merging in case you'd like to tackle that tweak here, or rebase if the other PR comes in first.

@rusackas rusackas merged commit ad98981 into apache:master Nov 4, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
)

* Remove MenuItem from CopyToClipboard

* Refactor DateFilterControl

* fixup! Remove MenuItem from CopyToClipboard

* Remove console log

* Refactor LanguagePicker

* Refactor HeaderActionsDropdown

* Remove dir with Menu component

* Add imports to common/components/index

* Fix after rebase
@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.

4 participants