-
Notifications
You must be signed in to change notification settings - Fork 14k
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(explore): Enhance Dataset and Control panel Collapse components #12218
Conversation
thanks @geido for the PR. if the caret was the only thing that changed, it LGTM. but im not sure why the tabs in the control panel got messed up a bit... |
Thanks @junlincc. Let me check what might have caused that. |
@junlincc Please check now. The issue should be resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ktmud. Thanks for your feedback. We are working on moving the Collapse components to Antd in small steps. This is the reason why you see inconsistencies between the two. We should use Antdesign as a reference though. Concerning the fonts, react-bootstrap was having a 16px overriding the default 14px. This should be an improvement. Unless you think keeping the 16px imposed by react-bootstrap was intentional. As for the direction of the arrows, those are by default in Antd. While I agree with you that the directions used by the previous Collapse are more intuitive, this is a change that will have an impact on all the Collapse components already moved to Antd. I would keep it as an item for later. |
Codecov Report
@@ Coverage Diff @@
## master #12218 +/- ##
==========================================
- Coverage 66.83% 63.39% -3.45%
==========================================
Files 1022 488 -534
Lines 49992 30102 -19890
Branches 4892 0 -4892
==========================================
- Hits 33411 19082 -14329
+ Misses 16456 11020 -5436
+ Partials 125 0 -125
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Cool. Glad to hear this is an ongoing migration. Just documenting what I found here in case they slip through. |
After another look, I have noticed that the DatasourcePanel is using the Antd Collapse already, just not the enhanced one that we have introduced in the common components, but another flavor of it. This will need to be consolidated. Most probably all the existing instances of the Antd Collapse that aren't using the enhanced one will need to be moved to the enhanced. Thoughts @rusackas? |
After much discussion with the Preset design team (other voices can pitch in here!) we think we'd like to keep the current arrow directions. As far as arrow direction goes, the design proposal is this: If the collapse arrow is on the right side of the content area (like controls), it will point up when open or down when closed.. If it's on the left side of a header (like the Data pane) it will point right when closed, and down when open. The above is more or less in accordance with the Apple guidelines. We should utilize a prop in the Collapse component to pick which version we're using... it appears the There's also a discrepancy in animation - we agreed that they should all be animated (and quickly!) with clockwise rotation when opening, and counterclockwise when closing. And in coming to all these conclusions, we came up with a whole system of floating design proposals as Github Issues, then moving them to the Github wiki when consensus is reached. We'll be sending a proposal around this to the |
While we are here, can we also fix the click area? Currently the Dateset panel accordions can click to fold/expand on the whole header section, but the Controls panel accordions only have the text and the caret clickable. |
Personally I'm also not a fan of caret animation (and even the slide up/slide down animation maybe we can also get rid of). Airbnb design guidelines for internal tools is avoid animations. We don't even have animation for modals and popovers. For tools people will use everyday, (the presumed) efficiency and speed are probably more important than the "pleasant surprises" animations are normally designed to inspire. |
@ktmud this PR will bring that for free as the Antdesign Collapse has the full header area clickable |
@rusackas @ktmud I have made some adjustments so that the Dataset panel and Control panels use the same styling. As for the open points, concerning animation and direction of the arrows, let's come to a consensus so that I can close this up. I tend to agree to avoid animations. As for the direction of the arrows, I am fine with what Evan has proposed. |
I have made more changes as follows:
This is quite a big change. I will appreciate support with testing eventual edge cases. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Hope we can have a Collapse.test.tsx
file but that's a low priority.
I see that when I click on second collapse then field with Nagranie.z.ekranu.2021-01-25.o.20.03.12.mov |
Hello @adam-stasiak I am seeing the same problem on master. Would you like to create a separate issue for that? https://www.awesomescreenshot.com/video/2508610?key=292778fadfc41d2f0f20f3099117aea6 Thanks |
ah ok! I will create! sorry for inconvenience. |
after manual testing looks fine to me 🟢 |
* master: (52 commits) docs: Updates to Superset Site for 1.0 (apache#12626) test(native-filters): scoping tree in native filters modal (apache#12655) Fix tests errors and warnings - iteration 3 (apache#12212) (apache#12219) Fix tests errors and warnings - iteration 5 (apache#12212) (apache#12224) Fix tests errors and warnings - iteration 6 (apache#12212) (apache#12227) feat(native-filters): apply scoping of native filters to dashboard (apache#12716) Fix tests errors and warnings - iteration 4 (apache#12212) (apache#12223) Fix tests errors and warnings - iteration 7 (apache#12212) (apache#12245) fix: missing select menu background (apache#12759) fix(explore): incorrect missing datasource condition (apache#12758) feat: default timepicker to last week when dataset is changed (apache#12609) feat(explore): allow opening charts with missing dataset (apache#12705) chore: upgrade Cypress to 6.2.1 (apache#12605) refactor(explore): Enhance Dataset and Control panel Collapse components (apache#12218) feat: Adding option to set_database_uri CLI command (apache#12740) docs: Fixed typo on line 348 (apache#12739) Fix tests errors and warnings - iteration 2 (apache#12212) (apache#12214) docs: Remove gatsby-plugin-offline (apache#12693) test: oracle engine spec (apache#12615) test: hive db engine spec (apache#12520) ...
SUMMARY
Removes react-bootstrap Collapse with Antdesign enhanced Collapse.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Collapse_BBEFORE.mp4
After:
Collapse_AFTER.mp4
TEST PLAN
ADDITIONAL INFORMATION