-
Notifications
You must be signed in to change notification settings - Fork 65
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
1732 - non-fixed style tabs with scrolling #1747
1732 - non-fixed style tabs with scrolling #1747
Conversation
This pull request is being automatically deployed with Vercel (learn more). widget-test-docs – ./🔍 Inspect: https://vercel.com/dojo/widget-test-docs/9qczevn4naRCysFf2xGQmPbptRAf dojo.widgets – ./🔍 Inspect: https://vercel.com/dojo/dojo.widgets/Dk2NicCmjhVpvgJGMNmWdbRbXKJp |
Codecov Report
@@ Coverage Diff @@
## master #1747 +/- ##
==========================================
+ Coverage 90.43% 90.46% +0.03%
==========================================
Files 94 94
Lines 5143 5152 +9
Branches 1403 1406 +3
==========================================
+ Hits 4651 4661 +10
Misses 241 241
+ Partials 251 250 -1
Continue to review full report at Codecov.
|
src/tab-container/index.tsx
Outdated
* Computes the height of browser-rendered horizontal scrollbars using a self-created test element. | ||
* May return 0 (e.g. on OS X browsers under default configuration). | ||
*/ | ||
const computeHorizontalScrollbarHeight = (): number => { |
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.
@KaneFreeman we have a middleware (https://github.com/dojo/widgets/blob/master/src/middleware/offscreen.ts) that can be used for offscreen rendering in order to calculate dimensions call offscreen
, also I think we can leverage the getOrSet
icache api to make it a bit neater. I think something like this will work:
const horizontalScrollbarHeight = icache.getOrSet('horizontalScrollbarHeight', () => {
return offscreen(
() => <div classes={[themeCss.scrollTest]}/>,
(node) => node.offsetHeight - node.clientHeight
);
});
Also I don't think the class themeTest
should be a themeable class, probably should be a fixed class, which means we'll need to add a new css file for the tab-container.
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.
Caveat I haven't tried it, but I think it should work.
Type: feature
The following has been addressed in the PR:
.dojorc
theme.variant()
is added to the root domnodetheme.compose
like thisDescription:
fixed
property to toggle between the two stylesResolves #1732