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: Issues with filters and metrics popovers #11578

Merged
merged 4 commits into from
Nov 6, 2020

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Nov 5, 2020

SUMMARY

Fixes issues described in #11546.
There was also another bug - select menu wasn't fully visible when it overflew the popover (which is almost always) - see the first gif.
The filters popover was jumpy and it was related to handleMultiComparatorInputHeightChange function in AdhocFilterEditPopoverSimpleTabContent.jsx file. I removed it, however if it was actually necessary for something I'd appreciate a feedback (@ktmud the last changes to that function was done by you - can you take a look?).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
before-fix

After:
after-fix

TEST PLAN

ADDITIONAL INFORMATION

@kgabryje
Copy link
Member Author

kgabryje commented Nov 5, 2020

CC @junlincc @rusackas

@codecov-io
Copy link

codecov-io commented Nov 5, 2020

Codecov Report

Merging #11578 into master will decrease coverage by 4.63%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11578      +/-   ##
==========================================
- Coverage   59.59%   54.96%   -4.64%     
==========================================
  Files         832      412     -420     
  Lines       40482    14281   -26201     
  Branches     3666     3662       -4     
==========================================
- Hits        24126     7849   -16277     
+ Misses      16187     6263    -9924     
  Partials      169      169              
Flag Coverage Δ
cypress 54.96% <100.00%> (-0.06%) ⬇️
python ?

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

Impacted Files Coverage Δ
...components/AdhocFilterEditPopoverSqlTabContent.jsx 92.85% <ø> (ø)
.../src/explore/components/controls/SelectControl.jsx 87.77% <ø> (-1.12%) ⬇️
.../src/explore/components/AdhocFilterEditPopover.jsx 76.00% <100.00%> (-2.73%) ⬇️
...ponents/AdhocFilterEditPopoverSimpleTabContent.jsx 60.90% <100.00%> (-4.42%) ⬇️
.../src/explore/components/AdhocMetricEditPopover.jsx 58.44% <100.00%> (+2.27%) ⬆️
...set-frontend/src/dashboard/util/getDropPosition.js 77.77% <0.00%> (-1.59%) ⬇️
superset/migrations/versions/c9495751e314_.py
superset/examples/flights.py
... and 418 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 52145f8...9bd9998. Read the comment docs.

@rusackas
Copy link
Member

rusackas commented Nov 6, 2020

Fixes #11546

@@ -50,7 +50,11 @@ const defaultProps = {
columns: [],
};

const startingWidth = 300;
const ResizeIcon = styled.i`
Copy link
Member

Choose a reason for hiding this comment

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

I see this is happening a couple times in this PR, but I can't think of an easy way to DRY this up that would be worth doing if we come through and start replacing all the font-awesome icons in another pass anyway. Only mentioning it in case you have an idea of how to simply consolidate the two ResizeIcon instances... but it's probably not worth worrying about. So now I'm just rambling...

Copy link
Member Author

Choose a reason for hiding this comment

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

I felt bad when repeating that code, but I couldn't see an easy way not to 🙁 In general, I think it might be worth it to refactor Metric and Filter popovers, because they are rather similar, with only tabs content differing.

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.

Made a rambling note, but I think this LGTM :)

@rusackas rusackas merged commit 6d5d92a into apache:master Nov 6, 2020
@junlincc
Copy link
Member

junlincc commented Nov 6, 2020

created new issue.. #11598

Copy link

@Kamh1234566 Kamh1234566 left a comment

Choose a reason for hiding this comment

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

Thank

@junlincc junlincc added the rush! Requires immediate attention label Nov 10, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
* Fix bugs in AdhocFilterEditPopover

* Fix bugs in AdhocMetricEditPopover

* Remove handleMultiComparatorInputHeightChange function

* Fix tests
@junlincc junlincc removed the rush! Requires immediate attention label Mar 18, 2021
@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