Skip to content

Commit a8a623c

Browse files
authored
feat!: remove deprecated APIs (#3090)
- Remove CascadeController and @Cascades decorator (use @lit/context) - Remove SlotController.anonymous (use SlotController.default) - Remove pf-popover closeButtonLabel / close-label attribute (use accessible-close-label) pfeCustomElementsManifestConfig was already removed from the codebase. Closes #2975, closes #2974, closes #2973, closes #2972 Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 25f2617 commit a8a623c

8 files changed

Lines changed: 15 additions & 208 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@patternfly/pfe-core": major
3+
"@patternfly/elements": major
4+
---
5+
6+
Removed deprecated APIs:
7+
8+
- **`CascadeController`** and **`@cascades`** decorator are removed.
9+
Use [`@lit/context`](https://lit.dev/docs/data/context/) instead for
10+
sharing data between parent and child elements.
11+
- **`SlotController.anonymous`** is removed. Use `SlotController.default` instead.
12+
- **`pf-popover`**: the `close-label` attribute and `closeButtonLabel` property
13+
are removed. Use `accessible-close-label` instead.

core/pfe-core/controllers/cascade-controller.ts

Lines changed: 0 additions & 169 deletions
This file was deleted.

core/pfe-core/controllers/slot-controller-server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
export class SlotController implements SlotControllerPublicAPI {
88
public static default = Symbol('default slot') satisfies symbol as symbol;
99

10-
/** @deprecated use `default` */
11-
public static anonymous: symbol = this.default;
1210

1311
static attribute = 'ssr-hint-has-slotted' as const;
1412

core/pfe-core/controllers/slot-controller.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ class SlotRecord {
130130
export class SlotController implements SlotControllerPublicAPI {
131131
public static default = Symbol('default slot') satisfies symbol as symbol;
132132

133-
/** @deprecated use `default` */
134-
public static anonymous: symbol = this.default;
135133

136134
#slotRecords = new Map<string | typeof SlotController.default, SlotRecord>();
137135

core/pfe-core/decorators.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from './decorators/bound.js';
2-
export * from './decorators/cascades.js';
32
export * from './decorators/deprecation.js';
43
export * from './decorators/initializer.js';
54
export * from './decorators/listen.js';

core/pfe-core/decorators/cascades.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

core/pfe-core/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"./core.js": "./core.js",
2323
"./decorators.js": "./decorators.js",
2424
"./controllers/activedescendant-controller.js": "./controllers/activedescendant-controller.js",
25-
"./controllers/cascade-controller.js": "./controllers/cascade-controller.js",
2625
"./controllers/css-variable-controller.js": "./controllers/css-variable-controller.js",
2726
"./controllers/floating-dom-controller.js": "./controllers/floating-dom-controller.js",
2827
"./controllers/internals-controller.js": "./controllers/internals-controller.js",
@@ -41,7 +40,6 @@
4140
"./controllers/timestamp-controller.js": "./controllers/timestamp-controller.js",
4241
"./controllers/tabs-controller.js": "./controllers/tabs-controller.js",
4342
"./decorators/bound.js": "./decorators/bound.js",
44-
"./decorators/cascades.js": "./decorators/cascades.js",
4543
"./decorators/deprecation.js": "./decorators/deprecation.js",
4644
"./decorators/initializer.js": "./decorators/initializer.js",
4745
"./decorators/observed.js": "./decorators/observed.js",

elements/pf-popover/pf-popover.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { classMap } from 'lit/directives/class-map.js';
99
import { ifDefined } from 'lit/directives/if-defined.js';
1010
import { FloatingDOMController } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';
1111
import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';
12-
import { deprecation } from '@patternfly/pfe-core/decorators/deprecation.js';
12+
1313
import { bound } from '@patternfly/pfe-core/decorators/bound.js';
1414
import { ComposedEvent, StringListConverter } from '@patternfly/pfe-core/core.js';
1515

@@ -161,13 +161,6 @@ export class PfPopover extends LitElement {
161161
*/
162162
@property({ reflect: true, attribute: 'accessible-close-label' }) accessibleCloseLabel?: string;
163163

164-
/**
165-
* @deprecated do not use the color-palette attribute, which was added by mistake. use context-providing containers (e.g. rh-card) instead
166-
*/
167-
@deprecation({
168-
alias: 'accessible-close-label',
169-
attribute: 'close-label',
170-
}) closeButtonLabel?: string;
171164

172165
/**
173166
* The text announced by the screen reader to indicate the popover's severity.
@@ -268,7 +261,7 @@ export class PfPopover extends LitElement {
268261
<pf-button id="close-button"
269262
part="close-button"
270263
plain
271-
label="${this.accessibleCloseLabel ?? this.closeButtonLabel ?? 'Close popover'}"
264+
label="${this.accessibleCloseLabel ?? 'Close popover'}"
272265
@click="${this.hide}"
273266
@keydown="${this.#onKeydown}"
274267
?hidden="${this.hideClose}">

0 commit comments

Comments
 (0)