Compare commits

...

24 Commits

Author SHA1 Message Date
Liam DeBeasi
02ef5ae179 5.9.3 2021-12-15 10:10:07 -05:00
Sean Perkins
4aab72b061 fix(vue): tabs no longer get unmounted when navigating back to a tabs context (#24337)
resolves #24332

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
2021-12-15 09:55:29 -05:00
Liam DeBeasi
9c9e28ccc9 perf(content): remove global click listener to improve interaction performance (#24360)
resolves #24359
2021-12-15 09:55:22 -05:00
Liam DeBeasi
1c2875044a fix(vue): improve query params handling in tabs (#24355)
resolves #24353
2021-12-15 09:55:05 -05:00
Liam DeBeasi
d665ace5c4 chore(): create 5.9.x history
chore(): create 5.9.x history
2021-12-08 09:06:27 -05:00
Liam DeBeasi
351c30ce42 merge release-5.8.5
Release 5.8.5
2021-10-27 09:15:12 -04:00
Liam DeBeasi
3b9b9082b8 merge release-5.8.2
Release 5.8.2
2021-10-06 10:24:24 -04:00
Liam DeBeasi
0774cca2cd merge release-5.8.1
Release 5.8.1
2021-09-22 10:48:57 -04:00
Liam DeBeasi
6c366aaf87 merge release-5.8.0
Release 5.8.0
2021-09-15 11:37:12 -04:00
Liam DeBeasi
6876fd089f merge release-5.7.0
Release 5.7.0
2021-09-01 10:07:42 -04:00
Liam DeBeasi
22a8842ac2 merge release-5.6.14
Release 5.6.14
2021-08-18 09:33:30 -04:00
Liam DeBeasi
2d5faa75db merge release-5.6.13
Release 5.6.13
2021-08-04 10:25:37 -04:00
Liam DeBeasi
cab2a5103f merge release-5.6.12
Release 5.6.12
2021-07-21 09:37:04 -04:00
Liam DeBeasi
d36050918a merge release-5.6.11
Release 5.6.11
2021-07-01 12:03:38 -04:00
Liam DeBeasi
64f128be07 merge release-5.6.10
Release 5.6.10
2021-06-22 10:01:58 -04:00
Liam DeBeasi
87999e3c7a merge release-5.6.9
Release 5.6.9
2021-06-08 09:38:37 -04:00
Liam DeBeasi
bb4554211d merge release-5.6.8
Release 5.6.8
2021-05-27 16:01:36 -04:00
Liam DeBeasi
f71109b088 merge release-5.6.7
Release 5.6.7
2021-05-13 10:00:26 -04:00
Liam DeBeasi
44e18bd795 merge release-5.6.6
Release 5.6.6
2021-04-29 10:31:45 -04:00
Liam DeBeasi
f4d265eb60 merge release-5.6.5
Release 5.6.5
2021-04-22 13:37:44 -04:00
Liam DeBeasi
1e8dfb7d85 merge release-5.6.4
Release 5.6.4
2021-04-08 13:14:26 -04:00
Liam DeBeasi
9f023c92c4 merge release-5.6.3
Release 5.6.3
2021-03-23 11:21:16 -04:00
Liam DeBeasi
694d47b794 merge release-5.6.2
Release 5.6.2
2021-03-22 17:07:08 -04:00
Liam DeBeasi
b87c555a6e merge release-5.6.1
Release 5.6.1
2021-03-18 09:36:55 -04:00
19 changed files with 147 additions and 57 deletions

View File

@@ -44,7 +44,7 @@ async function askNpmTag(version) {
type: 'list',
name: 'npmTag',
message: 'Select npm tag or specify a new tag',
choices: ['latest', 'next', 'v4-lts']
choices: ['latest', 'next', 'v4-lts', 'v5-lts']
.concat([
new inquirer.Separator(),
{

View File

@@ -1,3 +1,18 @@
## [5.9.3](https://github.com/ionic-team/ionic/compare/v5.9.2...v5.9.3) (2021-12-15)
### Bug Fixes
* **vue:** improve query params handling in tabs ([#24355](https://github.com/ionic-team/ionic/issues/24355)) ([1c28750](https://github.com/ionic-team/ionic/commit/1c2875044ad4d93fdca866017159a89f4dc8872d)), closes [#24353](https://github.com/ionic-team/ionic/issues/24353)
* **vue:** tabs no longer get unmounted when navigating back to a tabs context ([#24337](https://github.com/ionic-team/ionic/issues/24337)) ([4aab72b](https://github.com/ionic-team/ionic/commit/4aab72b06159729d2dcd18b2ef0b76f693e5a74e)), closes [#24332](https://github.com/ionic-team/ionic/issues/24332)
### Performance Improvements
* **content:** remove global click listener to improve interaction performance ([#24360](https://github.com/ionic-team/ionic/issues/24360)) ([9c9e28c](https://github.com/ionic-team/ionic/commit/9c9e28ccc9f899c403c757d911ac02d9099415af)), closes [#24359](https://github.com/ionic-team/ionic/issues/24359)
## [5.9.2](https://github.com/ionic-team/ionic/compare/v5.9.1...v5.9.2) (2021-12-07)

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/angular",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"dependencies": {
"@ionic/core": "5.9.1",
"@ionic/core": "5.9.2",
"tslib": "^1.9.3"
},
"devDependencies": {
@@ -204,9 +204,9 @@
}
},
"node_modules/@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"dependencies": {
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.3",
@@ -5156,9 +5156,9 @@
}
},
"@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"requires": {
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "5.9.2",
"version": "5.9.3",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
@@ -42,7 +42,7 @@
"validate": "npm i && npm run lint && npm run test && npm run build"
},
"dependencies": {
"@ionic/core": "5.9.2",
"@ionic/core": "5.9.3",
"tslib": "^1.9.3"
},
"peerDependencies": {

View File

@@ -1,12 +1,12 @@
{
"name": "@ionic/core",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/core",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"dependencies": {
"@stencil/core": "^2.4.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "5.9.2",
"version": "5.9.3",
"description": "Base components for Ionic",
"keywords": [
"ionic",

View File

@@ -119,14 +119,6 @@ export class Content implements ComponentInterface {
this.resize();
}
@Listen('click', { capture: true })
onClick(ev: Event) {
if (this.isScrolling) {
ev.preventDefault();
ev.stopPropagation();
}
}
private shouldForceOverscroll() {
const { forceOverscroll } = this;
const mode = getIonMode(this);

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "5.9.2",
"version": "5.9.3",
"description": "Pre-packaged API documentation for the Ionic docs.",
"main": "core.json",
"types": "core.d.ts",

View File

@@ -1,12 +1,12 @@
{
"name": "@ionic/angular-server",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular-server",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"devDependencies": {
"@angular/animations": "8.2.13",
@@ -16,7 +16,7 @@
"@angular/core": "8.2.13",
"@angular/platform-browser": "8.2.13",
"@angular/platform-server": "8.2.13",
"@ionic/core": "5.9.1",
"@ionic/core": "5.9.2",
"ng-packagr": "5.7.1",
"tslint": "^5.12.1",
"tslint-ionic-rules": "0.0.21",
@@ -137,9 +137,9 @@
}
},
"node_modules/@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"dev": true,
"dependencies": {
"@stencil/core": "^2.4.0",
@@ -5424,9 +5424,9 @@
}
},
"@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"dev": true,
"requires": {
"@stencil/core": "^2.4.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/angular-server",
"version": "5.9.2",
"version": "5.9.3",
"description": "Angular SSR Module for Ionic",
"keywords": [
"ionic",
@@ -49,7 +49,7 @@
"@angular/core": "8.2.13",
"@angular/platform-browser": "8.2.13",
"@angular/platform-server": "8.2.13",
"@ionic/core": "5.9.2",
"@ionic/core": "5.9.3",
"ng-packagr": "5.7.1",
"tslint": "^5.12.1",
"tslint-ionic-rules": "0.0.21",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/react-router",
"version": "5.9.2",
"version": "5.9.3",
"description": "React Router wrapper for @ionic/react",
"keywords": [
"ionic",
@@ -40,14 +40,14 @@
"tslib": "*"
},
"peerDependencies": {
"@ionic/react": "5.9.2",
"@ionic/react": "5.9.3",
"react": ">=16.8.6",
"react-dom": ">=16.8.6",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1"
},
"devDependencies": {
"@ionic/react": "5.9.2",
"@ionic/react": "5.9.3",
"@rollup/plugin-node-resolve": "^8.1.0",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/react",
"version": "5.9.2",
"version": "5.9.3",
"description": "React specific wrapper for @ionic/core",
"keywords": [
"ionic",
@@ -40,7 +40,7 @@
"css/"
],
"dependencies": {
"@ionic/core": "5.9.2",
"@ionic/core": "5.9.3",
"ionicons": "^5.1.2",
"tslib": "*"
},

View File

@@ -1,12 +1,12 @@
{
"name": "@ionic/vue-router",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue-router",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"devDependencies": {
"@ionic/vue": "5.4.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/vue-router",
"version": "5.9.2",
"version": "5.9.3",
"description": "Vue Router integration for @ionic/vue",
"scripts": {
"test.spec": "jest",

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/vue",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"dependencies": {
"@ionic/core": "5.9.1",
"@ionic/core": "5.9.2",
"ionicons": "^5.1.2"
},
"devDependencies": {
@@ -53,9 +53,9 @@
}
},
"node_modules/@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"dependencies": {
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.3",
@@ -633,9 +633,9 @@
}
},
"@ionic/core": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.1.tgz",
"integrity": "sha512-/jVO0N5ESs/iPFcrFZ/JFvW2Uh0ZV1uLFT2vtbtMfCaOMZK8Bmt36ZR1cDDFTuw14vPOLz/1wI2pbQru48JpkQ==",
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.9.2.tgz",
"integrity": "sha512-1ZqSBS8R6tGQsc+LsLxIRv0q3Ww6jwgJXLvdn6FmVWfpPbBvT+CjCuU9hqJ5qwM+atErblUMYSexvvpws8lGAA==",
"requires": {
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/vue",
"version": "5.9.2",
"version": "5.9.3",
"description": "Vue specific wrapper for @ionic/core",
"scripts": {
"lint": "echo add linter",
@@ -59,7 +59,7 @@
"vue-router": "^4.0.0-rc.4"
},
"dependencies": {
"@ionic/core": "5.9.2",
"@ionic/core": "5.9.3",
"ionicons": "^5.1.2"
},
"vetur": {

View File

@@ -14,6 +14,10 @@ import { AnimationBuilder, LIFECYCLE_DID_ENTER, LIFECYCLE_DID_LEAVE, LIFECYCLE_W
import { matchedRouteKey, routeLocationKey, useRoute } from 'vue-router';
import { fireLifecycle, generateId, getConfig } from '../utils';
const isViewVisible = (enteringEl: HTMLElement) => {
return !enteringEl.classList.contains('ion-page-hidden') && !enteringEl.classList.contains('ion-page-invisible');
}
let viewDepthKey: InjectionKey<0> = Symbol(0);
export const IonRouterOutlet = defineComponent({
name: 'IonRouterOutlet',
@@ -230,13 +234,35 @@ export const IonRouterOutlet = defineComponent({
See https://ionicframework.com/docs/vue/navigation#ionpage for more information.`);
}
if (enteringViewItem === leavingViewItem) return;
if (!leavingViewItem && prevRouteLastPathname) {
leavingViewItem = viewStacks.findViewItemByPathname(prevRouteLastPathname, id, usingDeprecatedRouteSetup);
}
/**
* If the entering view is already
* visible, then no transition is needed.
* This is most common when navigating
* from a tabs page to a non-tabs page
* and then back to the tabs page.
* Even when the tabs context navigated away,
* the inner tabs page was still active.
* This also avoids an issue where
* the previous tabs page is incorrectly
* unmounted since it would automatically
* unmount the previous view.
*
* This should also only apply to entering and
* leaving items in the same router outlet (i.e.
* Tab1 and Tab2), otherwise this will
* return early for swipe to go back when
* going from a non-tabs page to a tabs page.
*/
if (isViewVisible(enteringEl) && leavingViewItem !== undefined && !isViewVisible(leavingViewItem.ionPageElement)) {
return;
}
fireLifecycle(enteringViewItem.vueComponent, enteringViewItem.vueComponentRef, LIFECYCLE_WILL_ENTER);
if (leavingViewItem && enteringViewItem !== leavingViewItem) {

View File

@@ -113,7 +113,14 @@ export const IonTabBar = defineComponent({
* land on /tabs/tab1/child instead of /tabs/tab1.
*/
if (activeTab !== prevActiveTab || (prevHref !== currentRoute.pathname)) {
const search = (currentRoute.search !== undefined) ? `?${currentRoute.search}` : '';
/**
* By default the search is `undefined` in Ionic Vue,
* but Vue Router can set the search to the empty string.
* We check for truthy here because empty string is falsy
* and currentRoute.search cannot ever be a boolean.
*/
const search = (currentRoute.search) ? `?${currentRoute.search}` : '';
tabs[activeTab] = {
...tabs[activeTab],
currentHref: currentRoute.pathname + search

View File

@@ -305,7 +305,57 @@ describe('Tabs', () => {
cy.ionPageHidden('tab2');
cy.url().should('include', '/tabs/tab1/child-one?key=value');
})
});
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/24353
it('should handle clicking tab multiple times without query string', () => {
cy.visit('http://localhost:8080/tabs/tab1');
cy.ionPageVisible('tab1');
cy.get('ion-tab-button#tab-button-tab2').click();
cy.ionPageVisible('tab2');
cy.ionPageHidden('tab1');
cy.get('ion-tab-button#tab-button-tab1').click();
cy.ionPageVisible('tab1');
cy.ionPageHidden('tab2');
cy.get('ion-tab-button#tab-button-tab1').click();
cy.ionPageVisible('tab1');
cy.ionPageHidden('tab2');
cy.get('ion-tab-button#tab-button-tab2').click();
cy.ionPageVisible('tab2');
cy.ionPageHidden('tab1');
});
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/24332
it('should not unmount tab 1 when leaving tabs context', () => {
cy.visit('http://localhost:8080/tabs');
cy.ionPageVisible('tab1');
// Dynamically add tab 4 because tab 3 redirects to tab 1
cy.get('#add-tab').click();
cy.get('ion-tab-button#tab-button-tab4').click();
cy.ionPageHidden('tab1');
cy.ionPageVisible('tab4');
cy.get('ion-tab-button#tab-button-tab2').click();
cy.ionPageHidden('tab4');
cy.ionPageVisible('tab2');
cy.get('[data-pageid="tab2"] #routing').click();
cy.ionPageVisible('routing');
cy.ionPageHidden('tabs');
cy.ionBackClick('routing');
cy.ionPageDoesNotExist('routing');
cy.ionPageVisible('tabs');
cy.ionPageVisible('tab2');
cy.ionPageHidden('tab1');
});
})
describe('Tabs - Swipe to Go Back', () => {