Merge remote-tracking branch 'origin/main' into feature-7.6

This commit is contained in:
Liam DeBeasi
2023-10-18 17:52:12 -04:00
127 changed files with 1696 additions and 998 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -17,18 +17,6 @@
font-family: $font-family-base;
}
:host(.in-list.item-options-end:last-child) {
@include padding-horizontal(
null, calc(.7em + var(--ion-safe-area-right))
);
}
:host(.in-list.item-options-start:first-child) {
@include padding-horizontal(
calc(.7em + var(--ion-safe-area-left)), null
);
}
:host(.ion-color) {
background: current-color(base);
color: current-color(contrast);

View File

@ -99,3 +99,94 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
});
});
});
/**
* This behavior needs to be tested in both modes and directions to
* make sure the safe area padding is applied only to that side
* regardless of direction
*/
configs().forEach(({ title, screenshot, config }) => {
test.describe(title('item-sliding: basic'), () => {
test.describe('safe area left', () => {
test('should have padding on the left only', async ({ page }) => {
await page.setContent(
`
<style>
:root {
--ion-safe-area-left: 40px;
}
</style>
<ion-item-sliding>
<ion-item-options side="start">
<ion-item-option color="primary">
Archive
</ion-item-option>
<ion-item-option color="danger">
Delete
</ion-item-option>
</ion-item-options>
<ion-item>
<ion-label>
Sliding Item
</ion-label>
</ion-item>
</ion-item-sliding>
`,
config
);
const direction = config.direction;
const item = page.locator('ion-item-sliding');
const dragByX = direction == 'rtl' ? -150 : 150;
await dragElementBy(item, page, dragByX);
await page.waitForChanges();
await expect(item).toHaveScreenshot(screenshot(`item-sliding-safe-area-left`));
});
});
test.describe('safe area right', () => {
test('should have padding on the right only', async ({ page }) => {
await page.setContent(
`
<style>
:root {
--ion-safe-area-right: 40px;
}
</style>
<ion-item-sliding>
<ion-item>
<ion-label>
Sliding Item
</ion-label>
</ion-item>
<ion-item-options side="end">
<ion-item-option color="primary">
Archive
</ion-item-option>
<ion-item-option color="danger">
Delete
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
`,
config
);
const direction = config.direction;
const item = page.locator('ion-item-sliding');
const dragByX = direction == 'rtl' ? 150 : -150;
await dragElementBy(item, page, dragByX);
await page.waitForChanges();
await expect(item).toHaveScreenshot(screenshot(`item-sliding-safe-area-right`));
});
});
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -1,4 +1,4 @@
import type { Animation } from '../../interface';
import type { Animation, AnimationBuilder } from '@utils/animation/animation-interface';
export type Side = 'start' | 'end';
@ -26,13 +26,23 @@ export interface MenuI {
}
export interface MenuControllerI {
registerAnimation(name: string, animation: AnimationBuilder): void;
get(menu?: string | null, logOnMultipleSideMenus?: boolean): Promise<HTMLIonMenuElement | undefined>;
getMenus(): Promise<HTMLIonMenuElement[]>;
getOpen(): Promise<HTMLIonMenuElement | undefined>;
isEnabled(menu?: string | null): Promise<boolean>;
swipeGesture(shouldEnable: boolean, menu?: string | null): Promise<HTMLIonMenuElement | undefined>;
isAnimating(): Promise<boolean>;
isOpen(menu?: string | null): Promise<boolean>;
enable(shouldEnable: boolean, menu?: string | null): Promise<HTMLIonMenuElement | undefined>;
toggle(menu?: string | null): Promise<boolean>;
close(menu?: string | null): Promise<boolean>;
open(menu?: string | null): Promise<boolean>;
_getOpenSync(): HTMLIonMenuElement | undefined;
_createAnimation(type: string, menuCmp: MenuI): Promise<Animation>;
_setOpen(menu: MenuI, shouldOpen: boolean, animated: boolean): Promise<boolean>;
_register(menu: MenuI): void;
_unregister(menu: MenuI): void;
getMenus(): Promise<HTMLIonMenuElement[]>;
getOpenSync(): HTMLIonMenuElement | undefined;
_setOpen(menu: MenuI, shouldOpen: boolean, animated: boolean): Promise<boolean>;
}
export interface MenuChangeEventDetail {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -67,4 +67,14 @@
:host(.title-large) .toolbar-title {
@include transform-origin(inherit);
/**
* During a page transition
* if the large title and the back button
* texts match up, the back button should be
* scaled to roughly match the dimensions of
* the large title text. The following line
* ensures that the scale values are accurate.
*/
width: auto;
}