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(react-select): FilterBox focus event and adhoc filter popup height #9933

Merged
merged 3 commits into from
May 27, 2020

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented May 27, 2020

SUMMARY

This fixes two bugs related to recent migration of react-select.

  1. Focusing on FilterBox select should open the filter indicators:
    image

  2. Select a lot of filter values in AdhocFilter editor should expand filter popup height.

    image

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

See above.

TEST PLAN

Added a Cypress test case for the first bug.

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-commenter
Copy link

codecov-commenter commented May 27, 2020

Codecov Report

Merging #9933 into master will increase coverage by 0.01%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9933      +/-   ##
==========================================
+ Coverage   71.30%   71.31%   +0.01%     
==========================================
  Files         585      585              
  Lines       30872    30870       -2     
  Branches     3239     3236       -3     
==========================================
+ Hits        22012    22015       +3     
+ Misses       8751     8745       -6     
- Partials      109      110       +1     
Flag Coverage Δ
#cypress 53.92% <73.33%> (+0.08%) ⬆️
#javascript 59.41% <6.66%> (-0.01%) ⬇️
#python 71.51% <ø> (ø)
Impacted Files Coverage Δ
...rontend/src/visualizations/FilterBox/FilterBox.jsx 72.50% <71.42%> (+1.66%) ⬆️
...ponents/AdhocFilterEditPopoverSimpleTabContent.jsx 86.29% <100.00%> (-0.22%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 66.15% <0.00%> (-0.66%) ⬇️
...set-frontend/src/dashboard/util/getDropPosition.js 92.06% <0.00%> (ø)
...t-frontend/src/dashboard/actions/dashboardState.js 59.33% <0.00%> (+1.33%) ⬆️
.../src/dashboard/components/gridComponents/Chart.jsx 89.88% <0.00%> (+2.24%) ⬆️
.../src/explore/components/AdhocFilterEditPopover.jsx 78.72% <0.00%> (+4.25%) ⬆️

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 5ff6104...9d7983d. Read the comment docs.

expect($node).to.have.length(9);
});

cy.get('.chart-header').first().click({ force: true });
Copy link
Member Author

Choose a reason for hiding this comment

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

This is for triggering blur on the filter select.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

a couple comments, otherwise looks good

// should open the filter indicator
cy.get('.filter-indicator.active')
.should('be.visible')
.should($node => {
Copy link
Member

Choose a reason for hiding this comment

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

why prefix node with a dollar sign? Can we get rid of that in the variable name?

Copy link
Member Author

Choose a reason for hiding this comment

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

Was just following Cypress's official doc, but I agree it's probably not necessary.

// should hide the filter indicator
cy.get('.filter-indicator')
.not('.active')
.should($node => {
Copy link
Member

Choose a reason for hiding this comment

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

same comment about the dollar sign here

@etr2460 etr2460 merged commit 359ea88 into apache:master May 27, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
apache#9933)

* fix(react-select): FilterBox focus event and adhoc filter popup height

* Fix flacky cypress test

* Use focus instead of click
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.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/M 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants