merge release-6.1.2
Release 6.1.2
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -21,6 +21,7 @@ body:
|
|||||||
- label: v4.x
|
- label: v4.x
|
||||||
- label: v5.x
|
- label: v5.x
|
||||||
- label: v6.x
|
- label: v6.x
|
||||||
|
- label: Nightly
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Current Behavior
|
label: Current Behavior
|
||||||
|
60
.github/workflows/nightly.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
name: 'Ionic Nightly Build'
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run every Monday-Friday
|
||||||
|
# at 6:00 UTC (6:00 am UTC)
|
||||||
|
- cron: '00 06 * * 1-5'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nightly-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm ci --no-package-lock && lerna bootstrap --ignore-scripts -- --legacy-peer-deps
|
||||||
|
shell: bash
|
||||||
|
- name: Prepare NPM Token
|
||||||
|
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- name: Configure Identity
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions
|
||||||
|
git config user.email github-actions@github.com
|
||||||
|
# A 1 is required before the timestamp
|
||||||
|
# as lerna will fail when there is a leading 0
|
||||||
|
# See https://github.com/lerna/lerna/issues/2840
|
||||||
|
- name: Create Nightly Hash
|
||||||
|
# The date should output YYYYMMDD
|
||||||
|
# so that it is human readable
|
||||||
|
run: |
|
||||||
|
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
||||||
|
echo "CURRENT_VERSION=$(node ./.scripts/bump-version.js)" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
- name: Checkout Nightly Branch
|
||||||
|
run: |
|
||||||
|
git checkout -b nightly-$(echo "${{ env.DATE }}")
|
||||||
|
git push origin nightly-$(echo "${{ env.DATE }}")
|
||||||
|
shell: bash
|
||||||
|
- name: Create Nightly Build
|
||||||
|
run: |
|
||||||
|
HUSKY_SKIP_HOOKS=1 lerna publish $(echo "${{ env.CURRENT_VERSION }}")-nightly.$(echo "${{ env.DATE }}") --no-verify-access --yes --force-publish='*' --dist-tag nightly --conventional-commits --conventional-prerelease --exact --create-release github
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
shell: bash
|
||||||
|
# We need to push the commit changes in order for the tags
|
||||||
|
# to get updated, but we don't need to keep the changelog
|
||||||
|
# changes around.
|
||||||
|
- name: Delete Nightly Branch
|
||||||
|
run: |
|
||||||
|
git checkout main
|
||||||
|
git branch -D nightly-$(echo "${{ env.DATE }}")
|
||||||
|
git push origin --delete nightly-$(echo "${{ env.DATE }}")
|
||||||
|
shell: bash
|
12
CHANGELOG.md
@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.1.2](https://github.com/ionic-team/ionic-framework/compare/v6.1.1...v6.1.2) (2022-04-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **datetime:** time picker display matches dynamically set value ([#25010](https://github.com/ionic-team/ionic-framework/issues/25010)) ([11493a0](https://github.com/ionic-team/ionic-framework/commit/11493a086a4e3f2a4e9d3acdf5a9d49e810a5ef0)), closes [#24967](https://github.com/ionic-team/ionic-framework/issues/24967)
|
||||||
|
* **modal:** add canDismiss option to modal options ([#25144](https://github.com/ionic-team/ionic-framework/issues/25144)) ([2984ddf](https://github.com/ionic-team/ionic-framework/commit/2984ddf111b6acbd9e47ed90830b6522179b6cee)), closes [#25143](https://github.com/ionic-team/ionic-framework/issues/25143)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [6.1.1](https://github.com/ionic-team/ionic-framework/compare/v6.1.0...v6.1.1) (2022-04-15)
|
## [6.1.1](https://github.com/ionic-team/ionic-framework/compare/v6.1.0...v6.1.1) (2022-04-15)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.1.2](https://github.com/ionic-team/ionic/compare/v6.1.1...v6.1.2) (2022-04-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/angular
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [6.1.1](https://github.com/ionic-team/ionic/compare/v6.1.0...v6.1.1) (2022-04-15)
|
## [6.1.1](https://github.com/ionic-team/ionic/compare/v6.1.0...v6.1.1) (2022-04-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ionic/angular
|
**Note:** Version bump only for package @ionic/angular
|
||||||
|
2
angular/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular",
|
"name": "@ionic/angular",
|
||||||
"version": "6.1.1",
|
"version": "6.1.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular",
|
"name": "@ionic/angular",
|
||||||
"version": "6.1.1",
|
"version": "6.1.2",
|
||||||
"description": "Angular specific wrappers for @ionic/core",
|
"description": "Angular specific wrappers for @ionic/core",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"validate": "npm i && npm run lint && npm run test && npm run build"
|
"validate": "npm i && npm run lint && npm run test && npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.1.1",
|
"@ionic/core": "^6.1.2",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.1.2](https://github.com/ionic-team/ionic/compare/v6.1.1...v6.1.2) (2022-04-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **datetime:** time picker display matches dynamically set value ([#25010](https://github.com/ionic-team/ionic/issues/25010)) ([11493a0](https://github.com/ionic-team/ionic/commit/11493a086a4e3f2a4e9d3acdf5a9d49e810a5ef0)), closes [#24967](https://github.com/ionic-team/ionic/issues/24967)
|
||||||
|
* **modal:** add canDismiss option to modal options ([#25144](https://github.com/ionic-team/ionic/issues/25144)) ([2984ddf](https://github.com/ionic-team/ionic/commit/2984ddf111b6acbd9e47ed90830b6522179b6cee)), closes [#25143](https://github.com/ionic-team/ionic/issues/25143)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [6.1.1](https://github.com/ionic-team/ionic/compare/v6.1.0...v6.1.1) (2022-04-15)
|
## [6.1.1](https://github.com/ionic-team/ionic/compare/v6.1.0...v6.1.1) (2022-04-15)
|
||||||
|
|
||||||
|
|
||||||
|
2
core/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/core",
|
"name": "@ionic/core",
|
||||||
"version": "6.1.1",
|
"version": "6.1.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/core",
|
"name": "@ionic/core",
|
||||||
"version": "6.1.1",
|
"version": "6.1.2",
|
||||||
"description": "Base components for Ionic",
|
"description": "Base components for Ionic",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
|
@ -317,6 +317,8 @@ export class Datetime implements ComponentInterface {
|
|||||||
const valueDateParts = parseDate(this.value);
|
const valueDateParts = parseDate(this.value);
|
||||||
if (valueDateParts) {
|
if (valueDateParts) {
|
||||||
const { month, day, year, hour, minute } = valueDateParts;
|
const { month, day, year, hour, minute } = valueDateParts;
|
||||||
|
const ampm = hour >= 12 ? 'pm' : 'am';
|
||||||
|
|
||||||
this.activePartsClone = {
|
this.activePartsClone = {
|
||||||
...this.activeParts,
|
...this.activeParts,
|
||||||
month,
|
month,
|
||||||
@ -324,7 +326,17 @@ export class Datetime implements ComponentInterface {
|
|||||||
year,
|
year,
|
||||||
hour,
|
hour,
|
||||||
minute,
|
minute,
|
||||||
|
ampm,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The working parts am/pm value must be updated when the value changes, to
|
||||||
|
* ensure the time picker hour column values are generated correctly.
|
||||||
|
*/
|
||||||
|
this.setWorkingParts({
|
||||||
|
...this.workingParts,
|
||||||
|
ampm,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
printIonWarning(`Unable to parse date string: ${this.value}. Please provide a valid ISO 8601 datetime string.`);
|
printIonWarning(`Unable to parse date string: ${this.value}. Please provide a valid ISO 8601 datetime string.`);
|
||||||
}
|
}
|
||||||
@ -1049,7 +1061,7 @@ export class Datetime implements ComponentInterface {
|
|||||||
const valueToProcess = value || getToday();
|
const valueToProcess = value || getToday();
|
||||||
const { month, day, year, hour, minute, tzOffset } = parseDate(valueToProcess);
|
const { month, day, year, hour, minute, tzOffset } = parseDate(valueToProcess);
|
||||||
|
|
||||||
this.workingParts = {
|
this.setWorkingParts({
|
||||||
month,
|
month,
|
||||||
day,
|
day,
|
||||||
year,
|
year,
|
||||||
@ -1057,7 +1069,7 @@ export class Datetime implements ComponentInterface {
|
|||||||
minute,
|
minute,
|
||||||
tzOffset,
|
tzOffset,
|
||||||
ampm: hour >= 12 ? 'pm' : 'am',
|
ampm: hour >= 12 ? 'pm' : 'am',
|
||||||
};
|
});
|
||||||
|
|
||||||
this.activeParts = {
|
this.activeParts = {
|
||||||
month,
|
month,
|
||||||
@ -1628,7 +1640,7 @@ export class Datetime implements ComponentInterface {
|
|||||||
const timeOnlyPresentation = presentation === 'time';
|
const timeOnlyPresentation = presentation === 'time';
|
||||||
const use24Hour = is24Hour(this.locale, this.hourCycle);
|
const use24Hour = is24Hour(this.locale, this.hourCycle);
|
||||||
const { hours, minutes, am, pm } = generateTime(
|
const { hours, minutes, am, pm } = generateTime(
|
||||||
this.workingParts,
|
workingParts,
|
||||||
use24Hour ? 'h23' : 'h12',
|
use24Hour ? 'h23' : 'h12',
|
||||||
this.minParts,
|
this.minParts,
|
||||||
this.maxParts,
|
this.maxParts,
|
||||||
|
112
core/src/components/datetime/test/presentation/datetime.e2e.ts
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
import type { Locator } from '@playwright/test';
|
||||||
|
import { expect } from '@playwright/test';
|
||||||
|
import type { E2EPage } from '@utils/test/playwright';
|
||||||
|
import { test } from '@utils/test/playwright';
|
||||||
|
|
||||||
|
test.describe('datetime: presentation', () => {
|
||||||
|
test('should not have visual regressions', async ({ page }) => {
|
||||||
|
await page.goto(`/src/components/datetime/test/presentation`);
|
||||||
|
|
||||||
|
await page.setIonViewport();
|
||||||
|
|
||||||
|
const compares = [];
|
||||||
|
const presentations = ['date-time', 'time-date', 'time', 'date', 'month-year', 'month', 'year'];
|
||||||
|
|
||||||
|
for (const presentation of presentations) {
|
||||||
|
await page.locator('select').selectOption(presentation);
|
||||||
|
await page.waitForChanges();
|
||||||
|
compares.push({
|
||||||
|
presentation,
|
||||||
|
screenshot: await page.screenshot({ fullPage: true }),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const compare of compares) {
|
||||||
|
expect(compare.screenshot).toMatchSnapshot(
|
||||||
|
`datetime-presentation-${compare.presentation}-diff-${page.getSnapshotSettings()}.png`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test.describe('datetime: presentation: time', () => {
|
||||||
|
let timePickerFixture: TimePickerFixture;
|
||||||
|
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
timePickerFixture = new TimePickerFixture(page);
|
||||||
|
await timePickerFixture.goto();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('changing value from AM to AM should update the text', async () => {
|
||||||
|
await timePickerFixture.setValue('04:20:00');
|
||||||
|
await timePickerFixture.expectTime('4', '20', 'AM');
|
||||||
|
|
||||||
|
await timePickerFixture.setValue('11:03:00');
|
||||||
|
await timePickerFixture.expectTime('11', '03', 'AM');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('changing value from AM to PM should update the text', async () => {
|
||||||
|
await timePickerFixture.setValue('05:30:00');
|
||||||
|
await timePickerFixture.expectTime('5', '30', 'AM');
|
||||||
|
|
||||||
|
await timePickerFixture.setValue('16:40:00');
|
||||||
|
await timePickerFixture.expectTime('4', '40', 'PM');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('changing the value from PM to AM should update the text', async () => {
|
||||||
|
await timePickerFixture.setValue('16:40:00');
|
||||||
|
await timePickerFixture.expectTime('4', '40', 'PM');
|
||||||
|
|
||||||
|
await timePickerFixture.setValue('04:20:00');
|
||||||
|
await timePickerFixture.expectTime('4', '20', 'AM');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('changing the value from PM to PM should update the text', async () => {
|
||||||
|
await timePickerFixture.setValue('16:40:00');
|
||||||
|
await timePickerFixture.expectTime('4', '40', 'PM');
|
||||||
|
|
||||||
|
await timePickerFixture.setValue('19:32:00');
|
||||||
|
await timePickerFixture.expectTime('7', '32', 'PM');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
class TimePickerFixture {
|
||||||
|
readonly page: E2EPage;
|
||||||
|
|
||||||
|
private timePicker!: Locator;
|
||||||
|
|
||||||
|
constructor(page: E2EPage) {
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
async goto() {
|
||||||
|
await this.page.goto(`/src/components/datetime/test/presentation`);
|
||||||
|
await this.page.locator('select').selectOption('time');
|
||||||
|
await this.page.waitForSelector('.datetime-presentation-time');
|
||||||
|
this.timePicker = this.page.locator('ion-datetime');
|
||||||
|
}
|
||||||
|
|
||||||
|
async setValue(value: string) {
|
||||||
|
const ionChange = await this.page.spyOnEvent('ionChange');
|
||||||
|
await this.timePicker.evaluate((el: HTMLIonDatetimeElement, newValue: string) => {
|
||||||
|
el.value = newValue;
|
||||||
|
}, value);
|
||||||
|
|
||||||
|
await ionChange.next();
|
||||||
|
|
||||||
|
// Changing the value can take longer than the default 100ms to repaint
|
||||||
|
await this.page.waitForChanges(300);
|
||||||
|
}
|
||||||
|
|
||||||
|
async expectTime(hour: string, minute: string, ampm: string) {
|
||||||
|
expect(
|
||||||
|
await this.timePicker.locator('ion-picker-column-internal:nth-child(1) .picker-item-active').textContent()
|
||||||
|
).toBe(hour);
|
||||||
|
expect(
|
||||||
|
await this.timePicker.locator('ion-picker-column-internal:nth-child(2) .picker-item-active').textContent()
|
||||||
|
).toBe(minute);
|
||||||
|
expect(
|
||||||
|
await this.timePicker.locator('ion-picker-column-internal:nth-child(3) .picker-item-active').textContent()
|
||||||
|
).toBe(ampm);
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 52 KiB |