-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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 tabs with Antd tabs #11118
Conversation
ed9e756
to
6f03492
Compare
@rusackas Can you please take a look? |
Codecov Report
@@ Coverage Diff @@
## master #11118 +/- ##
===========================================
- Coverage 66.55% 55.81% -10.75%
===========================================
Files 869 410 -459
Lines 41587 13976 -27611
Branches 3797 3549 -248
===========================================
- Hits 27680 7801 -19879
+ Misses 13805 6007 -7798
- Partials 102 168 +66
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
What does it look like if we make it less wide? |
@ktmud I tried with full width when there are 2 tabs and 30% when only Data tab is shown. What do you think? |
I think this makes enough sense for now, as I agree, the single super-wide tab didn't look good. Although I think 50% makes more sense, since that's what it the tab would be when the (only) other tab appears. This would make it more consistent from viz to viz. Making further adjustments should be easy/fast styling PRs, so I'm not losing too much sleep over this. Also, the "customize" tab's content will be moving to a whole new area "soon" when we revamp Explore, so this is all a temporary issue. As an alternative idea, we could show the second tab anyway, and just leave it grayed out/disabeld, but I fear that may lead to more user confusion. |
Agree 50% makes more sense. I think what would be the best of both world is to have fixed padding and dynamic width by default, then automatically expand to take full width when their total width is close to the width of the wrapping container. Might be a little tricky to implement, but it could be worth it. |
I changed the width to 50%. @ktmud I see your point, but I think that in many cases full width is what we want to go for, even though the tabs don't need that much space, e.g. Welcome view. In my opinion it looks better that way and I'd rather handle special cases individually. However, if there are more voices for "dynamic" approach I'm happy to refactor it that way 🙂 |
If you look at design mockups in SIP-34, there are multiple pages with dynamic width . Not sure what should be the default, but my guess is we will eventually need to implement a "width mode" option one way or another. That said, if we don't need to implement those pages right now, I'm OK with current solution. |
superset-frontend/cypress-base/cypress/integration/chart_list/card_view.test.ts
Outdated
Show resolved
Hide resolved
cb5a555
to
bb6ec67
Compare
@rusackas Rebase done |
Hey @kgabryje - sorry this PR took another hit. I forgot this had changes for the Welcome page, which just had a big revamp merged in. You can probably just remove changes to the Welcome page from this PR, and I promise I'll get it merged in. Apologies for the extra effort, and thanks for your patience. |
@rusackas Rebase done. I like the new look of Welcome page by the way! |
* Replace tabs in BuilderComponentPane * Replace tabs in ControlPanelsContainer * Replace tabs in AdhocMetricEditPopover * Replace Tabs in DatasourceEditor * Replace tabs in AdhocFilterEditPopover * Replace tabs in DateFilterControl * Bug fix * Change Tab styles * Fix tests * Fix cypress tests * Lint fix * Fix tests * Change Tabs style in ControlPanelsContainer * Change tabs content height * Lint fix * Add data test * Fix e2e test * Move Tabs file to separate dir * Fix after rebase * Fix e2e tests * Fix after rebase
SUMMARY
Replace react-bootstrap tabs with Antd tabs in
Welcome
,BuilderComponentPane
,ControlPanelsContainer
,AdhocMetricEditPopover
,DatasourceEditor
,AdhocFilterEditPopover
,DateFilterControl
. Screenshots below show a few examples of changes.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Welcome
screen before/after:BuilderComponentPane
before/after:ControlPanelsContainer
before/after:TEST PLAN
ADDITIONAL INFORMATION