[bug] ssr-shims.js uses deprecated globalThis.litSsrCallConnectedCallback
@zeroedin ci sta già lavorando.
Dal 6/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
@patternfly/pfe-core/ssr-shims.js sets globalThis.litSsrCallConnectedCallback = true to opt elements into connectedCallback during Lit SSR. This global was deprecated in @lit-labs/ssr@4.x in favor of LitElementRenderer.renderOptions.
The result is a repeated console warning during every SSR render pass:
litSsrCallConnectedCallback is deprecated. Please use LitElementRenderer.renderOptions instead.
Current behavior
https://github.com/patternfly/patternfly-elements/blob/main/core/pfe-core/ssr-shims.ts
globalThis.litSsrCallConnectedCallback = true;
This triggers the deprecation path inside LitElementRenderer.connectedCallback() on every element instance rendered, flooding build logs with warnings.
Expected behavior
Replace the deprecated global with the new per-element configuration API:
import { LitElementRenderer } from '@lit-labs/ssr/lib/lit-element-renderer.js';
// Replicate the previous blanket opt-in for PFE/RHDS elements
LitElementRenderer.renderOptions.push(
(element) =>
element.localName.startsWith('pf-') || element.localName.startsWith('rh-')
? { connectedCallback: true }
: undefined
);
Or, to preserve the exact previous behavior (all LitElements get connectedCallback called):
LitElementRenderer.renderOptions.push(() => ({ connectedCallback: true }));
Impact
- The warning is cosmetic for now —
@lit-labs/ssrstill honors the global alongside the warning. - However, a future major version of
@lit-labs/ssrwill likely remove support for the global entirely, making this a future breaking change.
Environment
@patternfly/pfe-core: 5.0.8@lit-labs/ssr: 4.1.0
- Lingua principale
- TypeScript
- Stelle
- 394
- Fork
- 107
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di patternfly/patternfly-elements
-
patternfly/patternfly-elements#3136 · 1 commento · 1 assegnatario ·
-
docs
patternfly/patternfly-elements#3131 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
patternfly/patternfly-elements#3122 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
patternfly/patternfly-elements#3118 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
patternfly/patternfly-elements#3110 ·
Tutte le issue di patternfly/patternfly-elements
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
0xMiden/bridge-portal#132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:tools bug good first issue help wanted priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
newrelic-experimental/preflight#793 · 1 commento ·