Compare commits

..

13 Commits

Author SHA1 Message Date
ionitron
a3055d79ff chore(): add updated snapshots 2025-06-20 09:35:52 +00:00
João Ferreira
ea2f03298b Merge branch 'next' into ROU-11702 2025-06-20 10:30:12 +01:00
João Ferreira
427c89a844 - fix styles to use the right vars;
- remove focus of adjacent day, since adjacent days are not docusable;
2025-06-20 10:27:03 +01:00
João Ferreira
b80fc4ba88 Update core/src/components/datetime/datetime.ionic.scss
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-06-20 09:46:14 +01:00
Giuliana Silva
708364df82 fix(sheet): fix toolbar not showing contents in ios for ionic theme (#30496)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The `ion-toolbar` contents inside the `sheet` were not being displayed
correctly in `iOS`.

## What is the new behavior?
This PR add `z-index` values of the `ion-toolbar`'s `content` and
`background` containers to fix the issue.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information
Before:
<img
src="https://github.com/user-attachments/assets/ac28e3de-9bb3-447d-a6f7-cce40ccd222c"
alt="Sample Image" height="300">

After: 
<img
src="https://github.com/user-attachments/assets/18af1b57-dd70-4783-b0e7-9fffab8402a3"
alt="Sample Image" height="300">

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-06-18 16:02:25 +01:00
João Ferreira
098943342b - lint.fix; 2025-06-17 18:08:43 +01:00
ionitron
69f7d497d7 chore(): add updated snapshots 2025-06-17 17:03:13 +00:00
João Ferreira
2e7222681c - add ionic-md mode to tests 2025-06-17 17:55:48 +01:00
João Ferreira
f0b61df430 - use global var for heigh; 2025-06-17 15:29:51 +01:00
João Ferreira
ce7cc0affc Merge branch 'next' into ROU-11702 2025-06-17 15:10:49 +01:00
Bernardo Cardoso
5da9cc64bd feat(header): add translucent support on ionic theme (#30493)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When using ionic theme there's no support for translucent prop on the
ion-header.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add support for translucent prop on Ionic theme
- Adjusted tests to also run for ionic-md 

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Ionic header
fade](https://ionic-framework-git-rou-11911-ionic1.vercel.app/src/components/header/test/fade?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-06-17 14:44:11 +01:00
João Ferreira
809edf8664 - fix next-prev buttons; 2025-06-17 11:34:32 +01:00
João Ferreira
23b0474d6d - add styles in ionic theme for adjacent-days 2025-06-17 10:49:05 +01:00
121 changed files with 107 additions and 45 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;
}
}

View File

@@ -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>
);

View File

@@ -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);

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -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>
`;

View File

@@ -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();

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -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`));
});
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Some files were not shown because too many files have changed in this diff Show More