Compare commits
13 Commits
test-sheet
...
ROU-11702-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3055d79ff | ||
|
|
ea2f03298b | ||
|
|
427c89a844 | ||
|
|
b80fc4ba88 | ||
|
|
708364df82 | ||
|
|
098943342b | ||
|
|
69f7d497d7 | ||
|
|
2e7222681c | ||
|
|
f0b61df430 | ||
|
|
ce7cc0affc | ||
|
|
5da9cc64bd | ||
|
|
809edf8664 | ||
|
|
23b0474d6d |
4
core/src/components.d.ts
vendored
@@ -1460,7 +1460,7 @@ export namespace Components {
|
||||
*/
|
||||
"theme"?: "ios" | "md" | "ionic";
|
||||
/**
|
||||
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
|
||||
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` or `"ionic"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
|
||||
* @default false
|
||||
*/
|
||||
"translucent": boolean;
|
||||
@@ -7369,7 +7369,7 @@ declare namespace LocalJSX {
|
||||
*/
|
||||
"theme"?: "ios" | "md" | "ionic";
|
||||
/**
|
||||
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
|
||||
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` or `"ionic"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
|
||||
* @default false
|
||||
*/
|
||||
"translucent"?: boolean;
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
--background-activated: #{globals.$ion-primitives-neutral-200};
|
||||
--background-hover: #{globals.$ion-primitives-neutral-200};
|
||||
--background-hover-opacity: 1;
|
||||
min-height: globals.$ion-scale-1000;
|
||||
}
|
||||
|
||||
// TODO(ROU-11119): Rewrite this when we replace the ion-button with a native button
|
||||
@@ -153,7 +154,8 @@
|
||||
}
|
||||
|
||||
// Selected Day
|
||||
.calendar-day.calendar-day-active {
|
||||
.calendar-day.calendar-day-active,
|
||||
.calendar-day.calendar-day-active.calendar-day-adjacent-day {
|
||||
background: globals.$ion-semantics-primary-100;
|
||||
}
|
||||
|
||||
@@ -170,8 +172,19 @@
|
||||
}
|
||||
|
||||
// Pressed Day
|
||||
.calendar-day:active {
|
||||
background: globals.$ion-semantics-primary-300;
|
||||
.calendar-day:active,
|
||||
.calendar-day.calendar-day-adjacent-day:active {
|
||||
background: globals.$ion-bg-primary-subtle-press;
|
||||
}
|
||||
|
||||
// Adjacent Day
|
||||
.calendar-day.calendar-day-adjacent-day {
|
||||
color: globals.$ion-text-subtlest;
|
||||
}
|
||||
|
||||
// Selected Adjacent Day
|
||||
.calendar-day.calendar-day-active.calendar-day-adjacent-day {
|
||||
color: globals.$ion-text-default;
|
||||
}
|
||||
|
||||
// Time / Header
|
||||
@@ -203,7 +216,6 @@
|
||||
|
||||
// Calendar / Footer / Action Buttons
|
||||
// -----------------------------------
|
||||
|
||||
:host .datetime-buttons ion-buttons,
|
||||
.datetime-action-buttons .datetime-action-buttons-container {
|
||||
flex-flow: column;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { configs, test } from '@utils/test/playwright';
|
||||
/**
|
||||
* This behavior does not vary across directions
|
||||
*/
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('datetime: show adjacent days'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
|
||||
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -17,3 +17,16 @@ ion-toolbar + ion-toolbar {
|
||||
--padding-start: #{globals.$ion-space-400};
|
||||
--padding-end: #{globals.$ion-space-400};
|
||||
}
|
||||
|
||||
@supports (backdrop-filter: blur(0)) {
|
||||
.header-background {
|
||||
@include globals.position(0, 0, 0, 0);
|
||||
|
||||
position: absolute;
|
||||
|
||||
backdrop-filter: saturate(180%) blur(globals.$ion-scale-100);
|
||||
}
|
||||
.header-translucent-ionic ion-toolbar {
|
||||
--opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export class Header implements ComponentInterface {
|
||||
|
||||
/**
|
||||
* If `true`, the header will be translucent.
|
||||
* Only applies when the theme is `"ios"` and the device supports
|
||||
* Only applies when the theme is `"ios"` or `"ionic"` and the device supports
|
||||
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
||||
*
|
||||
* Note: In order to scroll content behind the header, the `fullscreen`
|
||||
@@ -239,7 +239,7 @@ export class Header implements ComponentInterface {
|
||||
}}
|
||||
{...inheritedAttributes}
|
||||
>
|
||||
{theme === 'ios' && translucent && <div class="header-background"></div>}
|
||||
{theme !== 'md' && translucent && <div class="header-background"></div>}
|
||||
<slot></slot>
|
||||
</Host>
|
||||
);
|
||||
|
||||
@@ -2,9 +2,9 @@ import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
/**
|
||||
* Translucent effect is only available in iOS mode.
|
||||
* Translucent effect is only available in iOS and Ionic mode.
|
||||
*/
|
||||
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
configs({ modes: ['ios', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('header: fade'), () => {
|
||||
test('should not have visual regressions with fade header', async ({ page }) => {
|
||||
await page.goto('/src/components/header/test/fade', config);
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -196,7 +196,10 @@
|
||||
element.innerHTML = `
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
Super Modal
|
||||
<ion-title>Super Modal</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button class="dismiss">Dismiss Modal</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
@@ -206,7 +209,7 @@
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-button>Footer</ion-button>
|
||||
<ion-title>Footer</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
`;
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test, dragElementBy } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('sheet modal: rendering'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/modal/test/sheet', config);
|
||||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
|
||||
configs({ modes: ['ios', 'md', 'ionic-ios', 'ionic-md'], directions: ['ltr'] }).forEach(
|
||||
({ title, screenshot, config }) => {
|
||||
test.describe(title('sheet modal: rendering'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/modal/test/sheet', config);
|
||||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
|
||||
|
||||
await page.click('#sheet-modal');
|
||||
await page.click('#sheet-modal');
|
||||
|
||||
await ionModalDidPresent.next();
|
||||
await ionModalDidPresent.next();
|
||||
|
||||
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
|
||||
/**
|
||||
* Animations must be enabled to capture the screenshot.
|
||||
* By default, animations are disabled with toHaveScreenshot,
|
||||
* and when capturing the screenshot will call animation.finish().
|
||||
* This will cause the modal to close and the screenshot capture
|
||||
* to be invalid.
|
||||
*/
|
||||
animations: 'allow',
|
||||
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
|
||||
/**
|
||||
* Animations must be enabled to capture the screenshot.
|
||||
* By default, animations are disabled with toHaveScreenshot,
|
||||
* and when capturing the screenshot will call animation.finish().
|
||||
* This will cause the modal to close and the screenshot capture
|
||||
* to be invalid.
|
||||
*/
|
||||
animations: 'allow',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('sheet modal: half screen rendering'), () => {
|
||||
@@ -62,7 +64,7 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
|
||||
});
|
||||
});
|
||||
|
||||
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
||||
configs({ modes: ['ios', 'ionic-ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
||||
test.describe(title('sheet modal: backdrop'), () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/src/components/modal/test/sheet', config);
|
||||
@@ -175,7 +177,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
||||
const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange');
|
||||
const header = page.locator('.modal-sheet ion-header');
|
||||
|
||||
await dragElementBy(header, page, 0, 125);
|
||||
await dragElementBy(header, page, 0, 110);
|
||||
|
||||
await ionBreakpointDidChange.next();
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 42 KiB |
@@ -1,27 +1,29 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('toolbar: basic (LTR only)'), () => {
|
||||
test('should not have visual regressions with text only', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(
|
||||
({ title, screenshot, config }) => {
|
||||
test.describe(title('toolbar: basic (LTR only)'), () => {
|
||||
test('should not have visual regressions with text only', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Toolbar</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
`,
|
||||
config
|
||||
);
|
||||
config
|
||||
);
|
||||
|
||||
const header = page.locator('ion-header');
|
||||
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-only`));
|
||||
const header = page.locator('ion-header');
|
||||
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-only`));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
configs({ palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
|
||||
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('toolbar: basic'), () => {
|
||||
test('should truncate long title with ellipsis', async ({ page }) => {
|
||||
await page.setContent(
|
||||
@@ -156,5 +158,25 @@ configs({ palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config })
|
||||
const header = page.locator('ion-header');
|
||||
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-icon-buttons`));
|
||||
});
|
||||
|
||||
test('should not have visual regressions with text and button inside the content slot', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-button fill="solid">
|
||||
<ion-icon slot="start" name="person-circle"></ion-icon>
|
||||
Solid
|
||||
</ion-button>
|
||||
<span>Solid</span>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const header = page.locator('ion-header');
|
||||
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-buttons-inside-content`));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.4 KiB |