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

feat(datetime-button): update design to match iOS 17 spec #28730

Merged
merged 10 commits into from
Dec 20, 2023
12 changes: 12 additions & 0 deletions core/src/components/datetime-button/datetime-button.ios.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import "./datetime-button";

// iOS Datetime Button
// --------------------------------------------------

:host button {
@include padding(7px, 13px, 7px, 13px);
}

:host button.ion-activated {
color: $text-color-step-400;
}
8 changes: 8 additions & 0 deletions core/src/components/datetime-button/datetime-button.md.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "./datetime-button";

// Material Design Datetime Button
// --------------------------------------------------

:host button {
@include padding(6px, 12px, 6px, 12px);
}
1 change: 0 additions & 1 deletion core/src/components/datetime-button/datetime-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

:host button {
@include border-radius(8px);
@include padding(6px, 12px, 6px, 12px);
@include margin(0px, 2px, 0px, 2px);

position: relative;
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/datetime-button/datetime-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { parseDate } from '../datetime/utils/parse';
@Component({
tag: 'ion-datetime-button',
styleUrls: {
ios: 'datetime-button.scss',
md: 'datetime-button.scss',
ios: 'datetime-button.ios.scss',
md: 'datetime-button.md.scss',
},
shadow: true,
})
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
@@ -1,6 +1,23 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs().forEach(({ config, screenshot, title }) => {
test.describe(title('datetime-button: basic'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.setContent(
`
<ion-datetime-button locale="en-US" datetime="datetime"></ion-datetime-button>
<ion-datetime id="datetime" value="2022-01-01T06:30:00" presentation="date-time"></ion-datetime>
`,
config
);
const datetimeButton = page.locator('ion-datetime-button');

await expect(datetimeButton).toHaveScreenshot(screenshot(`datetime-button-basic`));
});
});
});

/**
* The tested behavior does not
* vary across modes/directions
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.