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: Consolidating dropdown/NavDropdown user experience (removing React-bootstrap, using AntD) #14557

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

  • Migrates NavDropdown from Bootstrap to AntD.
  • Changes language selection from Menu to Select.

See: #10254

@rusackas @junlincc @pkdotson

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-05-10 at 3 43 33 PM

Screen Shot 2021-05-10 at 4 43 11 PM

TEST PLAN

1 - Enable multiple languages feature flag
2 - Check language picker at the top right corner

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@rusackas rusackas changed the title refactor: Bootstrap to AntD - NavDropdown chore: Consolidating dropdown/NavDropdown user experience (removing React-bootstrap, using AntD) May 10, 2021
@rusackas rusackas changed the title chore: Consolidating dropdown/NavDropdown user experience (removing React-bootstrap, using AntD) fix: Consolidating dropdown/NavDropdown user experience (removing React-bootstrap, using AntD) May 10, 2021
@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment creation failed. Please check the Actions logs for details.

@junlincc
Copy link
Member

thanks for the PR!
not related, but let's remove "-" between flag and language name in a separate PR. 🙏

@junlincc junlincc added the hold:testing! On hold for testing label May 10, 2021
Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM! Just need to fix those broken tests

superset-frontend/src/components/Menu/MenuRight.tsx Outdated Show resolved Hide resolved
@rusackas
Copy link
Member

@michael-s-molina please check up on the failing unit tests when you're able. Appreciate this PR though - so close to the end of the tunnel!

@michael-s-molina michael-s-molina force-pushed the bootstrap-to-antd-nav-dropdown branch 2 times, most recently from c3d7169 to c6a7d05 Compare May 12, 2021 14:54
@michael-s-molina
Copy link
Member Author

thanks for the PR!
not related, but let's remove "-" between flag and language name in a separate PR. 🙏

Done.

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #14557 (69286ee) into master (3f6bd1e) will increase coverage by 0.00%.
The diff coverage is 87.23%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #14557   +/-   ##
=======================================
  Coverage   77.38%   77.39%           
=======================================
  Files         959      958    -1     
  Lines       48465    48461    -4     
  Branches     5678     5676    -2     
=======================================
- Hits        37506    37504    -2     
+ Misses      10759    10757    -2     
  Partials      200      200           
Flag Coverage Δ
javascript 72.50% <87.23%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...et-frontend/src/components/EditableTitle/index.tsx 83.95% <ø> (ø)
...et-frontend/src/components/Menu/LanguagePicker.tsx 85.00% <82.35%> (+20.71%) ⬆️
...uperset-frontend/src/components/Menu/MenuRight.tsx 93.18% <88.88%> (+0.32%) ⬆️
superset-frontend/src/components/Menu/Menu.tsx 63.63% <100.00%> (ø)
...d/components/DashboardBuilder/DashboardBuilder.tsx 86.95% <100.00%> (ø)
...-frontend/src/visualizations/presets/MainPreset.js 0.00% <0.00%> (ø)
...plore/components/controls/OptionControls/index.tsx 90.52% <0.00%> (ø)
...controls/FilterControl/AdhocFilterOption/index.jsx 100.00% <0.00%> (ø)
...onents/controls/FilterControl/AdhocFilter/index.js 97.01% <0.00%> (+0.09%) ⬆️

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 3f6bd1e...69286ee. Read the comment docs.

@michael-s-molina
Copy link
Member Author

@michael-s-molina please check up on the failing unit tests when you're able. Appreciate this PR though - so close to the end of the tunnel!

Done.

@junlincc
Copy link
Member

/testenv up

@junlincc junlincc requested a review from rusackas May 13, 2021 01:14
@junlincc junlincc added need:review Requires a code review and removed hold:testing! On hold for testing labels May 13, 2021
@github-actions
Copy link
Contributor

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

@rusackas
Copy link
Member

Sorry to be a stickler, but wondering about two things, based just on the screenshot:

  1. Can the caret on the dropdown match the other menu items? We've been getting a lot of grief over this particular inconsistency
  2. Does it need to scroll like we see there? That's far less of a dealbreaker than (1)

@michael-s-molina
Copy link
Member Author

Sorry to be a stickler, but wondering about two things, based just on the screenshot:

  1. Can the caret on the dropdown match the other menu items? We've been getting a lot of grief over this particular inconsistency
  2. Does it need to scroll like we see there? That's far less of a dealbreaker than (1)

Both done.

Screen Shot 2021-05-13 at 3 24 34 PM

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

</NavDropdown>
listHeight={400}
dropdownAlign={{
offset: [-135, 0],
Copy link
Member

Choose a reason for hiding this comment

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

could also do some styling to reposition this, e.g.:

transform: translateX(-100%);

Copy link
Member Author

Choose a reason for hiding this comment

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

@rusackas I changed to make the component wrap big texts in multiple lines instead of using transform to avoid fat dropdowns 😉. Since the width is fixed, the offset is always correctly positioned. If you agree, you can remove the need:followup label.

@rusackas rusackas added the need:followup Requires followup label May 13, 2021
@rusackas
Copy link
Member

Let's get that CSS transform added in separate PR. I don't see it as blocking for now.

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.

Appreciate the width/offset change! LGTM!

@rusackas rusackas merged commit e4d2424 into apache:master May 13, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@michael-s-molina michael-s-molina added this to In progress in AntD Transition (SIP-48) via automation Jun 28, 2021
@michael-s-molina michael-s-molina moved this from In progress to Done in AntD Transition (SIP-48) Jun 28, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 need:followup Requires followup need:review Requires a code review size/L 🚢 1.3.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants