Skip to content

Commit 7cdcefd

Browse files
fix(sheet): fix toolbar not showing contents in ios for ionic theme
1 parent 5da9cc6 commit 7cdcefd

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

core/src/components/modal/test/sheet/modal.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from '@playwright/test';
22
import { configs, test, dragElementBy } from '@utils/test/playwright';
33

4-
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
4+
configs({ modes: ['ios', "md", "ionic-ios", "ionic-md"], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
55
test.describe(title('sheet modal: rendering'), () => {
66
test('should not have visual regressions', async ({ page }) => {
77
await page.goto('/src/components/modal/test/sheet', config);
@@ -25,7 +25,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
2525
});
2626
});
2727

28-
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
28+
configs({ modes: ["ionic-ios", 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
2929
test.describe(title('sheet modal: half screen rendering'), () => {
3030
test('should not have visual regressions', async ({ page }) => {
3131
await page.goto('/src/components/modal/test/sheet', config);
@@ -62,7 +62,7 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
6262
});
6363
});
6464

65-
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
65+
configs({ modes: ['ios', "ionic-ios"], directions: ['ltr'] }).forEach(({ title, config }) => {
6666
test.describe(title('sheet modal: backdrop'), () => {
6767
test.beforeEach(async ({ page }) => {
6868
await page.goto('/src/components/modal/test/sheet', config);

core/src/components/toolbar/test/basic/toolbar.e2e.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from '@playwright/test';
22
import { configs, test } from '@utils/test/playwright';
33

4-
configs({ palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
4+
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
55
test.describe(title('toolbar: basic (LTR only)'), () => {
66
test('should not have visual regressions with text only', async ({ page }) => {
77
await page.setContent(
@@ -21,7 +21,7 @@ configs({ palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(({ title,
2121
});
2222
});
2323

24-
configs({ palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
24+
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
2525
test.describe(title('toolbar: basic'), () => {
2626
test('should truncate long title with ellipsis', async ({ page }) => {
2727
await page.setContent(
@@ -156,5 +156,25 @@ configs({ palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config })
156156
const header = page.locator('ion-header');
157157
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-icon-buttons`));
158158
});
159+
160+
test('should not have visual regressions with text and button inside the content slot', async ({ page }) => {
161+
await page.setContent(
162+
`
163+
<ion-header>
164+
<ion-toolbar>
165+
<ion-button fill="solid">
166+
<ion-icon slot="start" name="person-circle"></ion-icon>
167+
Solid
168+
</ion-button>
169+
<span>Solid</span>
170+
</ion-toolbar>
171+
</ion-header>
172+
`,
173+
config
174+
);
175+
176+
const header = page.locator('ion-header');
177+
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-buttons-inside-content`));
178+
});
159179
});
160180
});

core/src/components/toolbar/toolbar.ionic.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717

1818
.toolbar-container {
1919
gap: globals.$ion-space-400;
20+
z-index: 10;
21+
}
22+
23+
// Toolbar: Transparent
24+
// --------------------------------------------------
25+
26+
.toolbar-background {
27+
z-index: -1;
2028
}
2129

2230
// Toolbar: Content

0 commit comments

Comments
 (0)