mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 01:03:03 +08:00
chore(): sync with main
This commit is contained in:
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
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: v7.x
|
||||||
- label: Nightly
|
- label: Nightly
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
|||||||
log.txt
|
log.txt
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
*.tgz
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy core dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../core
|
||||||
cp -a ../core/dist node_modules/@ionic/core/dist
|
|
||||||
cp -a ../core/components node_modules/@ionic/core/components
|
# Pack @ionic/angular
|
||||||
cp -a ../core/package.json node_modules/@ionic/core/package.json
|
npm pack ./
|
||||||
|
|
||||||
|
# Install Dependencies
|
||||||
|
npm install *.tgz --no-save
|
||||||
|
@ -2,19 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy angular dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/angular
|
npm pack ../../../../core
|
||||||
cp -a ../../../dist node_modules/@ionic/angular
|
|
||||||
|
|
||||||
# Copy angular server
|
# Pack @ionic/angular
|
||||||
rm -rf node_modules/@ionic/angular-server
|
npm pack ../../../dist
|
||||||
cp -a ../../../../packages/angular-server/dist node_modules/@ionic/angular-server
|
|
||||||
|
|
||||||
# # Copy core dist
|
# Pack @ionic/angular-server
|
||||||
rm -rf node_modules/@ionic/core
|
npm pack ../../../../packages/angular-server/dist
|
||||||
mkdir node_modules/@ionic/core
|
|
||||||
cp -a ../../../../core/css node_modules/@ionic/core/css
|
# Install Dependencies
|
||||||
cp -a ../../../../core/dist node_modules/@ionic/core/dist
|
npm install *.tgz --no-save
|
||||||
cp -a ../../../../core/hydrate node_modules/@ionic/core/hydrate
|
|
||||||
cp -a ../../../../core/loader node_modules/@ionic/core/loader
|
|
||||||
cp -a ../../../../core/package.json node_modules/@ionic/core/package.json
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||||
import { Component, Element, Event, Host, Method, Prop, State, Watch, h } from '@stencil/core';
|
import { Component, Element, Event, Host, Method, Prop, State, Watch, h, forceUpdate } from '@stencil/core';
|
||||||
import { createLegacyFormController } from '@utils/forms';
|
import { createLegacyFormController } from '@utils/forms';
|
||||||
import type { LegacyFormController } from '@utils/forms';
|
import type { LegacyFormController } from '@utils/forms';
|
||||||
import { printIonWarning } from '@utils/logging';
|
import { printIonWarning } from '@utils/logging';
|
||||||
@ -248,6 +248,14 @@ export class Select implements ComponentInterface {
|
|||||||
|
|
||||||
this.mutationO = watchForOptions<HTMLIonSelectOptionElement>(this.el, 'ion-select-option', async () => {
|
this.mutationO = watchForOptions<HTMLIonSelectOptionElement>(this.el, 'ion-select-option', async () => {
|
||||||
this.updateOverlayOptions();
|
this.updateOverlayOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need to re-render the component
|
||||||
|
* because one of the new ion-select-option
|
||||||
|
* elements may match the value. In this case,
|
||||||
|
* the rendered selected text should be updated.
|
||||||
|
*/
|
||||||
|
forceUpdate(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,11 +43,15 @@
|
|||||||
></ion-select>
|
></ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-select id="with-value" placeholder="With Value" value="bird"></ion-select>
|
||||||
|
|
||||||
|
<button id="set-contents" onclick="setContents()">Set Contents</button>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let selects = document.querySelectorAll('ion-select');
|
let selects = document.querySelectorAll('ion-select');
|
||||||
const options = ['bird', 'dog', 'shark', 'lizard'];
|
const options = ['bird', 'dog', 'shark', 'lizard'];
|
||||||
|
|
||||||
setTimeout(() => {
|
const setContents = () => {
|
||||||
selects.forEach((select) => {
|
selects.forEach((select) => {
|
||||||
options.forEach((option) => {
|
options.forEach((option) => {
|
||||||
let o = document.createElement('ion-select-option');
|
let o = document.createElement('ion-select-option');
|
||||||
@ -58,10 +62,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
select.value = options[0];
|
select.value = options[0];
|
||||||
|
|
||||||
window.dispatchEvent(new CustomEvent('selectValueSet'));
|
|
||||||
});
|
});
|
||||||
}, 1000);
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
import { expect } from '@playwright/test';
|
import { expect } from '@playwright/test';
|
||||||
import { test } from '@utils/test/playwright';
|
import { test } from '@utils/test/playwright';
|
||||||
|
|
||||||
// TODO: This test is extremely flaky
|
test.describe('select: async', () => {
|
||||||
test.skip('select: async', () => {
|
test.beforeEach(async ({ page, skip }) => {
|
||||||
test('should correctly set the value after a delay', async ({ page, skip }) => {
|
|
||||||
skip.rtl('This is checking internal logic. RTL tests are not needed');
|
skip.rtl('This is checking internal logic. RTL tests are not needed');
|
||||||
|
skip.mode('md');
|
||||||
|
|
||||||
await page.goto(`/src/components/select/test/async`);
|
await page.goto(`/src/components/select/test/async`);
|
||||||
const selectValueSet = await page.spyOnEvent('selectValueSet');
|
});
|
||||||
|
test('should correctly set the value after a delay', async ({ page }) => {
|
||||||
const select = await page.locator('#default');
|
const select = page.locator('#default');
|
||||||
|
await page.click('#set-contents');
|
||||||
await selectValueSet.next();
|
|
||||||
|
|
||||||
await expect(select).toHaveJSProperty('value', 'bird');
|
await expect(select).toHaveJSProperty('value', 'bird');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should re-render when options update but value is already set', async ({ page }) => {
|
||||||
|
const select = page.locator('#with-value');
|
||||||
|
await page.click('#set-contents');
|
||||||
|
|
||||||
|
await expect(select.locator('.select-text')).toHaveText('bird');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -108,8 +108,8 @@ test.describe('overlays: focus', () => {
|
|||||||
test.beforeEach(({ skip }) => {
|
test.beforeEach(({ skip }) => {
|
||||||
skip.rtl();
|
skip.rtl();
|
||||||
});
|
});
|
||||||
// TODO FW-3080
|
|
||||||
test.skip('should not select a hidden focusable element', async ({ page, browserName }) => {
|
test('should not select a hidden focusable element', async ({ page, browserName }) => {
|
||||||
await page.setContent(`
|
await page.setContent(`
|
||||||
<style>
|
<style>
|
||||||
[hidden] {
|
[hidden] {
|
||||||
|
@ -2,19 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy ionic react dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/react/dist node_modules/@ionic/react/css
|
npm pack ../../../core
|
||||||
cp -a ../../react/dist node_modules/@ionic/react/dist
|
|
||||||
cp -a ../../react/css node_modules/@ionic/react/css
|
|
||||||
cp -a ../../react/package.json node_modules/@ionic/react/package.json
|
|
||||||
|
|
||||||
# Copy ionic react router dist
|
# Pack @ionic/react
|
||||||
rm -rf node_modules/@ionic/react-router/dist
|
npm pack ../../react
|
||||||
cp -a ../dist node_modules/@ionic/react-router/dist
|
|
||||||
cp -a ../package.json node_modules/@ionic/react-router/package.json
|
|
||||||
|
|
||||||
# Copy core dist and components
|
# Pack @ionic/react-router
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../
|
||||||
cp -a ../../../core/package.json node_modules/@ionic/core/package.json
|
|
||||||
cp -a ../../../core/dist node_modules/@ionic/core/dist
|
# Install Dependencies
|
||||||
cp -a ../../../core/components node_modules/@ionic/core/components
|
npm install *.tgz --no-save
|
||||||
|
@ -2,19 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy ionic react dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/react/dist node_modules/@ionic/react/css
|
npm pack ../../../core
|
||||||
cp -a ../dist node_modules/@ionic/react/dist
|
|
||||||
cp -a ../css node_modules/@ionic/react/css
|
|
||||||
cp -a ../package.json node_modules/@ionic/react/package.json
|
|
||||||
|
|
||||||
# Copy ionic react router dist
|
# Pack @ionic/react
|
||||||
rm -rf node_modules/@ionic/react-router/dist
|
npm pack ../
|
||||||
cp -a ../../react-router/dist node_modules/@ionic/react-router/dist
|
|
||||||
cp -a ../../react-router/package.json node_modules/@ionic/react-router/package.json
|
|
||||||
|
|
||||||
# Copy core dist
|
# Pack @ionic/react-router
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../../react-router
|
||||||
cp -a ../../../core/dist node_modules/@ionic/core/dist
|
|
||||||
cp -a ../../../core/package.json node_modules/@ionic/core/package.json
|
# Install Dependencies
|
||||||
cp -a ../../../core/components node_modules/@ionic/core/components
|
npm install *.tgz --no-save
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy ionic vue dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/vue/dist node_modules/@ionic/vue/css
|
npm pack ../../core
|
||||||
cp -a ../vue/dist node_modules/@ionic/vue/dist
|
|
||||||
cp -a ../vue/css node_modules/@ionic/vue/css
|
|
||||||
cp -a ../vue/package.json node_modules/@ionic/vue/package.json
|
|
||||||
|
|
||||||
# Copy core dist
|
# Pack @ionic/vue
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../vue
|
||||||
cp -a ../../core/dist node_modules/@ionic/core/dist
|
|
||||||
cp -a ../../core/components node_modules/@ionic/core/components
|
# Pack @ionic/vue-router
|
||||||
cp -a ../../core/package.json node_modules/@ionic/core/package.json
|
npm pack ./
|
||||||
|
|
||||||
|
# Install Dependencies
|
||||||
|
npm install *.tgz --no-save
|
||||||
|
@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy core dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../../core
|
||||||
cp -a ../../core/dist node_modules/@ionic/core/dist
|
|
||||||
cp -a ../../core/components node_modules/@ionic/core/components
|
# Pack @ionic/vue
|
||||||
cp -a ../../core/package.json node_modules/@ionic/core/package.json
|
npm pack ./
|
||||||
|
|
||||||
|
# Pack @ionic/vue-router
|
||||||
|
npm pack ../vue-router
|
||||||
|
|
||||||
|
# Install Dependencies
|
||||||
|
npm install *.tgz --no-save
|
||||||
|
@ -2,19 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Copy ionic vue dist
|
# Pack @ionic/core
|
||||||
rm -rf node_modules/@ionic/vue/dist node_modules/@ionic/vue/css
|
npm pack ../../../../../core
|
||||||
cp -a ../../../dist node_modules/@ionic/vue/dist
|
|
||||||
cp -a ../../../css node_modules/@ionic/vue/css
|
|
||||||
cp -a ../../../package.json node_modules/@ionic/vue/package.json
|
|
||||||
|
|
||||||
# Copy ionic vue router dist
|
# Pack @ionic/vue
|
||||||
rm -rf node_modules/@ionic/vue-router/dist
|
npm pack ../../../
|
||||||
cp -a ../../../../vue-router/dist node_modules/@ionic/vue-router/dist
|
|
||||||
cp -a ../../../../vue-router/package.json node_modules/@ionic/vue-router/package.json
|
|
||||||
|
|
||||||
# Copy core dist and components
|
# Pack @ionic/vue-router
|
||||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
npm pack ../../../../vue-router
|
||||||
cp -a ../../../../../core/package.json node_modules/@ionic/core/package.json
|
|
||||||
cp -a ../../../../../core/dist node_modules/@ionic/core/dist
|
# Install Dependencies
|
||||||
cp -a ../../../../../core/components node_modules/@ionic/core/components
|
npm install *.tgz --no-save
|
||||||
|
Reference in New Issue
Block a user