Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fe79a5a
fix(accordion): remove divider from last accordion item in ionic theme
OS-susmitabhowmik Mar 18, 2026
1605337
fix(accordian): update color for pressed state
OS-susmitabhowmik Mar 18, 2026
aabdf46
fix(accodian): add padding for nested accordians
OS-susmitabhowmik Mar 19, 2026
2c74f50
chore(): add updated snapshots
Ionitron Mar 19, 2026
aa8a0d7
fix(accordion): move pressed state background to SCSS
OS-susmitabhowmik Mar 19, 2026
f20a7f5
Merge branch 'next' into ROU-11979-fix-accordian-styles
OS-susmitabhowmik Mar 19, 2026
da30b91
fix(accordion): ensure pressed state background applies in ionic theme
OS-susmitabhowmik Mar 19, 2026
ab76f43
fix(accordion): fix CSS style scope
OS-susmitabhowmik Mar 19, 2026
57cd53c
fix(accordion): add check for ionic theme
OS-susmitabhowmik Mar 20, 2026
a69ae90
fix(accordion): set opacity for activated state
OS-susmitabhowmik Mar 20, 2026
b3620b9
chore(accordion): lint
OS-susmitabhowmik Mar 20, 2026
9ab6791
test(accordion): update end to end test
OS-susmitabhowmik Mar 20, 2026
3cd999d
fix(accordion): remove check for theme flag
OS-susmitabhowmik Mar 20, 2026
9016a3b
chore(accordion): lint
OS-susmitabhowmik Mar 20, 2026
88450ba
chore(accordion): delete screenshots to be updated
OS-susmitabhowmik Mar 20, 2026
a8362a9
chore(): add updated snapshots
Ionitron Mar 20, 2026
c66bb5d
chore(accordion): cleanup and delete additional screenshots to be upd…
OS-susmitabhowmik Mar 20, 2026
3935120
chore(): add updated snapshots
Ionitron Mar 20, 2026
07e7f6c
test(accordion): add nested accordion tests for ionic theme
OS-susmitabhowmik Mar 24, 2026
f6ecd8f
Merge branch 'next' into ROU-11979-fix-accordian-styles
OS-susmitabhowmik Mar 24, 2026
d67d6e5
chore(accordion): remove unnecessary comment
OS-susmitabhowmik Mar 24, 2026
e5a54ae
test(accordion): update nested test
OS-susmitabhowmik Mar 24, 2026
a3a76f1
chore(): add updated snapshots
Ionitron Mar 24, 2026
48e6c69
Merge branch 'next' into ROU-11979-fix-accordian-styles
OS-susmitabhowmik Mar 24, 2026
ee059a1
fix(accordion): refactor nested accordion styles and remove additiona…
OS-susmitabhowmik Mar 24, 2026
debf18e
chore(accordion): new line
OS-susmitabhowmik Mar 24, 2026
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions core/src/components/accordion/accordion.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
z-index: 3;
}

// Hide the divider for the last accordion item
:host(.accordion-last)::after {
display: none;
}

:host(.accordion-animated) {
transition: all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);
}
Expand All @@ -51,6 +56,7 @@
--padding-end: #{globals.$ion-space-400};
--padding-bottom: #{globals.$ion-space-300};
--padding-start: #{globals.$ion-space-400};
--background-activated: #{globals.$ion-bg-neutral-subtlest-press};

@include globals.typography(globals.$ion-heading-h6-medium);
}
Expand Down
6 changes: 5 additions & 1 deletion core/src/components/accordion/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class Accordion implements ComponentInterface {
@State() state: AccordionState = AccordionState.Collapsed;
@State() isNext = false;
@State() isPrevious = false;
@State() isLast = false;
/**
* Tracks whether a user-initiated interaction has occurred.
* Animations are disabled until the first interaction happens.
Expand Down Expand Up @@ -431,6 +432,9 @@ export class Accordion implements ComponentInterface {

const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;

const nextAccordion = this.getNextSibling();
this.isLast = nextAccordion === undefined;

if (shouldExpand) {
this.expandAccordion();
this.isNext = this.isPrevious = false;
Expand All @@ -444,7 +448,6 @@ export class Accordion implements ComponentInterface {
* applied. Check to see if the
* next or previous accordion is selected.
*/
const nextAccordion = this.getNextSibling();
const nextAccordionValue = nextAccordion?.value;

if (nextAccordionValue !== undefined) {
Expand Down Expand Up @@ -525,6 +528,7 @@ export class Accordion implements ComponentInterface {

'accordion-next': this.isNext,
'accordion-previous': this.isPrevious,
'accordion-last': this.isLast,

'accordion-disabled': disabled,
'accordion-readonly': readonly,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ directions: ['ltr'] }).forEach(({ config, screenshot, title }) => {
configs({ directions: ['ltr'], modes: ['md', 'ios', 'ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion: nested'), () => {
test('parent and child should not be disabled', async ({ page }) => {
await page.goto(`/src/components/accordion/test/nested`, config);
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/accordion/test/nested/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<style>
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
grid-row-gap: 20px;
grid-column-gap: 20px;
}
Expand Down
7 changes: 5 additions & 2 deletions core/src/css/ionic/core.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,16 @@ ion-accordion > [slot="content"] ion-item {

color: globals.$ion-primitives-neutral-1000;

--padding-start: 0;
--padding-top: #{globals.$ion-space-300};
--padding-bottom: #{globals.$ion-space-300};
--padding-end: 0;
--min-height: #{globals.$ion-scale-700};
}

ion-accordion > [slot="content"] ion-item:not([slot="header"]) {
--padding-start: 0;
--padding-end: 0;
}

// Datetime Styles
// --------------------------------------------------

Expand Down
Loading