Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(accordion)!: remove BaseAccordion #2764

Merged
merged 5 commits into from
Jun 25, 2024
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
18 changes: 18 additions & 0 deletions .changeset/heavy-peas-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@patternfly/pfe-tools": minor
---
Added `querySnapshot` accessibility testing helper

```ts

describe('then clicking the toggle', function() {
beforeEach(async function() {
await clickElementAtCenter(toggle);
});
it('expands the disclosure panel', async function() {
const snapshot = await a11ySnapshot();
const expanded = querySnapshot(snapshot, { expanded: true });
expect(expanded).to.be.ok;
});
});
```
32 changes: 32 additions & 0 deletions .changeset/hip-coins-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@patternfly/elements": major
---
`<pf-accordion>`: Removed `BaseAccordion*` classes, as well as static `isPanel`, `isHeader`, and `isAccordion` methods. Removed the optional `parentAccordion` parameter to `PfAccordion#expand(index)`. Renamed accordion event classes by adding the `Pf` prefix:

**Before**:

```js
import {
AccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof AccordionHeaderChangeEvent) {
// ...
}
});
```

**After**:

```js
import {
PfAccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof PfAccordionHeaderChangeEvent) {
// ...
}
});
```
327 changes: 0 additions & 327 deletions elements/pf-accordion/BaseAccordion.ts

This file was deleted.

Loading
Loading