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

Tabs/TabPanel: icon position in Material #25425

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4c1fcb0
Tabs: icon position
marker-dao Aug 22, 2023
cddebb3
feat(tabs): Update TS
marker-dao Aug 22, 2023
efbb641
fix(react && vue): Generate
marker-dao Aug 22, 2023
7a8d044
fix(d.ts): Rename type
marker-dao Aug 23, 2023
01c9151
fix(angular): Generate
marker-dao Aug 23, 2023
c9e524f
fix(d.ts): Update d.ts
marker-dao Aug 28, 2023
f8073b3
feat(d.ts): Update TS
marker-dao Aug 22, 2023
d370d33
fix(tabPanel): Update TS
marker-dao Aug 23, 2023
c04d15c
fix(d.ts): Rename type
marker-dao Aug 29, 2023
1a2cc9f
regenerate-all
marker-dao Aug 30, 2023
7e948a6
fix(package-lock): Update sha512
marker-dao Aug 30, 2023
7411087
fix(package-lock): Update sha512
marker-dao Aug 30, 2023
f9cc6ec
feat(tabs): Update TS
marker-dao Aug 22, 2023
92ba9d1
feat(tabPanel): Add tests for iconPosition
marker-dao Aug 23, 2023
a117cb0
feat(tabs): Update etalons
marker-dao Aug 23, 2023
6448093
fix(tabPanel): Fix test
marker-dao Aug 23, 2023
5acffee
fix(etalons): Update etalon && Add new etalons
marker-dao Aug 23, 2023
949be8d
fix(regenerate)
marker-dao Aug 30, 2023
e9a6bed
fix(d.ts): Update d.ts
marker-dao Aug 30, 2023
5f5113c
rebase from TabPanel: Add iconPosition option
marker-dao Sep 4, 2023
7962bc1
feat(tabs): Update TS
marker-dao Aug 22, 2023
544c944
fix(d.ts): Rename type
marker-dao Aug 23, 2023
25257b0
feat(d.ts): Update TS
marker-dao Aug 22, 2023
3f6ab86
fix(tabPanel): Update TS
marker-dao Aug 23, 2023
dfa5ef3
fix(d.ts): Rename type
marker-dao Aug 29, 2023
fd4bef1
regenerate-all
marker-dao Aug 30, 2023
5015520
feat(tabs): Add icon position
marker-dao Aug 23, 2023
ad0aa27
feat(tabs && tabPanel): Add tests
marker-dao Aug 23, 2023
a663218
fix(tabs: style)
marker-dao Aug 24, 2023
f3a90fb
revert(tabs: styles): Revert paddings
marker-dao Aug 24, 2023
e4d7196
feat(tabs): Add rules for Material
marker-dao Aug 24, 2023
5edfccb
feat(tabs && tabPanel: etalons): Add new etalons
marker-dao Aug 24, 2023
c23eee1
fix(d.ts): Update d.ts
marker-dao Aug 30, 2023
4fe8872
REFENERATE ALL
marker-dao Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/devextreme/js/ui/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ const Tabs = CollectionWidget.inherit({
},
options: {
useInkRipple: true,
selectOnFocus: false
selectOnFocus: false,
iconPosition: ICON_POSITION.top,
}
}
]);
Expand Down
17 changes: 8 additions & 9 deletions packages/devextreme/scss/widgets/material/tabs/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
}

.dx-tab-text {
flex-direction: column;
text-transform: uppercase;
line-height: $material-tab-text-line-height;
font-weight: 500;
Expand Down Expand Up @@ -159,6 +158,14 @@
}
}

.dx-tabs-icon-position-start .dx-tab .dx-icon {
@include dx-icon-margin($material-base-icon-margin, start);
}

.dx-tabs-icon-position-end .dx-tab .dx-icon {
@include dx-icon-margin($material-base-icon-margin, end);
}

.dx-tabs-vertical {
.dx-tab-selected {
@include dx-tabs-border-mixin(left, $tabs-selected-tab-border-color);
Expand All @@ -168,14 +175,6 @@
}
}

.dx-tab-text {
flex-direction: row;

.dx-icon {
@include dx-icon-margin($material-base-icon-margin-right);
}
}

.dx-tabs-nav-button {
padding: $material-tab-vertical-nav-button-content-padding;
}
Expand Down
9 changes: 3 additions & 6 deletions packages/devextreme/scss/widgets/material/tabs/_sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ $material-tab-height: null !default;
$material-tab-min-width: null !default;

$material-tab-text-line-height: null !default;
$material-base-icon-margin-right: null !default;
$material-base-icon-margin-bottom: null !default;
$material-base-icon-margin: null !default;

$material-tab-nav-button-icon-width: null !default;
$material-tab-nav-button-icon-height: null !default;
Expand All @@ -22,8 +21,7 @@ $material-tab-vertical-nav-button-content-padding: null !default;
$material-tabs-item-padding: 12px 16px !default;
$material-tab-height: auto !default;
$material-tab-min-width: 90px !default;
$material-base-icon-margin-right: 8px !default;
$material-base-icon-margin-bottom: 4px !default;
$material-base-icon-margin: 8px !default;
$material-tab-text-line-height: 24px !default;
$material-tab-nav-button-icon-width: 24px !default;
$material-tab-nav-button-icon-height: 24px !default;
Expand All @@ -36,8 +34,7 @@ $material-tab-vertical-nav-button-content-padding: null !default;
$material-tabs-item-padding: 6px 12px !default;
$material-tab-height: auto !default;
$material-tab-min-width: 82px !default;
$material-base-icon-margin-right: 8px !default;
$material-base-icon-margin-bottom: 4px !default;
$material-base-icon-margin: 8px !default;
$material-tab-text-line-height: 24px !default;
$material-tab-nav-button-icon-width: 24px !default;
$material-tab-nav-button-icon-height: 24px !default;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
import { Selector, ClientFunction } from 'testcafe';
import { testScreenshot, isMaterial } from '../../../helpers/themeUtils';
import { testScreenshot } from '../../../helpers/themeUtils';
import url from '../../../helpers/getPageUrl';
import createWidget from '../../../helpers/createWidget';
import TabPanel from '../../../model/tabPanel';
Expand Down Expand Up @@ -425,9 +425,7 @@ test('TabPanel borders without scrolling', async (t) => {
test('TabPanel icon position', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

if (!isMaterial()) {
await testScreenshot(t, takeScreenshot, `TabPanel iconPosition=${iconPosition},rtl=${rtlEnabled}.png`, { element: '#container' });
}
await testScreenshot(t, takeScreenshot, `TabPanel iconPosition=${iconPosition},rtl=${rtlEnabled}.png`, { element: '#container' });

await t
.expect(compareResults.isValid())
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ fixture.disablePageReloads`Tabs_common`
test('Tabs icon position', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

if (!isMaterial()) {
await testScreenshot(t, takeScreenshot, `Tabs iconPosition=${iconPosition},rtl=${rtlEnabled}.png`, { element: '#tabs', shouldTestInCompact: true });
}
await testScreenshot(t, takeScreenshot, `Tabs iconPosition=${iconPosition},rtl=${rtlEnabled}.png`, { element: '#tabs', shouldTestInCompact: true });

await t
.expect(compareResults.isValid())
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading