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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)


### Bug Fixes

* **action-sheet:** restore action-sheet-selected class on non-radio buttons ([#31109](https://github.com/ionic-team/ionic-framework/issues/31109)) ([c18502f](https://github.com/ionic-team/ionic-framework/commit/c18502f3efdec5440a11289235a93c62ce27ab89)), closes [#31090](https://github.com/ionic-team/ionic-framework/issues/31090)
* **datetime:** prevent hidden-state observer from tearing down ready class on initial entry ([#31108](https://github.com/ionic-team/ionic-framework/issues/31108)) ([30b479a](https://github.com/ionic-team/ionic-framework/commit/30b479a53acbc16961002df256bec358dc11e7fa))
* **segment:** segment drag would set disabled segment button checked ([#31112](https://github.com/ionic-team/ionic-framework/issues/31112)) ([44be424](https://github.com/ionic-team/ionic-framework/commit/44be424221bee11ffbe91c4b1fa0a4d56fe1ecac))





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)


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

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)


### Bug Fixes

* **action-sheet:** restore action-sheet-selected class on non-radio buttons ([#31109](https://github.com/ionic-team/ionic-framework/issues/31109)) ([c18502f](https://github.com/ionic-team/ionic-framework/commit/c18502f3efdec5440a11289235a93c62ce27ab89)), closes [#31090](https://github.com/ionic-team/ionic-framework/issues/31090)
* **datetime:** prevent hidden-state observer from tearing down ready class on initial entry ([#31108](https://github.com/ionic-team/ionic-framework/issues/31108)) ([30b479a](https://github.com/ionic-team/ionic-framework/commit/30b479a53acbc16961002df256bec358dc11e7fa))
* **segment:** segment drag would set disabled segment button checked ([#31112](https://github.com/ionic-team/ionic-framework/issues/31112)) ([44be424](https://github.com/ionic-team/ionic-framework/commit/44be424221bee11ffbe91c4b1fa0a4d56fe1ecac))





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)


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.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "8.8.5",
"version": "8.8.6",
"description": "Base components for Ionic",
"engines": {
"node": ">= 16"
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/action-sheet/action-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
id={buttonId}
class={{
...buttonClass(b),
'action-sheet-selected': isActiveRadio,
...(isRadio && { 'action-sheet-selected': isActiveRadio }),
}}
onClick={() => {
if (isRadio) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,36 @@ describe('action sheet: disabled buttons', () => {
await expect(cancelButton.hasAttribute('disabled')).toBe(false);
});
});

describe('action sheet: selected role', () => {
// https://github.com/ionic-team/ionic-framework/issues/31090
it('should add the `action-sheet-selected` class to a button with `role="selected"`', async () => {
const page = await newSpecPage({
components: [ActionSheet],
template: () => (
<ion-action-sheet
buttons={[
{ text: 'Option A' },
{ text: 'Option B', role: 'selected' },
{ text: 'Option C' },
{ text: 'Cancel', role: 'cancel' },
]}
overlayIndex={1}
></ion-action-sheet>
),
});

const actionSheet = page.body.querySelector('ion-action-sheet')!;

await actionSheet.present();

const buttons = Array.from(actionSheet.querySelectorAll<HTMLButtonElement>('.action-sheet-button'));
const selectedButton = buttons.find((btn) => btn.textContent?.trim() === 'Option B');

await expect(selectedButton).toBeDefined();
await expect(selectedButton!.classList.contains('action-sheet-selected')).toBe(true);

const optionA = buttons.find((btn) => btn.textContent?.trim() === 'Option A');
await expect(optionA!.classList.contains('action-sheet-selected')).toBe(false);
});
});
16 changes: 16 additions & 0 deletions core/src/components/segment-view/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@
<ion-segment-content id="top">Top</ion-segment-content>
</ion-segment-view>

<ion-segment id="disabledFirstSegment" value="third">
<ion-segment-button value="first" disabled>
<ion-label>First</ion-label>
</ion-segment-button>
<ion-segment-button content-id="second-content" value="second">
<ion-label>Second</ion-label>
</ion-segment-button>
<ion-segment-button content-id="third-content" value="third">
<ion-label>Third</ion-label>
</ion-segment-button>
</ion-segment>
<ion-segment-view id="disabledFirstSegmentView">
<ion-segment-content id="second-content">Second Content</ion-segment-content>
<ion-segment-content id="third-content">Third Content</ion-segment-content>
</ion-segment-view>

<ion-segment value="peach" scrollable>
<ion-segment-button content-id="orange" value="orange">
<ion-label>Orange</ion-label>
Expand Down
33 changes: 33 additions & 0 deletions core/src/components/segment-view/test/basic/segment-view.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,38 @@ configs({ modes: ['md'] }).forEach(({ title, config }) => {
const segmentContent = page.locator('ion-segment-content[id="top"]');
await expect(segmentContent).toBeInViewport();
});
test('should not select a disabled first segment button when dragging segment-view from last content', async ({
page,
}) => {
await page.setContent(
`
<ion-segment id="disabledFirstSegment" scrollable="true" value="third">
<ion-segment-button value="first" disabled>
<ion-label>First</ion-label>
</ion-segment-button>
<ion-segment-button content-id="second-content" value="second">
<ion-label>Second</ion-label>
</ion-segment-button>
<ion-segment-button content-id="third-content" value="third">
<ion-label>Third</ion-label>
</ion-segment-button>
</ion-segment>
<ion-segment-view id="disabledFirstSegmentView">
<ion-segment-content id="second-content">Second Content</ion-segment-content>
<ion-segment-content id="third-content">Third Content</ion-segment-content>
</ion-segment-view>
`,
config
);
await page.waitForChanges();

await page.locator('ion-segment-view').evaluate((el: HTMLElement) => {
const max = el.scrollWidth - el.clientWidth;
el.scrollLeft = max;
});
await page.waitForChanges();

await expect(page.locator('ion-segment-button[value="first"]')).not.toHaveClass(/segment-button-checked/);
});
});
});
4 changes: 4 additions & 0 deletions core/src/components/segment/segment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ export class Segment implements ComponentInterface {

const nextIndex = Math.round(scrollRatio * (buttons.length - 1));

if (buttons[nextIndex]?.disabled) {
return;
}

if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
this.lastNextIndex = nextIndex;
this.triggerScrollOnValueChange = false;
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"core",
"packages/*"
],
"version": "8.8.5"
"version": "8.8.6"
}
8 changes: 8 additions & 0 deletions packages/angular-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)

**Note:** Version bump only for package @ionic/angular-server





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)

**Note:** Version bump only for package @ionic/angular-server
Expand Down
18 changes: 9 additions & 9 deletions packages/angular-server/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/angular-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/angular-server",
"version": "8.8.5",
"version": "8.8.6",
"description": "Angular SSR Module for Ionic",
"keywords": [
"ionic",
Expand Down Expand Up @@ -62,6 +62,6 @@
},
"prettier": "@ionic/prettier-config",
"dependencies": {
"@ionic/core": "^8.8.5"
"@ionic/core": "^8.8.6"
}
}
8 changes: 8 additions & 0 deletions packages/angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)

**Note:** Version bump only for package @ionic/angular





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)

**Note:** Version bump only for package @ionic/angular
Expand Down
12 changes: 6 additions & 6 deletions packages/angular/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "8.8.5",
"version": "8.8.6",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
Expand Down Expand Up @@ -48,7 +48,7 @@
}
},
"dependencies": {
"@ionic/core": "^8.8.5",
"@ionic/core": "^8.8.6",
"ionicons": "^8.0.13",
"jsonc-parser": "^3.0.0",
"tslib": "^2.3.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)

**Note:** Version bump only for package @ionic/docs





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)

**Note:** Version bump only for package @ionic/docs
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "8.8.5",
"version": "8.8.6",
"description": "Pre-packaged API documentation for the Ionic docs.",
"main": "core.json",
"types": "core.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.6](https://github.com/ionic-team/ionic-framework/compare/v8.8.5...v8.8.6) (2026-05-06)

**Note:** Version bump only for package @ionic/react-router





## [8.8.5](https://github.com/ionic-team/ionic-framework/compare/v8.8.4...v8.8.5) (2026-04-29)

**Note:** Version bump only for package @ionic/react-router
Expand Down
Loading
Loading