Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ runs:
run: npm run build -- --ci --debug --verbose
working-directory: ./core
shell: bash
- name: 🔍 Verify Lazy Imports
run: npm run test.lazy-imports
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-core
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/actions/build-core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ runs:
run: npm run build -- --ci
working-directory: ./core
shell: bash
- name: 🔍 Verify Lazy Imports
run: npm run test.lazy-imports
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-core
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
- uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
languages: javascript
- uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
- uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12)


### Bug Fixes

* **core:** resolve lazy component chunks under Vite 8 ([#31341](https://github.com/ionic-team/ionic-framework/issues/31341)) ([a73e183](https://github.com/ionic-team/ionic-framework/commit/a73e1831d389e6dc968f646c0322b3984c1d3224)), closes [#31333](https://github.com/ionic-team/ionic-framework/issues/31333)
* **core:** update offsets when safe-area insets arrive late ([#31343](https://github.com/ionic-team/ionic-framework/issues/31343)) ([bc4fce2](https://github.com/ionic-team/ionic-framework/commit/bc4fce218d6c3aaac69f11d416b9fc8c8dacdfa4)), closes [#31337](https://github.com/ionic-team/ionic-framework/issues/31337)
* **datetime:** tear down ready state when an overlay dismisses ([#31335](https://github.com/ionic-team/ionic-framework/issues/31335)) ([d59e341](https://github.com/ionic-team/ionic-framework/commit/d59e3415df06cb26a7dea688f6720ba228b775d5)), closes [#31155](https://github.com/ionic-team/ionic-framework/issues/31155) [#31143](https://github.com/ionic-team/ionic-framework/issues/31143)
* **modal:** allow pull-to-refresh with a custom scroll host ([#31339](https://github.com/ionic-team/ionic-framework/issues/31339)) ([d6202a8](https://github.com/ionic-team/ionic-framework/commit/d6202a8933ad77735fceca05cb4b0fe6b33bfb55)), closes [#31332](https://github.com/ionic-team/ionic-framework/issues/31332)





## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05)


Expand Down
14 changes: 14 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12)


### Bug Fixes

* **core:** resolve lazy component chunks under Vite 8 ([#31341](https://github.com/ionic-team/ionic-framework/issues/31341)) ([a73e183](https://github.com/ionic-team/ionic-framework/commit/a73e1831d389e6dc968f646c0322b3984c1d3224)), closes [#31333](https://github.com/ionic-team/ionic-framework/issues/31333)
* **core:** update offsets when safe-area insets arrive late ([#31343](https://github.com/ionic-team/ionic-framework/issues/31343)) ([bc4fce2](https://github.com/ionic-team/ionic-framework/commit/bc4fce218d6c3aaac69f11d416b9fc8c8dacdfa4)), closes [#31337](https://github.com/ionic-team/ionic-framework/issues/31337)
* **datetime:** tear down ready state when an overlay dismisses ([#31335](https://github.com/ionic-team/ionic-framework/issues/31335)) ([d59e341](https://github.com/ionic-team/ionic-framework/commit/d59e3415df06cb26a7dea688f6720ba228b775d5)), closes [#31155](https://github.com/ionic-team/ionic-framework/issues/31155) [#31143](https://github.com/ionic-team/ionic-framework/issues/31143)
* **modal:** allow pull-to-refresh with a custom scroll host ([#31339](https://github.com/ionic-team/ionic-framework/issues/31339)) ([d6202a8](https://github.com/ionic-team/ionic-framework/commit/d6202a8933ad77735fceca05cb4b0fe6b33bfb55)), closes [#31332](https://github.com/ionic-team/ionic-framework/issues/31332)





## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05)


Expand Down
4 changes: 2 additions & 2 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "8.8.17",
"version": "8.8.18",
"description": "Base components for Ionic",
"engines": {
"node": ">= 16"
Expand Down Expand Up @@ -99,7 +99,8 @@
"test.e2e.update-snapshots": "npm run test.e2e -- --update-snapshots='changed'",
"test.watch": "jest --watch --no-cache",
"test.treeshake": "node scripts/treeshaking.js dist/index.js",
"validate": "npm run lint && npm run test && npm run build && npm run test.treeshake",
"test.lazy-imports": "node scripts/verify/lazy-imports.js",
"validate": "npm run lint && npm run test && npm run build && npm run test.lazy-imports && npm run test.treeshake",
"docker.build": "docker build -t ionic-playwright .",
"test.e2e.docker": "npm run docker.build && node ./scripts/docker.mjs",
"test.e2e.docker.update-snapshots": "npm run test.e2e.docker -- --update-snapshots='changed'",
Expand Down
56 changes: 56 additions & 0 deletions core/scripts/verify/lazy-imports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Fails if the built lazy loader is missing a literal import path for any component bundle.
* Not in `scripts/testing/` because `vercel-build.sh` publishes that directory.
* https://github.com/ionic-team/ionic-framework/issues/31333
*/
const fs = require('fs');
const path = require('path');

const PACKAGE_ROOT = path.resolve(__dirname, '..', '..');
const OUTPUT_DIRS = ['dist/esm', 'dist/cjs'];

function main() {
const failures = OUTPUT_DIRS.map(verify).filter((message) => message !== null);

if (failures.length > 0) {
failures.forEach((message) => console.error(message));
process.exit(1);
}

console.error(`Success! Every lazy bundle is imported by path in ${OUTPUT_DIRS.join(' and ')}`);
}

function verify(dir) {
const resolved = path.join(PACKAGE_ROOT, dir);

if (!fs.existsSync(resolved)) {
return `${dir} does not exist. Run npm run build first.`;
}

const files = fs.readdirSync(resolved).filter((file) => file.endsWith('.js'));
const entries = files.filter((file) => file.endsWith('.entry.js'));

if (entries.length === 0) {
return `${dir} does not contain any .entry.js files.`;
}

// A non-loader chunk that happens to name an entry file would be a false pass.
const loader = files
.filter((file) => !file.endsWith('.entry.js'))
.map((file) => fs.readFileSync(path.join(resolved, file), 'utf-8'))
.find((source) => /switch\s*\(bundleId\)/.test(source));

if (loader === undefined) {
return `${dir} has no lazy loader with a bundle id switch. Check that extras.enableImportInjection is still set in core/stencil.config.ts.`;
}

const missing = entries.filter((entry) => !loader.includes(`'./${entry}'`) && !loader.includes(`"./${entry}"`));

if (missing.length > 0) {
return `${dir} is missing an import for ${missing.length} of ${entries.length} lazy bundles: ${missing.join(', ')}`;
}

return null;
}

main();
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ export namespace Components {
*/
"clearText": string;
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics).
* @default 'primary'
*/
"color"?: Color;
Expand Down Expand Up @@ -6198,7 +6198,7 @@ declare namespace LocalJSX {
*/
"clearText"?: string;
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics).
* @default 'primary'
*/
"color"?: Color;
Expand Down
72 changes: 71 additions & 1 deletion core/src/components/content/content.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Build, Component, Element, Event, Host, Listen, Method, Prop, forceUpdate, h, readTask } from '@stencil/core';
import {
Build,
Component,
Element,
Event,
Host,
Listen,
Method,
Prop,
Watch,
forceUpdate,
h,
readTask,
} from '@stencil/core';
import { componentOnReady, hasLazyBuild, inheritAriaAttributes } from '@utils/helpers';
import type { Attributes } from '@utils/helpers';
import { isPlatform } from '@utils/platform';
Expand Down Expand Up @@ -34,6 +47,7 @@ export class Content implements ComponentInterface {
private backgroundContentEl?: HTMLElement;
private isMainContent = true;
private resizeTimeout: ReturnType<typeof setTimeout> | null = null;
private fullscreenResizeObserver?: ResizeObserver;
private inheritedAttributes: Attributes = {};

private tabsElement: HTMLElement | null = null;
Expand Down Expand Up @@ -77,6 +91,11 @@ export class Content implements ComponentInterface {
*/
@Prop() fullscreen = false;

@Watch('fullscreen')
fullscreenChanged() {
this.setupFullscreenResizeObserver();
}

/**
* Controls where the fixed content is placed relative to the main content
* in the DOM. This can be used to control the order in which fixed elements
Expand Down Expand Up @@ -168,6 +187,14 @@ export class Content implements ComponentInterface {
closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback);
}
}

// Re-observe on reattach, since componentDidLoad only fires once.
this.setupFullscreenResizeObserver();
}

componentDidLoad() {
// The custom elements build assigns fullscreen after connectedCallback.
this.setupFullscreenResizeObserver();
}

disconnectedCallback() {
Expand All @@ -193,6 +220,49 @@ export class Content implements ComponentInterface {
clearTimeout(this.resizeTimeout);
this.resizeTimeout = null;
}

this.destroyFullscreenResizeObserver();
}

/**
* Header and footer sizes can change after load without a window resize
* firing, so the `resize` listener alone misses those changes.
*
* Popover content is excluded because `contain: none` lets its offsets drive
* the host's own height, which would feed back into the observer.
*/
private setupFullscreenResizeObserver() {
if (!Build.isBrowser || typeof ResizeObserver === 'undefined') {
return;
}

if (!this.fullscreen || hostContext('ion-popover', this.el)) {
this.destroyFullscreenResizeObserver();
return;
}

if (this.fullscreenResizeObserver !== undefined) {
return;
}

this.fullscreenResizeObserver = new ResizeObserver(() => {
// A hidden page reports a 0x0 box, which would zero the offsets. Same
// reasoning as the guard in onResize, minus its debounce so the
// correction lands in the next frame instead of 100ms later.
if (this.el.offsetParent === null) {
return;
}

this.resize();
});
this.fullscreenResizeObserver.observe(this.el);
}

private destroyFullscreenResizeObserver() {
if (this.fullscreenResizeObserver !== undefined) {
this.fullscreenResizeObserver.disconnect();
this.fullscreenResizeObserver = undefined;
}
}

/**
Expand Down
Loading
Loading