mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-14 16:52:26 +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: v5.x
|
||||
- label: v6.x
|
||||
- label: v7.x
|
||||
- label: Nightly
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
log.txt
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
*.tgz
|
||||
|
||||
.idea/
|
||||
.vscode/
|
||||
|
@ -2,8 +2,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy core dist
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../core/components node_modules/@ionic/core/components
|
||||
cp -a ../core/package.json node_modules/@ionic/core/package.json
|
||||
# Pack @ionic/core
|
||||
npm pack ../core
|
||||
|
||||
# Pack @ionic/angular
|
||||
npm pack ./
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -2,19 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy angular dist
|
||||
rm -rf node_modules/@ionic/angular
|
||||
cp -a ../../../dist node_modules/@ionic/angular
|
||||
# Pack @ionic/core
|
||||
npm pack ../../../../core
|
||||
|
||||
# Copy angular server
|
||||
rm -rf node_modules/@ionic/angular-server
|
||||
cp -a ../../../../packages/angular-server/dist node_modules/@ionic/angular-server
|
||||
# Pack @ionic/angular
|
||||
npm pack ../../../dist
|
||||
|
||||
# # Copy core dist
|
||||
rm -rf node_modules/@ionic/core
|
||||
mkdir node_modules/@ionic/core
|
||||
cp -a ../../../../core/css node_modules/@ionic/core/css
|
||||
cp -a ../../../../core/dist node_modules/@ionic/core/dist
|
||||
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
|
||||
# Pack @ionic/angular-server
|
||||
npm pack ../../../../packages/angular-server/dist
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 type { LegacyFormController } from '@utils/forms';
|
||||
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.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-item>
|
||||
|
||||
<ion-select id="with-value" placeholder="With Value" value="bird"></ion-select>
|
||||
|
||||
<button id="set-contents" onclick="setContents()">Set Contents</button>
|
||||
|
||||
<script>
|
||||
let selects = document.querySelectorAll('ion-select');
|
||||
const options = ['bird', 'dog', 'shark', 'lizard'];
|
||||
|
||||
setTimeout(() => {
|
||||
const setContents = () => {
|
||||
selects.forEach((select) => {
|
||||
options.forEach((option) => {
|
||||
let o = document.createElement('ion-select-option');
|
||||
@ -58,10 +62,8 @@
|
||||
});
|
||||
|
||||
select.value = options[0];
|
||||
|
||||
window.dispatchEvent(new CustomEvent('selectValueSet'));
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,18 +1,24 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
// TODO: This test is extremely flaky
|
||||
test.skip('select: async', () => {
|
||||
test('should correctly set the value after a delay', async ({ page, skip }) => {
|
||||
test.describe('select: async', () => {
|
||||
test.beforeEach(async ({ page, skip }) => {
|
||||
skip.rtl('This is checking internal logic. RTL tests are not needed');
|
||||
skip.mode('md');
|
||||
|
||||
await page.goto(`/src/components/select/test/async`);
|
||||
const selectValueSet = await page.spyOnEvent('selectValueSet');
|
||||
|
||||
const select = await page.locator('#default');
|
||||
|
||||
await selectValueSet.next();
|
||||
});
|
||||
test('should correctly set the value after a delay', async ({ page }) => {
|
||||
const select = page.locator('#default');
|
||||
await page.click('#set-contents');
|
||||
|
||||
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 }) => {
|
||||
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(`
|
||||
<style>
|
||||
[hidden] {
|
||||
|
@ -2,19 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy ionic react dist
|
||||
rm -rf node_modules/@ionic/react/dist node_modules/@ionic/react/css
|
||||
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
|
||||
# Pack @ionic/core
|
||||
npm pack ../../../core
|
||||
|
||||
# Copy ionic react router dist
|
||||
rm -rf node_modules/@ionic/react-router/dist
|
||||
cp -a ../dist node_modules/@ionic/react-router/dist
|
||||
cp -a ../package.json node_modules/@ionic/react-router/package.json
|
||||
# Pack @ionic/react
|
||||
npm pack ../../react
|
||||
|
||||
# Copy core dist and components
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../../core/package.json node_modules/@ionic/core/package.json
|
||||
cp -a ../../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../../core/components node_modules/@ionic/core/components
|
||||
# Pack @ionic/react-router
|
||||
npm pack ../
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -2,19 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy ionic react dist
|
||||
rm -rf node_modules/@ionic/react/dist node_modules/@ionic/react/css
|
||||
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
|
||||
# Pack @ionic/core
|
||||
npm pack ../../../core
|
||||
|
||||
# Copy ionic react router dist
|
||||
rm -rf node_modules/@ionic/react-router/dist
|
||||
cp -a ../../react-router/dist node_modules/@ionic/react-router/dist
|
||||
cp -a ../../react-router/package.json node_modules/@ionic/react-router/package.json
|
||||
# Pack @ionic/react
|
||||
npm pack ../
|
||||
|
||||
# Copy core dist
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../../core/package.json node_modules/@ionic/core/package.json
|
||||
cp -a ../../../core/components node_modules/@ionic/core/components
|
||||
# Pack @ionic/react-router
|
||||
npm pack ../../react-router
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy ionic vue dist
|
||||
rm -rf node_modules/@ionic/vue/dist node_modules/@ionic/vue/css
|
||||
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
|
||||
# Pack @ionic/core
|
||||
npm pack ../../core
|
||||
|
||||
# Copy core dist
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../core/components node_modules/@ionic/core/components
|
||||
cp -a ../../core/package.json node_modules/@ionic/core/package.json
|
||||
# Pack @ionic/vue
|
||||
npm pack ../vue
|
||||
|
||||
# Pack @ionic/vue-router
|
||||
npm pack ./
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -2,8 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy core dist
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../core/components node_modules/@ionic/core/components
|
||||
cp -a ../../core/package.json node_modules/@ionic/core/package.json
|
||||
# Pack @ionic/core
|
||||
npm pack ../../core
|
||||
|
||||
# Pack @ionic/vue
|
||||
npm pack ./
|
||||
|
||||
# Pack @ionic/vue-router
|
||||
npm pack ../vue-router
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
@ -2,19 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Copy ionic vue dist
|
||||
rm -rf node_modules/@ionic/vue/dist node_modules/@ionic/vue/css
|
||||
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
|
||||
# Pack @ionic/core
|
||||
npm pack ../../../../../core
|
||||
|
||||
# Copy ionic vue router dist
|
||||
rm -rf node_modules/@ionic/vue-router/dist
|
||||
cp -a ../../../../vue-router/dist node_modules/@ionic/vue-router/dist
|
||||
cp -a ../../../../vue-router/package.json node_modules/@ionic/vue-router/package.json
|
||||
# Pack @ionic/vue
|
||||
npm pack ../../../
|
||||
|
||||
# Copy core dist and components
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../../../../core/package.json node_modules/@ionic/core/package.json
|
||||
cp -a ../../../../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../../../../core/components node_modules/@ionic/core/components
|
||||
# Pack @ionic/vue-router
|
||||
npm pack ../../../../vue-router
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
|
Reference in New Issue
Block a user