diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 52d27b7d9d..12f9f4516d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,30 +13,7 @@ * @ionic-team/framework -# Frameworks - -## Angular - -/packages/angular/ @sean-perkins @thetaPC -/packages/angular-server @sean-perkins @thetaPC -/packages/angular/test @thetaPC - -## Vue - -/packages/vue/ @thetaPC -/packages/vue-router/ @liamdebeasi @thetaPC -/packages/vue/test/ @thetaPC -/packages/vue-router/__tests__ @thetaPC - -# Components - -/core/src/components/datetime/ @sean-perkins - -/core/src/components/nav/ @sean-perkins -/core/src/components/nav-link/ @sean-perkins - # Utilities -/core/src/utils/content/ @sean-perkins /core/src/utils/gesture/ @liamdebeasi /core/src/utils/input-shims/ @liamdebeasi diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c565dcac8c..29910b7b2b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,7 @@ Issue number: resolves # If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. - 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. + 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> diff --git a/README.md b/README.md index 3ca6f6ca97..091377a155 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Ionic Framework is released under the MIT license. - + PRs welcome! @@ -38,7 +38,7 @@ Documentation ยท - Contribute + Contribute ยท Blog
@@ -88,7 +88,7 @@ The Ionic Conference App is a full featured Ionic app. It is the perfect startin ### Contributing Thanks for your interest in contributing! Read up on our guidelines for -[contributing](https://github.com/ionic-team/ionic/blob/main/.github/CONTRIBUTING.md) +[contributing](https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md) and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label. diff --git a/core/api.txt b/core/api.txt index 9e98c453fa..77fb356712 100644 --- a/core/api.txt +++ b/core/api.txt @@ -550,7 +550,7 @@ ion-infinite-scroll-content,prop,loadingText,IonicSafeString | string | undefine ion-input,scoped ion-input,prop,autocapitalize,string,'off',false,false -ion-input,prop,autocomplete,"name" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo",'off',false,false +ion-input,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo",'off',false,false ion-input,prop,autocorrect,"off" | "on",'off',false,false ion-input,prop,autofocus,boolean,false,false,false ion-input,prop,clearInput,boolean,false,false,false @@ -1175,7 +1175,7 @@ ion-row,shadow ion-searchbar,scoped ion-searchbar,prop,animated,boolean,false,false,false ion-searchbar,prop,autocapitalize,string,'off',false,false -ion-searchbar,prop,autocomplete,"name" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo",'off',false,false +ion-searchbar,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo",'off',false,false ion-searchbar,prop,autocorrect,"off" | "on",'off',false,false ion-searchbar,prop,cancelButtonIcon,string,config.get('backButtonIcon', arrowBackSharp) as string,false,false ion-searchbar,prop,cancelButtonText,string,'Cancel',false,false diff --git a/core/package-lock.json b/core/package-lock.json index 7e295ff06a..ea4abd6943 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1759,9 +1759,9 @@ } }, "node_modules/@stencil/core": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.13.0.tgz", - "integrity": "sha512-gg+gtBWekQ08mDja8GVAUHNu+rrFhQaKZDvfhnS3l/5JbYiJddTimuDPPhuc0sR0JZL1iRdJTJSa+JbvmnQ1cQ==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.14.0.tgz", + "integrity": "sha512-+s0u/KsNolXZ7tC2hEMgMA3jaNaqOhZvYKwSzjQbc0Wv+cB481Isxzo7ifgEWRYqsJzNSyqhO6cyu/EJrGGTdg==", "bin": { "stencil": "bin/stencil" }, @@ -11229,9 +11229,9 @@ "requires": {} }, "@stencil/core": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.13.0.tgz", - "integrity": "sha512-gg+gtBWekQ08mDja8GVAUHNu+rrFhQaKZDvfhnS3l/5JbYiJddTimuDPPhuc0sR0JZL1iRdJTJSa+JbvmnQ1cQ==" + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.14.0.tgz", + "integrity": "sha512-+s0u/KsNolXZ7tC2hEMgMA3jaNaqOhZvYKwSzjQbc0Wv+cB481Isxzo7ifgEWRYqsJzNSyqhO6cyu/EJrGGTdg==" }, "@stencil/react-output-target": { "version": "0.5.3", diff --git a/core/package.json b/core/package.json index ada8848e56..36787cf0a9 100644 --- a/core/package.json +++ b/core/package.json @@ -77,7 +77,7 @@ "build.docs.json": "stencil build --docs-json dist/docs.json", "clean": "node scripts/clean.js", "css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css", - "css.sass": "sass --embed-sources src/css:./css", + "css.sass": "sass --embed-sources --style compressed src/css:./css", "eslint": "eslint src", "lint": "npm run lint.ts && npm run lint.sass && npm run prettier -- --write --cache", "lint.fix": "npm run lint.ts.fix && npm run lint.sass.fix && npm run prettier -- --write --cache", diff --git a/core/scripts/readme.md b/core/scripts/readme.md index 1611f4bccd..2b5b55f748 100644 --- a/core/scripts/readme.md +++ b/core/scripts/readme.md @@ -1,44 +1,4 @@ -## Build +# Core Scripts -### 1. Clone ionic - - git@github.com:ionic-team/ionic.git - cd ionic - -### 2. Run `npm install` - - cd core - npm install - - -Notice that `@ionic/core` lives in `core`. - -### 3. Run `npm start` - -Make sure you are inside the `core` directory. - - npm start - -With the `dev` command, Ionic components will be built with [Stencil](https://stenciljs.com/), changes to source files are watched, a local http server will startup, and http://localhost:3333/ will open in a browser. - -### 4. Preview - -Navigate to http://localhost:3333/src/components/. Each component has small e2e apps found in the `test` directory, for example: http://localhost:3333/src/components/button/test/basic - -As changes are made in an editor to source files, the e2e app will live-reload. - -## How to contribute - -1. `npm start` allows you to modify the components and have live reloading, just like another ionic app. - -2. When everything looks good, run `npm run validate` to verify the tests linter and production build passes. - - -# Deploy - -1. `npm run prepare.deploy` -2. Review/update changelog -3. Commit updates using the package name and version number as the commit message. -4. `npm run deploy` -5. :tada: +This file has been moved to [/docs/core/testing/preview-changes.md](/docs/core/testing/preview-changes.md). diff --git a/core/src/components/button/button.ios.scss b/core/src/components/button/button.ios.scss index b3d5e21488..669edc7f5f 100644 --- a/core/src/components/button/button.ios.scss +++ b/core/src/components/button/button.ios.scss @@ -149,7 +149,20 @@ } ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1.125em; + /** + * The values were provided through a native iOS app. + * min font size: 15px, default font size: 18px, max font size: 43px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 16px + * (derived from rem), then the base size can use the default font + * size of the icon. + */ + font-size: dynamic-font-clamp(0.84, 18px, 2.39, 1em); } :host(.button-small.button-has-icon-only) { @@ -157,11 +170,23 @@ min-width: clamp(23px, 2.16em, 54px); // TODO(FW-6053): replace em value with the min-height variable. min-height: clamp(23px, 2.16em, 54px); - } :host(.button-small) ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1.4em; + /** + * The values were provided through a native iOS app. + * min font size: 12px, default font size: 17px, max font size: 40px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 13px + * (derived from rem) and the default font size of the icon is + * 17px, then the base size would need to be increased. + */ + font-size: dynamic-font-clamp(0.58, 20.93px, 1.92, 1em); } :host(.button-large.button-has-icon-only) { @@ -172,7 +197,20 @@ } :host(.button-large) ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1em; + /** + * The values were provided through a native iOS app. + * min font size: 15px, default font size: 18px, max font size: 43px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 20px + * (derived from rem) and the default font size of the icon is + * 18px, then the base size would need to be decreased. + */ + font-size: dynamic-font-clamp(1.05, 14.4px, 2.99, 1em); } // iOS Button Focused diff --git a/core/src/components/button/button.md.scss b/core/src/components/button/button.md.scss index 556cc78028..c541d5b34b 100644 --- a/core/src/components/button/button.md.scss +++ b/core/src/components/button/button.md.scss @@ -142,7 +142,21 @@ } ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1.6em; + /** + * The values were provided through MD design, + * large and small are based on the iOS sizes. + * min font size: 15px, default font size: 22.4px, max font size: 43px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 14px + * (derived from rem) and the default font size of the icon is + * 22.4px, then the base size would need to be increased. + */ + font-size: dynamic-font-clamp(0.59, 25.6px, 1.68, 1em); } :host(.button-small.button-has-icon-only) { @@ -153,7 +167,21 @@ } :host(.button-small) ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1.23em; + /** + * The values were provided through MD design, + * large and small are based on the iOS sizes. + * min font size: 12px, default font size: 16px, max font size: 40px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 13px + * (derived from rem) and the default font size of the icon is + * 16px, then the base size would need to be increased. + */ + font-size: dynamic-font-clamp(0.66, 19.7px, 2.05, 1em); } :host(.button-large.button-has-icon-only) { @@ -164,7 +192,21 @@ } :host(.button-large) ::slotted(ion-icon[slot="icon-only"]) { - font-size: 1.4em; + /** + * The values were provided through MD design, + * large and small are based on the iOS sizes. + * min font size: 15px, default font size: 28px, max font size: 43px + * + * Since the `ion-button` uses `rem` for the font size, we can't + * just pass the desired icon font size in `em` to the ` + * dynamic-font-clamp`. Instead, we need to adjust the base size + * to account for the ion-button` font size. + * + * For example, if the default font size of `ion-button` is 20px + * (derived from rem) and the default font size of the icon is + * 28px, then the base size would need to be increased. + */ + font-size: dynamic-font-clamp(0.67, 22.4px, 1.92, 1em); } // Material Design Button: Hover diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Chrome-linux.png index 99343bf67b..d5efe7c4a4 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Firefox-linux.png index 381c1c8650..e50cab32bc 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Safari-linux.png index 5d58d23a10..b3d7a18230 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Chrome-linux.png index eaab63f282..1eae84b14c 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Firefox-linux.png index 26d658853e..ae08b4294a 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Safari-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Safari-linux.png index 4632a4cab8..ff3d616e4c 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Chrome-linux.png index 85dd907f2f..84660852e2 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Firefox-linux.png index ed51e623bc..04e885ee1e 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Safari-linux.png index 61670430f7..ca19dbabff 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Chrome-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Chrome-linux.png index 477ae42f92..959dfd5b0e 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Firefox-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Firefox-linux.png index bb58587c5f..1f19d40377 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Safari-linux.png b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Safari-linux.png index effa8dfac4..ce8d1dfe21 100644 Binary files a/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Safari-linux.png and b/core/src/components/button/test/icon/button.e2e.ts-snapshots/button-icon-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Chrome-linux.png index 8ddf3c4d2c..556ec23e11 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Firefox-linux.png index 740dc013de..1f5088849b 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Safari-linux.png index 23366f1336..1c36a133c9 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Chrome-linux.png index 0d4f2cedcc..23e3f7c891 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Firefox-linux.png index dfced59ebb..1cd6e3d2c0 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Safari-linux.png index 64abd2f067..a13bf52845 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-clear-round-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Chrome-linux.png index 662c58ce0b..97edfd5f15 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Firefox-linux.png index 626798b2ba..b9ef4ecddd 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Safari-linux.png index 77a49a72a1..8990d8923d 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Chrome-linux.png index 59cddc74d5..8991db1534 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Firefox-linux.png index 46a0045606..df18062cb6 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Safari-linux.png index 0cff4c94b5..be1a35da11 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-outline-round-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Chrome-linux.png index 462ae469f4..7163200538 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Firefox-linux.png index 5b90f069bd..d3a4acb8d0 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Safari-linux.png index 98fcc46aea..340373c07d 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Chrome-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Chrome-linux.png index dd97f87f42..ed6c7d7e66 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Firefox-linux.png index ca027b9d82..242dbb68dc 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Safari-linux.png b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Safari-linux.png index f56460f727..4dddfcee33 100644 Binary files a/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Safari-linux.png and b/core/src/components/button/test/round/button.e2e.ts-snapshots/button-round-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Chrome-linux.png index 770e0c652d..f11e0f51ef 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Firefox-linux.png index 1cdfcd8854..196333c09a 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Safari-linux.png index a590c0ba1f..18e11aae11 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Chrome-linux.png index f7f6a26efb..3200bbdce4 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Firefox-linux.png index 22d3d3f24b..189ab25df8 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Safari-linux.png index 79eb585174..b9bb2b2bea 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Chrome-linux.png index 2225e3fe0c..916838f815 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Firefox-linux.png index 48e4f420f6..721cb14b88 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Safari-linux.png index ddd83d8d1b..a61791694c 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Chrome-linux.png index f225b7516b..73e553a9cf 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Firefox-linux.png index 8d311895bb..fbf6bdee3b 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Safari-linux.png index 13c715aa8f..3e40b653e8 100644 Binary files a/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/buttons/item.e2e.ts-snapshots/item-buttons-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Chrome-linux.png index 6d704b6987..9c0501ad91 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Firefox-linux.png index 76f65167b1..9e820d4224 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Safari-linux.png index b584c99992..0dac9ac872 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Chrome-linux.png index e0c3f694f4..e5f96acf60 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Firefox-linux.png index c8d7d6da90..2f544ff2cf 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Safari-linux.png index 07ea2cb150..c059563bd1 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Chrome-linux.png index f7d541a7e7..52f6ad5b78 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Firefox-linux.png index 6892db02e1..0ccc7e7a2a 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Safari-linux.png index 4c88ad917d..d9f9d2d6e0 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Chrome-linux.png index cfbbcbe8c0..c857d85f59 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Firefox-linux.png index 3e0038f7d2..ddee48745e 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Safari-linux.png index f9dc7ddd4d..2a4791e46b 100644 Binary files a/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/dividers/item.e2e.ts-snapshots/item-dividers-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/utils/test/playwright/docs/README.md b/core/src/utils/test/playwright/docs/README.md index b3a30efe7c..02797e2ab3 100644 --- a/core/src/utils/test/playwright/docs/README.md +++ b/core/src/utils/test/playwright/docs/README.md @@ -1,11 +1,3 @@ # Ionic E2E Tests Guide -This directory contains information on how to get the most out of Ionic's E2E test infrastructure when writing tests. - -## Directory - -| Directory | Description | -| - | - | -| [Usage Instructions](./usage-instructions.md) | How to run tests and update screenshots | -| [Best Practices](./best-practices.md) | Contains information on conventions to follow as well as pitfalls to avoid when writing tests | -| [API](./api.md) | Documents the custom functionality that has been built on top of Playwright | \ No newline at end of file +Refer to the [Core Testing documentation](/docs/core/testing/README.md) in order to build and run the e2e tests. diff --git a/.github/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 93% rename from .github/CONTRIBUTING.md rename to docs/CONTRIBUTING.md index e20ec3194f..c6324e90a1 100644 --- a/.github/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,10 +1,11 @@ # Contributing -Thanks for your interest in contributing to the Ionic Framework! :tada: +Thanks for your interest in contributing to the Ionic Framework! ๐ŸŽ‰ - [Contributing Etiquette](#contributing-etiquette) - [Creating an Issue](#creating-an-issue) * [Creating a Good Code Reproduction](#creating-a-good-code-reproduction) +- [Using VS Code on Windows](#using-vs-code-on-windows) - [Creating a Pull Request](#creating-a-pull-request) * [Requirements](#requirements) * [Setup](#setup) @@ -81,6 +82,19 @@ Without a reliable code reproduction, it is unlikely we will be able to resolve * **No secret code needed:** Creating a minimal reproduction of the issue prevents you from having to publish any proprietary code used in your project. * **Get help fixing the issue:** If we can reliably reproduce an issue, there is a good chance we will be able to address it. +## Using VS Code on Windows + +To contribute on Windows, do the following: + +- Configure VS Code to read/save files using line breaks (LF) instead of carriage returns (CRLF). Set it globally by navigating to: Settings -> Text Editor -> Files -> Eol. Set to `\n`. + + - You can optionally use the following settings in your `.vscode/settings.json`: + ```json + { "files.eol": "\n" } + ``` + +- Check that the Git setting `core.autocrlf` is set to `false`: run `git config -l | grep autocrlf`. Switch it to false using: `git config --global core.autocrlf false`. +- If you've already cloned the `ionic-framework` repo, the files may already be cached as LF. To undo this, you need to clean the cache files of the repository. Run the following (make sure you stage or commit your changes first): `git rm --cached -r .` then `git reset --hard`. ## Creating a Pull Request @@ -246,6 +260,14 @@ npm install file:/~/ionic-vue-router-7.0.1.tgz #### Lint Changes +> [!IMPORTANT] +> If you are using a Windows machine, you will need to configure your local development environment to use the correct line endings. +> - Check that the Git setting `core.autocrlf` is set to `false`: run `git config -l | grep autocrlf`. Switch it to false using: `git config --global core.autocrlf false`. +> - If you've already cloned the `ionic-docs` repo, the files may already be cached as LF. To undo this, you need to clean the cache files of the repository. Run the following (make sure you stage or commit your changes first): `git rm --cached -r .` then `git reset --hard`. + + + + 1. Run `npm run lint` to lint the TypeScript and Sass. 2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not. 3. To lint and fix only TypeScript errors, run `npm run lint.ts` and `npm run lint.ts.fix`, respectively. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..85cbbc9422 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,36 @@ +

+ Ionic Logo +

+ +

+ Ionic Framework Developer Resources +

+ +

+ This documentation includes guidelines on contributing, coding conventions, best practices, testing steps, and more. It should serve as a collective resource for all documentation related to developing Ionic Framework. +

+ +## What is Ionic Framework? + +Ionic Framework is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase with JavaScript and the Web. + +It is based on Web Components, which enables significant performance, usability, and feature improvements alongside support for popular web frameworks like Angular, React, and Vue. + +## Guides + +| Guide | Description | +| ----------------------------------------| ---------------------------------------------------------------------------------------- | +| [Contributing](./CONTRIBUTING.md) | How to contribute including creating pull requests, commit message guidelines, and more. | +| [Component Guide](./component-guide.md) | Guidelines for implementing component states, accessibility, and more. | +| [Sass Guidelines](./sass-guidelines.md) | Outlines scenarios where Sass members and comments should be used. | + +## Packages + +| Project | Package | Documentation | Guides | +| ---------------- | -------------------------------------------------------------------------- | ---------------------------------| ----------------------------------------------------------------- | +| **Core** | [`@ionic/core`](https://www.npmjs.com/package/@ionic/core) | [Readme](core/README.md) | [Testing](core/testing/README.md) | +| **Angular** | [`@ionic/angular`](https://www.npmjs.com/package/@ionic/angular) | [Readme](angular/README.md) | [Testing](angular/testing.md) | +| **React** | [`@ionic/react`](https://www.npmjs.com/package/@ionic/react) | [Readme](react/README.md) | [Testing](react/testing.md) | +| **React Router** | [`@ionic/react-router`](https://www.npmjs.com/package/@ionic/react-router) | [Readme](react-router/README.md) | [Testing](react-router/testing.md) | +| **Vue** | [`@ionic/vue`](https://www.npmjs.com/package/@ionic/vue) | [Readme](vue/README.md) | [Testing](vue/testing.md) | +| **Vue Router** | [`@ionic/vue-router`](https://www.npmjs.com/package/@ionic/vue-router) | [Readme](vue-router/README.md) | [Testing](vue-router/testing.md) | diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000000..7b20f622ba --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,2 @@ +name: Ionic Framework +include: [ CONTRIBUTING.md ] diff --git a/docs/angular/README.md b/docs/angular/README.md new file mode 100644 index 0000000000..357afb4123 --- /dev/null +++ b/docs/angular/README.md @@ -0,0 +1,11 @@ +# Ionic Angular + +The [@ionic/angular](https://www.npmjs.com/package/@ionic/angular) package builds on top of [@ionic/core](https://www.npmjs.com/package/@ionic/core) components. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [Angular Testing documentation](./testing.md) for testing the Angular package. diff --git a/docs/angular/testing.md b/docs/angular/testing.md new file mode 100644 index 0000000000..dee9678da7 --- /dev/null +++ b/docs/angular/testing.md @@ -0,0 +1,118 @@ +# Angular Testing + +Ionic Framework supports multiple versions of Angular. As a result, we need to verify that Ionic works correctly with each of these Angular versions. + +## Syncing Local Changes + +The Angular test app supports syncing your locally built changes for validation. + +1. Build the `core` and `packages/angular` directories using `npm run build`. +2. [Build the Angular test app](#test-app-build-structure). +3. Navigate to the built test app directory (e.g. `packages/angular/test/build/ng14`). +4. Install dependencies using `npm install`. +5. Sync your local changes using `npm run sync`. + +From here you can either build the application or start a local dev server. When re-syncing changes, you will need to [wipe or disable the application cache](#application-cache). + +## Application Cache + +Angular CLI creates a cache of several files on disk by default in the `.angular` directory. This decreases the time taken to build the test application. However, the cache makes it difficult to quickly sync and check local changes of Ionic. As a result, the `.angular` cache is disabled by default in the test app projects. + +See https://angular.io/cli/cache for more information. + +### Disable Cache + +```shell +ng cache disable +``` + +> [!NOTE] +> You may need to manually remove the `.angular` directory once after running this command. + +### Enable Cache + +```shell +ng cache enable +``` + +> [!NOTE] +> You will need to delete the `.angular` cache and restart the dev server every time you want to sync local changes of Ionic. + +## Test App Build Structure + +> [!NOTE] +> Please confirm your current directory as `packages/angular/test` before proceeding with any of the following commands. + +Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. + +**apps** - This directory contains partial applications for each version of Angular we want to test. Typically these directories contain new `package.json` files, `angular.json` files, and more. If you have code that is specific to a particular version of Angular, put it in this directory. + +**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. + +**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. + +**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. + +Usage: + +```shell +# Build a test app using apps/ng14 as a reference +./build.sh ng14 +``` + +## How to modify test apps + +To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. + +If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.spec.ts` in `apps/ng14`, make sure you place the file in `apps/ng14/e2e/src/test.spec.ts`. + +### Version-specific tests + +If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. + +### Testing Lazy Loaded Ionic Components + +Tests for lazy loaded Ionic UI components should only be added under the `/lazy` route. This ensures the `IonicModule` is added. + +### Testing Standalone Ionic Components + +Tests for standalone Ionic UI components should only be added under the `/standalone` route. This allows for an isolated environment where the lazy loaded `IonicModule` is not initialized. The standalone components use Stencil's custom element bundle instead of the lazy loaded bundle. If `IonicModule` is initialized then the Stencil components will fall back to using the lazy loaded implementation instead of the custom elements bundle implementation. + +## Adding New Test Apps + +As we add support for new versions of Angular, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: + +1. Navigate to the built app for the most recent version of Angular that Ionic tests. +2. Update the application by following the steps on https://update.angular.io/. +3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, `angular.json`, etc). +4. Copy the changed files to a new directory in `apps`. +5. Add a new entry to the matrix for `test-core-angular` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. +6. Commit these changes and push. + +Example: + +In this example, we are going to add the Angular 14 test app. + +1. Build the Angular 13 test app using `./build.sh ng13`. +2. Navigate to `build/ng13`. +3. Perform the upgrade steps on https://update.angular.io/. The "From" field should say "13.0" and the "To" field should say "14.0". + +Note: You may encounter some other peer dependency issues not covered by the Angular Upgrade Guide. These peer dependency issues can be resolved manually by updating the installed version of each dependency. + +4. Observe that the output of the Angular upgrade indicates that the following files were modified: + +`angular.json` +`package-lock.json` +`package.json` +`tsconfig.json` +`src/app/form/form.component.ts` +`src/app/modal-example/modal-example.component.ts` + +5. Create a directory in `apps` named `ng14`. +6. Copy the modified files to the `apps/ng14` directory. +7. Open `./github/workflows/build.yml` and find the `test-angular-e2e` job. +8. Find the `apps` field under `matrix`. +9. Add "ng14" to the `apps` field. +10. Open `./github/workflows/stencil-nightly.yml` and find the `test-angular-e2e` job. +11. Repeat steps 8 and 9. +12. Commit these changes and push. diff --git a/.github/COMPONENT-GUIDE.md b/docs/component-guide.md similarity index 99% rename from .github/COMPONENT-GUIDE.md rename to docs/component-guide.md index c4f4979880..0b0bdf490d 100644 --- a/.github/COMPONENT-GUIDE.md +++ b/docs/component-guide.md @@ -728,7 +728,7 @@ To work around this, you should set an RTL class on the host of your component a ... diff --git a/docs/core/README.md b/docs/core/README.md new file mode 100644 index 0000000000..17e99262d3 --- /dev/null +++ b/docs/core/README.md @@ -0,0 +1,11 @@ +# Ionic Core + +The [@ionic/core](https://www.npmjs.com/package/@ionic/core) package contains the Web Components that make up the reusable UI building blocks of Ionic Framework. These components are designed to be used in traditional frontend view libraries/frameworks (such as React, Angular, or Vue), or on their own through traditional JavaScript in the browser. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [Core Testing documentation](./testing/README.md) for testing the Core package. diff --git a/docs/core/testing/README.md b/docs/core/testing/README.md new file mode 100644 index 0000000000..bdf96b4007 --- /dev/null +++ b/docs/core/testing/README.md @@ -0,0 +1,13 @@ + +# Core Testing + +## Directory + +| Directory | Description | +| --------------------------------------------- | --------------------------------------------------------------------------------------------- | +| [Preview Changes](./preview-changes.md) | Steps on building core and previewing changes | +| [Usage Instructions](./usage-instructions.md) | How to run tests and update screenshots | +| [Best Practices](./best-practices.md) | Contains information on conventions to follow as well as pitfalls to avoid when writing tests | +| [API](./api.md) | Documents the custom functionality that has been built on top of Playwright | + + diff --git a/core/src/utils/test/playwright/docs/api.md b/docs/core/testing/api.md similarity index 100% rename from core/src/utils/test/playwright/docs/api.md rename to docs/core/testing/api.md diff --git a/core/src/utils/test/playwright/docs/best-practices.md b/docs/core/testing/best-practices.md similarity index 100% rename from core/src/utils/test/playwright/docs/best-practices.md rename to docs/core/testing/best-practices.md diff --git a/docs/core/testing/preview-changes.md b/docs/core/testing/preview-changes.md new file mode 100644 index 0000000000..e1fc4a6f87 --- /dev/null +++ b/docs/core/testing/preview-changes.md @@ -0,0 +1,29 @@ +# Preview Changes + +## Build + +### 1. Clone ionic + + git clone https://github.com/ionic-team/ionic-framework.git + cd ionic-framework + +### 2. Run `npm install` + + cd core + npm install + +Notice that `@ionic/core` lives in `core`. + +### 3. Run `npm start` + +Make sure you are inside the `core` directory. + + npm start + +With the `start` command, Ionic components will be built with [Stencil](https://stenciljs.com/), changes to source files are watched, a local http server will startup, and [http://localhost:3333/](http://localhost:3333/) will open in a browser. + +### 4. Preview + +Navigate to [http://localhost:3333/src/components/](http://localhost:3333/src/components/). Each component has small e2e apps found in the `test` directory, for example: [http://localhost:3333/src/components/button/test/basic](http://localhost:3333/src/components/button/test/basic) + +As changes are made in an editor to source files, the e2e app will live-reload. diff --git a/core/src/utils/test/playwright/docs/usage-instructions.md b/docs/core/testing/usage-instructions.md similarity index 100% rename from core/src/utils/test/playwright/docs/usage-instructions.md rename to docs/core/testing/usage-instructions.md diff --git a/docs/react-router/README.md b/docs/react-router/README.md new file mode 100644 index 0000000000..4ef96223a6 --- /dev/null +++ b/docs/react-router/README.md @@ -0,0 +1,11 @@ +# Ionic React Router + +The [@ionic/react-router](https://www.npmjs.com/package/@ionic/react-router) package is the routing integration for [@ionic/react](https://www.npmjs.com/package/@ionic/react). It uses the [React Router](https://github.com/remix-run/react-router) library beneath the surface. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [React Router Testing documentation](./testing.md) for testing the React Router package. diff --git a/docs/react-router/testing.md b/docs/react-router/testing.md new file mode 100644 index 0000000000..d0dd1f4944 --- /dev/null +++ b/docs/react-router/testing.md @@ -0,0 +1,55 @@ +# React Router Testing + +Ionic Framework supports multiple versions of React Router. As a result, we need to verify that Ionic works correctly with each of these React Router versions. + +## Syncing Local Changes + +The React test app supports syncing your locally built changes for validation. + +1. Build the `@ionic/core`, `@ionic/react`, and `@ionic/react-router` projects using `npm run build`. +2. [Build the React test app](#test-app-build-structure). +3. Navigate to the built test app. +4. Install dependencies using `npm install`. +5. Sync your local changes using `npm run sync`. + +From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. + +## Test App Build Structure + +Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. + +**apps** - This directory contains partial applications for each version of React we want to test. Typically these directories contain new `package.json` files, `cypress.config.ts` files, and more. If you have code that is specific to a particular version of React, put it in this directory. + +**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. + +**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. + +**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. + +Usage: + +```shell +# Build a test app using apps/reactrouter5 as a reference +./build.sh reactrouter5 +``` + +## How to modify test apps + +To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. + +If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/reactrouter5`, make sure you place the file in `apps/react17/tests/e2e/test.e2e.ts`. + +### Version-specific tests + +If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. + +## Adding New Test Apps + +As we add support for new versions of React Router, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: + +1. Navigate to the built app for the most recent version of React Router that Ionic tests. +2. Update the application to the latest version of React Router. +3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). +4. Copy the changed files to a new directory in `apps`. +5. Add a new entry to the matrix for `test-react-router-e2e` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. +6. Commit these changes and push. diff --git a/docs/react/README.md b/docs/react/README.md new file mode 100644 index 0000000000..12d33523d8 --- /dev/null +++ b/docs/react/README.md @@ -0,0 +1,11 @@ +# Ionic React + +The [@ionic/react](https://www.npmjs.com/package/@ionic/react) package builds on top of [@ionic/core](https://www.npmjs.com/package/@ionic/core) components. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [React Testing documentation](./testing.md) for testing the React package. diff --git a/docs/react/testing.md b/docs/react/testing.md new file mode 100644 index 0000000000..1c9da9c682 --- /dev/null +++ b/docs/react/testing.md @@ -0,0 +1,55 @@ +# React Testing + +Ionic Framework supports multiple versions of React. As a result, we need to verify that Ionic works correctly with each of these React versions. + +## Syncing Local Changes + +The React test app supports syncing your locally built changes for validation. + +1. Build the `core`, `packages/react`, and `packages/react-router` directories using `npm run build`. +2. [Build the React test app](#test-app-build-structure). +3. Navigate to the built test app. +4. Install dependencies using `npm install`. +5. Sync your local changes using `npm run sync`. + +From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. + +## Test App Build Structure + +Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. + +**apps** - This directory contains partial applications for each version of React we want to test. Typically these directories contain new `package.json` files, `cypress.config.ts` files, and more. If you have code that is specific to a particular version of React, put it in this directory. + +**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. + +**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. + +**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. + +Usage: + +```shell +# Build a test app using apps/react17 as a reference +./build.sh react17 +``` + +## How to modify test apps + +To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. + +If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/react17`, make sure you place the file in `apps/react17/tests/e2e/test.e2e.ts`. + +### Version-specific tests + +If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. + +## Adding New Test Apps + +As we add support for new versions of React, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: + +1. Navigate to the built app for the most recent version of React that Ionic tests. +2. Update the application to the latest version of React. +3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). +4. Copy the changed files to a new directory in `apps`. +5. Add a new entry to the matrix for `test-react-e2e` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. +6. Commit these changes and push. diff --git a/docs/sass-guidelines.md b/docs/sass-guidelines.md new file mode 100644 index 0000000000..d97ec11dac --- /dev/null +++ b/docs/sass-guidelines.md @@ -0,0 +1,685 @@ +# Sass Guidelines + +- [Definitions](#definitions) +- [Scope](#scope) +- [Historical Usage](#historical-usage) +- [Current Usage](#current-usage) +- [Recommended Usage](#recommended-usage) + * [Comments](#comments) + * [Variables](#variables) + + [โœ… Global](#-global) + + [โœ… Theming](#-theming) + + [โœ… Reusable values](#-reusable-values) + + [โœ… Media queries](#-media-queries) + + [โœ… Dynamic calculations](#-dynamic-calculations) + + [๐Ÿšซ Consistency](#-consistency) + + [๐Ÿšซ Text Alignment](#-text-alignment) + + [๐Ÿšซ Structural Changes](#-structural-changes) + + [๐Ÿšซ Font Properties](#-font-properties) + +## Definitions + +**Sass:** An extension to CSS that reduces the repetition in CSS and allows developers to use shared functions, mixins and variables. [^1] + +**Members:** Refers to variables, functions and mixins in Sass. + +## Scope + +Sass provides members that make it easier to reuse code throughout the Ionic Framework repository. Variables hold values that can be used by other stylesheets. Mixins define reusable blocks of styles that can be included in other selectors. Functions allow the manipulation of values and can perform calculations. + +The purpose of this document is to identify the scenarios in which Sass variables should be used. + +## Historical Usage + +In Ionic Framework v1 through v3, the project was built with Sass variables that developers could change at runtime. While the default values were provided by Ionic Framework, anyone developing with it could override these values to rebuild the Ionic Framework CSS with their own values. [^2] + +Due to this, Ionic Framework documented the Sass variables as part of the public API using `@prop` comments as early as [v2.0.0](https://github.com/ionic-team/ionic-framework/blob/v2.0.0/src/components/alert/alert.ios.scss): + +```scss +// alert.ios.scss + +/// @prop - Max width of the alert +$alert-ios-max-width: 270px !default; + +/// @prop - Border radius of the alert +$alert-ios-border-radius: 13px !default; +``` + +If a Sass variable was deprecated or hidden from the public API, the `@prop` comment would be removed, or it would never be added, as seen in [v3.9.2](https://github.com/ionic-team/ionic-framework/blob/v3.9.2/src/components/alert/alert.ios.scss#L18-L19): + +```scss +// alert.ios.scss + +// deprecated +$alert-ios-head-padding: null !default; +``` + +To ensure proper documentation of variables for customizing Ionic Framework, Sass variables were added for components even if they were not used multiple times within the same component or elsewhere: + +```scss +// alert.ios.scss + +/// @prop - Text color of the label for the checked radio alert +$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color !default; + +.alert-ios [aria-checked=true] .alert-radio-label { + color: $alert-ios-radio-label-text-color-checked; +} +``` + +## Current Usage + +The abundance of Sass variables currently in Ionic Framework is a result of their historical usage, being used to rebuild the CSS and customize Ionic Framework components. + +The comments for Sass variables are also still visible today in [v7.7.0](https://github.com/ionic-team/ionic-framework/blob/v7.7.0/core/src/components/alert/alert.ios.vars.scss), even though they are no longer used by any documentation generators: + +```scss +// alert.ios.vars.scss + +/// @prop - Max width of the alert +$alert-ios-max-width: dynamic-font-clamp(1, 270px, 1.2) !default; + +/// @prop - Border radius of the alert +$alert-ios-border-radius: 13px !default; +``` + +These comments aren't necessary when the naming describes its use thoroughly. The comments for the variables above do not need to be there, as it is fairly obvious what they are used for. + +However, the comment for the following variable might be helpful in explaining where it is used because on first glance it reads like it could be used for a sub title inside of a title: + +```scss +// action-sheet.ios.vars.scss + +/// @prop - Font weight of the action sheet title when it has a sub title +$action-sheet-ios-title-with-sub-title-font-weight: 600 !default; +``` + +It could be argued though that the comment doesn't really help, as seeing the variable in use will explain its purpose the best. Additionally, this is an example of a variable that isn't necessary, given it is only used in one place, which is why it is so specific in the first place. + +## Recommended Usage + +There are two things that need to be outlined here: when we should use comments and when we should use variables. The sections below detail the recommended usage for each of these. + +### Comments + +We should update the comments for Sass variables in one of the following ways: + +1. If we don't intend to ever publicly document the Sass variables again, we should update the comments to remove the syntax that was added for documentation generation: + ```diff + // alert.ios.vars.scss + + -/// @prop - Border radius of the alert + +// Border radius of the alert + $alert-ios-border-radius: 13px !default; + ``` + +2. If we don't find the comments to be helpful, and want to stick with keeping the variable names specific, we should remove the comments entirely: + ```diff + // alert.ios.vars.scss + + -/// @prop - Border radius of the alert + $alert-ios-border-radius: 13px !default; + ``` + +3. If we find the comments to be helpful for certain variables or situations, like when there are math calculations involved, we should keep only the comments that are necessary to explain what is going on: + ```diff + -/// @prop - Height of the alert button + /** + * We want the height of the button to + * scale with the text so the next never runs + * into the edge of the button. We change the height + * instead of adding padding because we would need to offset + * the height the padding and the border. Since the border uses + * a hairline (<1px) width, this will cause subpixel rendering + * differences across browsers. + */ + $alert-ios-button-height: dynamic-font-min(1, 44px) !default; + ``` + +### Variables + +The table below outlines the recommended approach for when to use Sass variables. Each scenario links to a section that explains it in more detail. + +| | Scenario | +| ---| ---------------------------------------------------------------| +| โœ… | [Global](#white_check_mark-global) | +| โœ… | [Theming](#white_check_mark-theming) | +| โœ… | [Reusable values](#white_check_mark-reusable-values) | +| โœ… | [Media queries](#white_check_mark-media-queries) | +| โœ… | [Dynamic calculations](#white_check_mark-dynamic-calculations) | +| ๐Ÿšซ | [Consistency](#no_entry_sign-consistency) | +| ๐Ÿšซ | [Text Alignment](#no_entry_sign-text-alignment) | +| ๐Ÿšซ | [Structural Changes](#no_entry_sign-structural-changes) | +| ๐Ÿšซ | [Font Properties](#no_entry_sign-font-properties) | + +#### โœ… Global + +Global variables that are used in multiple places include `font-family`, `z-index`, and `opacity`. These should continue to be set in variables as they affect multiple components that use them. + +Example of global variables: + +```scss +// ionic.globals.scss + +$font-family-base: var(--ion-font-family, inherit) !default; + +$hairlines-width: .55px !default; + +$placeholder-opacity: 0.6 !default; +``` + +#### โœ… Theming + +Storing colors and other design-related values makes it easy to update an entire theme by modifying a few variables. + +Example of theme variables: + +```scss +// ionic.theme.default.scss + +$background-color-value: #fff !default; +$background-color-rgb-value: 255, 255, 255 !default; + +$text-color-value: #000 !default; +$text-color-rgb-value: 0, 0, 0 !default; + +$background-color: var(--ion-background-color, $background-color-value) !default; +$background-color-rgb: var(--ion-background-color-rgb, $background-color-rgb-value) !default; +$text-color: var(--ion-text-color, $text-color-value) !default; +$text-color-rgb: var(--ion-text-color-rgb, $text-color-rgb-value) !default; +``` + +```scss +// ionic.theme.default.ios.scss + +$backdrop-ios-color: var(--ion-backdrop-color, #000) !default; +$overlay-ios-background-color: var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9)) !default; +``` + +#### โœ… Reusable values + +Use variables for values that are repeated throughout stylesheets, such as spacing, `border-radius`, `font-size`, or any other value used in multiple places. A value should only be considered reusable if it is used more than once and related among the elements it is being applied to in some way. For instance, a value is not considered related if it changes a common property, such as border style. While many components use `border-style: solid`, it does not need to be stored unless these components will require updates with design changes. Currently, the border styles have consistently been set to `solid`, with the exception of `none` for a CSS reset. + +Example of reusable values: + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// alert.ios.vars.scss + +/// @prop - Padding end of the alert head +$alert-ios-head-padding-end: 16px !default; + +/// @prop - Padding start of the alert head +$alert-ios-head-padding-start: $alert-ios-head-padding-end !default; +``` + +```scss +// alert.ios.scss + +.alert-head { + padding-top: 12px; + padding-inline-end: $alert-ios-head-padding-end; + padding-bottom: 7px; + padding-inline-start: $alert-ios-head-padding-start; +} +``` + +
Don't :x:
+ +```scss +// alert.ios.vars.scss + +/// @prop - Padding top of the alert head +$alert-ios-head-padding-top: 12px !default; + +/// @prop - Padding bottom of the alert head +$alert-ios-head-padding-bottom: 7px !default; +``` + +```scss +// alert.ios.scss + +.alert-head { + padding-top: $alert-ios-head-padding-top; + padding-bottom: $alert-ios-head-padding-bottom; +} +``` + +
+ +If a value is shared among multiple components, it should be made into a [global variable](#white_check_mark-global) instead of importing the variable from a specific component. For example, variables that are shared between list components (item, item divider, list header) should be defined in a global theme file: + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// ionic.theme.default.md.scss + +$global-md-item-padding-end: 16px; +$global-md-item-padding-start: $global-md-item-padding-end; +``` + +```scss +// item.md.vars.scss + +@import "../../themes/ionic.globals.md"; + +/// @prop - Padding end for the item content +$item-md-padding-end: $global-md-item-padding-end !default; + +/// @prop - Padding start for the item content +$item-md-padding-start: $global-md-item-padding-start !default; +``` + +```scss +// item-divider.md.vars.scss + +@import "../../themes/ionic.globals.md"; + +/// @prop - Padding start for the divider +$item-divider-md-padding-start: $global-md-item-padding-start !default; + +/// @prop - Padding end for the divider +$item-divider-md-padding-end: $global-md-item-padding-end !default; +``` + +
Don't :x:
+ +```scss +// item.md.vars.scss + +@import "../../themes/ionic.globals.md"; + +/// @prop - Padding end for the item content +$item-md-padding-end: 16px !default; + +/// @prop - Padding start for the item content +$item-md-padding-start: 16px !default; +``` + +```scss +// item-divider.md.vars.scss + +@import "../../themes/ionic.globals.md"; +@import "../item/item.md.vars"; + +/// @prop - Padding start for the divider +$item-divider-md-padding-start: $item-md-padding-start !default; + +/// @prop - Padding end for the divider +$item-divider-md-padding-end: $item-md-padding-end !default; +``` + +
+ +> [!TIP] +> The names of the global variables are just an example. We do not currently have a naming convention for global variables. + +#### โœ… Media queries + +Define breakpoints for responsive design to allow easy adjustments as needed. + +Example of breakpoints used by media queries: + +```scss +// ionic.globals.scss + +// The minimum dimensions at which your layout will change, +// adapting to different screen sizes, for use in media queries +$screen-breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px +) !default; +``` + +#### โœ… Dynamic calculations + +Variables can be useful for dynamic calculations, such as storing a base font size in a variable and then using it in calculations for other font sizes or spacing values. Variables should not be used for storing a function call, even if the function itself has dynamic calculations. + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// chip.vars.scss + +/// @prop - Unitless font size of the chip before scaling +$chip-base-font-size: 14; + +/// @prop - Font size of the chip in rem before scaling +$chip-base-font-size-rem: #{math.div($chip-base-font-size, 16)}rem; + +/// @prop - Size of an icon within a chip (in em to scale as the font size of the chip scales) +$chip-icon-size: math.div(20em, $chip-base-font-size); + +/// @prop - Size of an avatar within a chip (in em to scale as the font size of the chip scales) +$chip-avatar-size: math.div(24em, $chip-base-font-size); +``` + +
Don't :x:
+ +```scss +// alert.vars.scss + +/// @prop - Font size of the alert button +$alert-button-font-size: dynamic-font(14px) !default; +``` + +
+ +#### ๐Ÿšซ Consistency + +While we usually aim for consistency across different modes, this isn't always necessary when dealing with Sass variables. If certain styles are present in one mode but absent in another, there's no need to include a Sass variable for the mode lacking those styles. + +For example, the color of the label changes when focused in `md` mode. However, in `ios`, the label does not receive different styling when focused, therefore it does not require the same styles or a Sass variable defined: + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// label.md.vars.scss + +/// @prop - Text color of the stacked/floating label when it is focused +$label-md-text-color-focused: ion-color(primary, base) !default; +``` + +```scss +// label.md.scss + +:host-context(.ion-focused).label-stacked:not(.ion-color), +:host-context(.ion-focused).label-floating:not(.ion-color), +:host-context(.item-has-focus).label-stacked:not(.ion-color), +:host-context(.item-has-focus).label-floating:not(.ion-color) { + color: $label-md-text-color-focused; +} +``` + +
Don't :x:
+ +```scss +// label.ios.vars.scss + +/// @prop - Text color of the stacked/floating label when it is focused +$label-ios-text-color-focused: null !default; +``` + +```scss +// label.ios.scss + +:host-context(.ion-focused).label-stacked:not(.ion-color), +:host-context(.ion-focused).label-floating:not(.ion-color), +:host-context(.item-has-focus).label-stacked:not(.ion-color), +:host-context(.item-has-focus).label-floating:not(.ion-color) { + color: $label-ios-text-color-focused; +} +``` + +
+ +#### ๐Ÿšซ Text Alignment + +A text alignment property should not be stored in a Sass variable, even if it is used in multiple places. This is because the alignment may be tied to a specific design, and the design may change, causing them to become disconnected. + + + + + + + + + + + + + +
Do โœ…Don't :x:
+ +```scss +// action-sheet.ios.scss + +:host { + text-align: center; +} + +.action-sheet-title { + text-align: center; +} +``` + + + +```scss +// action-sheet.ios.vars.scss + +/// @prop - Text align of the action sheet +$action-sheet-ios-text-align: center !default; +``` + +```scss +// action-sheet.ios.scss + +:host { + text-align: $action-sheet-ios-text-align; +} + +.action-sheet-title { + text-align: $action-sheet-ios-text-align; +} +``` + +
+ + +#### ๐Ÿšซ Structural Changes + +Variables should not be used when they are structural changes of an element. This includes `display` properties, `flex` properties, `grid` properties, and more. + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// alert.ios.scss + +.alert-button-group { + flex-wrap: wrap; +} + +.alert-button { + flex: 1 1 auto; +} +``` + +
Don't :x:
+ + +```scss +// alert.ios.vars.scss + +/// @prop - Flex wrap of the alert button group +$alert-ios-button-group-flex-wrap: wrap !default; + +/// @prop - Flex of the alert button +$alert-ios-button-flex: 1 1 auto !default; +``` + +```scss +// alert.ios.scss + +.alert-button-group { + flex-wrap: $alert-ios-button-group-flex-wrap; +} + +.alert-button { + flex: $alert-ios-button-flex; +} +``` + +
+ +#### ๐Ÿšซ Font Properties + +We shouldn't use variables for changing things such as `font-size` or `font-weight`, as these are not changed based on a theme and do not need to be updated globally. When updating the `font-size` and `font-weight` for these elements, it will always be done on a case-by-case basis: + + + + + + + + + + + + + + + + + + + + +
Do โœ…
+ +```scss +// action-sheet.ios.scss + +.action-sheet-title { + font-size: dynamic-font-min(1, 13px); + font-weight: 400; +} + +.action-sheet-sub-title { + font-size: dynamic-font-min(1, 13px); + font-weight: 400; +} +``` + +
Don't :x:
+ +```scss +// action-sheet.ios.vars.scss + +/// @prop - Font size of the action sheet title +$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px) !default; + +/// @prop - Font weight of the action sheet title +$action-sheet-ios-title-font-weight: 400 !default; + +/// @prop - Font size of the action sheet sub title +$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px) !default; +``` + +```scss +// action-sheet.ios.scss + +.action-sheet-title { + font-size: $action-sheet-ios-title-font-size; + font-weight: $action-sheet-ios-title-font-weight; +} + +.action-sheet-sub-title { + font-size: $action-sheet-ios-sub-title-font-size; + font-weight: $action-sheet-ios-title-font-weight; +} +``` + +
+ +[^1]: Sass Documentation, https://sass-lang.com/documentation/ + +[^2]: Ionic Framework v3 Documentation - Theming - Overriding Ionic Variables, https://ionicframework.com/docs/v3/theming/overriding-ionic-variables/ diff --git a/docs/vue-router/README.md b/docs/vue-router/README.md new file mode 100644 index 0000000000..28494eda92 --- /dev/null +++ b/docs/vue-router/README.md @@ -0,0 +1,11 @@ +# Ionic Vue Router + +The [@ionic/vue-router](https://www.npmjs.com/package/@ionic/vue-router) package is the routing integration for [@ionic/vue](https://www.npmjs.com/package/@ionic/vue). It uses the [Vue Router](https://router.vuejs.org/) library beneath the surface. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [Vue Router Testing documentation](./testing.md) for testing the Vue Router package. diff --git a/docs/vue-router/testing.md b/docs/vue-router/testing.md new file mode 100644 index 0000000000..f633a009fc --- /dev/null +++ b/docs/vue-router/testing.md @@ -0,0 +1,7 @@ +# Vue Router Testing + +## Tests + +* Tests are found in the `__tests__` directory and use Jest. +* Tests can be run using `npm run test.spec` +* Bug fix and feature PRs should have new tests verifying the PR functionality. diff --git a/docs/vue/README.md b/docs/vue/README.md new file mode 100644 index 0000000000..aa5628d039 --- /dev/null +++ b/docs/vue/README.md @@ -0,0 +1,11 @@ +# Ionic Vue + +The [@ionic/vue](https://www.npmjs.com/package/@ionic/vue) package builds on top of [@ionic/core](https://www.npmjs.com/package/@ionic/core) components. + +## Contributing + +See our [Contributing Guide](/docs/CONTRIBUTING.md). + +## Testing + +Refer to the [Vue Testing documentation](./testing.md) for testing the Vue package. diff --git a/docs/vue/testing.md b/docs/vue/testing.md new file mode 100644 index 0000000000..268628f2ea --- /dev/null +++ b/docs/vue/testing.md @@ -0,0 +1,58 @@ +# Vue Testing + +Ionic Framework supports multiple versions of Vue. As a result, we need to verify that Ionic works correctly with each of these Vue versions. + +## Syncing Local Changes + +The Vue test app supports syncing your locally built changes for validation. + +1. [Build](../README.md#building) the `core`, `packages/vue`, and `packages/vue-router` projects using `npm run build`. +2. [Build the Vue test app](#test-app-build-structure). +3. Navigate to the built test app directory (e.g. `packages/vue/test/build/vue3`). +4. Install dependencies using `npm install`. +5. Sync your local changes using `npm run sync`. + +From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. + +## Test App Build Structure + +> [!NOTE] +> Please confirm your current directory as `packages/vue/test` before proceeding with any of the following commands. + +Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. + +**apps** - This directory contains partial applications for each version of Vue we want to test. Typically these directories contain new `package.json` files, `jest.config.js` files, and more. If you have code that is specific to a particular version of Vue, put it in this directory. + +**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. + +**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. + +**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. + +Usage: + +```shell +# Build a test app using apps/vue3 as a reference +./build.sh vue3 +``` + +## How to modify test apps + +To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. + +If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/vue3`, make sure you place the file in `apps/vue3/tests/e2e/test.e2e.ts`. + +### Version-specific tests + +If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. + +## Adding New Test Apps + +As we add support for new versions of Vue, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: + +1. Navigate to the built app for the most recent version of Vue that Ionic tests. +2. Update the application to the latest version of Vue. +3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). +4. Copy the changed files to a new directory in `apps`. +5. Add a new entry to the matrix for `test-core-vue` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. +6. Commit these changes and push. diff --git a/packages/angular/test/README.md b/packages/angular/test/README.md index 3f8fa53018..e761e14621 100644 --- a/packages/angular/test/README.md +++ b/packages/angular/test/README.md @@ -1,118 +1,3 @@ # Angular E2E Test Apps -Ionic Framework supports multiple versions of Angular. As a result, we need to verify that Ionic works correctly with each of these Angular versions. - -## Syncing Local Changes - -The Angular test app supports syncing your locally built changes for validation. - -1. Build the `core` and `packages/angular` directories using `npm run build`. -2. [Build the Angular test app](#test-app-build-structure). -3. Navigate to the built test app directory (e.g. `packages/angular/test/build/ng17`). -4. Install dependencies using `npm install`. -5. Sync your local changes using `npm run sync`. - -From here you can either build the application or start a local dev server. When re-syncing changes, you will need to [wipe or disable the application cache](#application-cache). - -## Application Cache - -Angular CLI creates a cache of several files on disk by default in the `.angular` directory. This decreases the time taken to build the test application. However, the cache makes it difficult to quickly sync and check local changes of Ionic. As a result, the `.angular` cache is disabled by default in the test app projects. - -See https://angular.io/cli/cache for more information. - -### Disable Cache - -```shell -ng cache disable -``` - -> [!NOTE] -> You may need to manually remove the `.angular` directory once after running this command. - -### Enable Cache - -```shell -ng cache enable -``` - -> [!NOTE] -> You will need to delete the `.angular` cache and restart the dev server every time you want to sync local changes of Ionic. - -## Test App Build Structure - -> [!NOTE] -> Please confirm your current directory as `packages/angular/test` before proceeding with any of the following commands. - -Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. - -**apps** - This directory contains partial applications for each version of Angular we want to test. Typically these directories contain new `package.json` files, `angular.json` files, and more. If you have code that is specific to a particular version of Angular, put it in this directory. - -**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. - -**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. - -**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. - -Usage: - -```shell -# Build a test app using apps/ng17 as a reference -./build.sh ng17 -``` - -## How to modify test apps - -To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. - -If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.spec.ts` in `apps/ng17`, make sure you place the file in `apps/ng17/e2e/src/test.spec.ts`. - -### Version-specific tests - -If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. - -### Testing Lazy Loaded Ionic Components - -Tests for lazy loaded Ionic UI components should only be added under the `/lazy` route. This ensures the `IonicModule` is added. - -### Testing Standalone Ionic Components - -Tests for standalone Ionic UI components should only be added under the `/standalone` route. This allows for an isolated environment where the lazy loaded `IonicModule` is not initialized. The standalone components use Stencil's custom element bundle instead of the lazy loaded bundle. If `IonicModule` is initialized then the Stencil components will fall back to using the lazy loaded implementation instead of the custom elements bundle implementation. - -## Adding New Test Apps - -As we add support for new versions of Angular, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: - -1. Navigate to the built app for the most recent version of Angular that Ionic tests. -2. Update the application by following the steps on https://update.angular.io/. -3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, `angular.json`, etc). -4. Copy the changed files to a new directory in `apps`. -5. Add a new entry to the matrix for `test-core-angular` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. -6. Commit these changes and push. - -Example: - -In this example, we are going to add the Angular 14 test app. - -1. Build the Angular 13 test app using `./build.sh ng13`. -2. Navigate to `build/ng13`. -3. Perform the upgrade steps on https://update.angular.io/. The "From" field should say "13.0" and the "To" field should say "14.0". - -Note: You may encounter some other peer dependency issues not covered by the Angular Upgrade Guide. These peer dependency issues can be resolved manually by updating the installed version of each dependency. - -4. Observe that the output of the Angular upgrade indicates that the following files were modified: - -`angular.json` -`package-lock.json` -`package.json` -`tsconfig.json` -`src/app/form/form.component.ts` -`src/app/modal-example/modal-example.component.ts` - -5. Create a directory in `apps` named `ng14`. -6. Copy the modified files to the `apps/ng14` directory. -7. Open `./github/workflows/build.yml` and find the `test-angular-e2e` job. -8. Find the `apps` field under `matrix`. -9. Add "ng14" to the `apps` field. -10. Open `./github/workflows/stencil-nightly.yml` and find the `test-angular-e2e` job. -11. Repeat steps 8 and 9. -12. Commit these changes and push. +Refer to the [Angular Testing documentation](/docs/angular/testing.md) in order to build and run the test app. diff --git a/packages/react-router/README.md b/packages/react-router/README.md index 3f723796c6..2f48cca404 100644 --- a/packages/react-router/README.md +++ b/packages/react-router/README.md @@ -1,2 +1,2 @@ -## @ionic/react-router (beta) +# @ionic/react-router diff --git a/packages/react-router/test/README.md b/packages/react-router/test/README.md index 22e912cedb..d072e40617 100644 --- a/packages/react-router/test/README.md +++ b/packages/react-router/test/README.md @@ -1,55 +1,3 @@ # React Router E2E Test Apps -Ionic Framework supports multiple versions of React Router. As a result, we need to verify that Ionic works correctly with each of these React Router versions. - -## Syncing Local Changes - -The React test app supports syncing your locally built changes for validation. - -1. Build the `@ionic/core`, `@ionic/react`, and `@ionic/react-router` projects using `npm run build`. -2. [Build the React test app](#test-app-build-structure). -3. Navigate to the built test app. -4. Install dependencies using `npm install`. -5. Sync your local changes using `npm run sync`. - -From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. - -## Test App Build Structure - -Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. - -**apps** - This directory contains partial applications for each version of React we want to test. Typically these directories contain new `package.json` files, `cypress.config.ts` files, and more. If you have code that is specific to a particular version of React, put it in this directory. - -**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. - -**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. - -**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. - -Usage: - -```shell -# Build a test app using apps/reactrouter5 as a reference -./build.sh reactrouter5 -``` - -## How to modify test apps - -To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. - -If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/reactrouter5`, make sure you place the file in `apps/react17/tests/e2e/test.e2e.ts`. - -### Version-specific tests - -If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. - -## Adding New Test Apps - -As we add support for new versions of React Router, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: - -1. Navigate to the built app for the most recent version of React Router that Ionic tests. -2. Update the application to the latest version of React Router. -3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). -4. Copy the changed files to a new directory in `apps`. -5. Add a new entry to the matrix for `test-react-router-e2e` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. -6. Commit these changes and push. +Refer to the [React Router Testing documentation](/docs/react-router/testing.md) in order to build and run the test app. diff --git a/packages/react/README.md b/packages/react/README.md index 83119c9346..9cba7b4864 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -1,4 +1,4 @@ -## @ionic/react +# @ionic/react These are React specific building blocks on top of [@ionic/core](https://www.npmjs.com/package/@ionic/core) components/services. diff --git a/packages/react/test/README.md b/packages/react/test/README.md index e0b8efa371..b398f18b65 100644 --- a/packages/react/test/README.md +++ b/packages/react/test/README.md @@ -1,55 +1,3 @@ # React E2E Test Apps -Ionic Framework supports multiple versions of React. As a result, we need to verify that Ionic works correctly with each of these React versions. - -## Syncing Local Changes - -The React test app supports syncing your locally built changes for validation. - -1. Build the `core`, `packages/react`, and `packages/react-router` directories using `npm run build`. -2. [Build the React test app](#test-app-build-structure). -3. Navigate to the built test app. -4. Install dependencies using `npm install`. -5. Sync your local changes using `npm run sync`. - -From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. - -## Test App Build Structure - -Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. - -**apps** - This directory contains partial applications for each version of React we want to test. Typically these directories contain new `package.json` files, `cypress.config.ts` files, and more. If you have code that is specific to a particular version of React, put it in this directory. - -**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. - -**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. - -**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. - -Usage: - -```shell -# Build a test app using apps/react17 as a reference -./build.sh react17 -``` - -## How to modify test apps - -To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. - -If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/react17`, make sure you place the file in `apps/react17/tests/e2e/test.e2e.ts`. - -### Version-specific tests - -If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. - -## Adding New Test Apps - -As we add support for new versions of React, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: - -1. Navigate to the built app for the most recent version of React that Ionic tests. -2. Update the application to the latest version of React. -3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). -4. Copy the changed files to a new directory in `apps`. -5. Add a new entry to the matrix for `test-react-e2e` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. -6. Commit these changes and push. +Refer to the [React Testing documentation](/docs/react/testing.md) in order to build and run the test app. diff --git a/packages/react/test/base/README.md b/packages/react/test/base/README.md index 10e49c2b06..7988565fb6 100644 --- a/packages/react/test/base/README.md +++ b/packages/react/test/base/README.md @@ -1,47 +1,3 @@ # React Test App -## Getting Started - -### Setup - -Make sure you are using the latest versions of node and npm. If you do not have these, [download the installer](https://nodejs.org/) for the LTS version of Node.js. This is the best way to also [install npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm#_=_). - -### Building Dependencies - -Navigate to the `core`, `packages/react` and `packages/react-router` directories and build each of them: - -```bash -npm i -npm run build -``` - -Then, install dependencies from this directory for this test app: - -``` -npm i -``` - -### Syncing Changes - -When making changes to the React package, run the following from this directory to sync the changes: - -```bash -npm run sync -``` - -### Previewing App - -To preview this app locally, run the following from this directory: - -```bash -npm start -``` - -### Running Tests - -To run the e2e tests, run the following from this directory: - -``` -npm run build -npm run e2e -``` +Refer to the [React Testing documentation](/docs/react/testing.md) in order to build and run the test app. diff --git a/packages/vue/src/vue-component-lib/utils.ts b/packages/vue/src/vue-component-lib/utils.ts index 492ee5d410..136041073e 100644 --- a/packages/vue/src/vue-component-lib/utils.ts +++ b/packages/vue/src/vue-component-lib/utils.ts @@ -91,17 +91,8 @@ export const defineContainer = ( const eventsNames = Array.isArray(modelUpdateEvent) ? modelUpdateEvent : [modelUpdateEvent]; eventsNames.forEach((eventName: string) => { el.addEventListener(eventName.toLowerCase(), (e: Event) => { - /** - * Only update the v-model binding if the event's target is the element we are - * listening on. For example, Component A could emit ionChange, but it could also - * have a descendant Component B that also emits ionChange. We only want to update - * the v-model for Component A when ionChange originates from that element and not - * when ionChange bubbles up from Component B. - */ - if (e.target.tagName === el.tagName) { - modelPropValue = (e?.target as any)[modelProp]; - emit(UPDATE_VALUE_EVENT, modelPropValue); - } + modelPropValue = (e?.target as any)[modelProp]; + emit(UPDATE_VALUE_EVENT, modelPropValue); }); }); }, diff --git a/packages/vue/test/README.md b/packages/vue/test/README.md index b124b491e7..5db04476a5 100644 --- a/packages/vue/test/README.md +++ b/packages/vue/test/README.md @@ -1,58 +1,3 @@ # Vue E2E Test Apps -Ionic Framework supports multiple versions of Vue. As a result, we need to verify that Ionic works correctly with each of these Vue versions. - -## Syncing Local Changes - -The Vue test app supports syncing your locally built changes for validation. - -1. [Build](../README.md#building) the `core`, `packages/vue`, and `packages/vue-router` projects using `npm run build`. -2. [Build the Vue test app](#test-app-build-structure). -3. Navigate to the built test app directory (e.g. `packages/vue/test/build/vue3`). -4. Install dependencies using `npm install`. -5. Sync your local changes using `npm run sync`. - -From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. - -## Test App Build Structure - -> [!NOTE] -> Please confirm your current directory as `packages/vue/test` before proceeding with any of the following commands. - -Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. - -**apps** - This directory contains partial applications for each version of Vue we want to test. Typically these directories contain new `package.json` files, `jest.config.js` files, and more. If you have code that is specific to a particular version of Vue, put it in this directory. - -**base** - This directory contains the base application that each test app will use. This is where tests, application logic, and more live. If you have code that needs to be run on every test app, put it in this directory. - -**build** - When the `apps` and `base` directories are merged, the final result is put in this directory. The `build` directory should never be committed to git. - -**build.sh** - This is the script that merges the `apps` and `base` directories and places the built application in the `build` directory. - -Usage: - -```shell -# Build a test app using apps/vue3 as a reference -./build.sh vue3 -``` - -## How to modify test apps - -To add new tests, components, or pages, modify the `base` project. This ensures that tests are run for every tested version. - -If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/vue3`, make sure you place the file in `apps/vue3/tests/e2e/test.e2e.ts`. - -### Version-specific tests - -If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. - -## Adding New Test Apps - -As we add support for new versions of Vue, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: - -1. Navigate to the built app for the most recent version of Vue that Ionic tests. -2. Update the application to the latest version of Vue. -3. Make note of any files that changed during the upgrade (`package.json`, `package-lock.json`, etc). -4. Copy the changed files to a new directory in `apps`. -5. Add a new entry to the matrix for `test-core-vue` in `./github/workflows/build.yml`. This will allow the new test app to run against all PRs. -6. Commit these changes and push. +Refer to the [Vue Testing documentation](/docs/vue/testing.md) in order to build and run the test app.