Releases: patternfly/patternfly-elements
@patternfly/[email protected]
Major Changes
-
0277045: Enable
connectedCallback()and context protocol in SSR scenarios.BREAKING CHANGE
This change affects any element which is expected to execute in node JS when
lit-ssr shims are present. By enabling theconnectedCallback()to execute
server side. Elements must ensure that their connectedCallbacks do not try to
access the DOM.Before:
connectedCallback() { super.connectedCallback(); this.items = [...this.querySelectorAll('my-item')]; }
After:
connectedCallback() { super.connectedCallback(); if (!isServer) { this.items = isServer ? [] : [...this.querySelectorAll('my-item')]; } }
Minor Changes
-
8b5b699: SSR: added
ssr-hint-has-slottedandssr-hint-has-slotted-defaultattributes to elements that use slot controller.When running SSR on elements with slots, add these attributes to ensure they render correctly.
<pf-card ssr-hint-has-slotted-default ssr-hint-has-slotted="header,footer"> <h2 slot="header">Header Content</h2> <p>Default content</p> <span slot="footer">Footer Content</span> </pf-card>
Patch Changes
- a2f3254:
ScrollSpyController: respond to hashchange events
@patternfly/[email protected]
Minor Changes
-
8b5b699: SSR: added
ssr-hint-has-slottedandssr-hint-has-slotted-defaultattributes to elements that use slot controller.When running SSR on elements with slots, add these attributes to ensure they render correctly.
<pf-card ssr-hint-has-slotted-default ssr-hint-has-slotted="header,footer"> <h2 slot="header">Header Content</h2> <p>Default content</p> <span slot="footer">Footer Content</span> </pf-card>
Patch Changes
- 996e089: SSR: enable more elements and more features to be rendered server-side
- Updated dependencies [0277045]
- Updated dependencies [8b5b699]
- Updated dependencies [a2f3254]
- @patternfly/[email protected]
@patternfly/[email protected]
Patch Changes
- 9208bcf: Dev Server: pass
ignoreandtypeScriptoptions to import map generator plugin
@patternfly/[email protected]
Patch Changes
- 2910260: Update changesets version
@patternfly/[email protected]
Patch Changes
- 0fb28b6:
SlotController:hasContent/isEmptynow respects text nodes
@patternfly/[email protected]
Patch Changes
- fe349ea: Fixed type errors in create-element template
@patternfly/[email protected]
Patch Changes
- d2cd76d: Test Runner: prevent config exception when lightdom shims are present
@patternfly/[email protected]
Major Changes
-
f779095: Removes
EleventyRenderPluginfrom custom-elements-manifest 11ty plugin config. Ensure you add it yourself.Before:
module.exports = function (eleventyConfig) { eleventyConfig.addPlugin(CustomElementsManifestPlugin); };
After:
import { EleventyRenderPlugin } from "@11ty/eleventy"; // 3.0.0 only export default function (eleventyConfig) { eleventyConfig.addPlugin(CustomElementsManifestPlugin); eleventyConfig.addPlugin(EleventyRenderPlugin); }
@patternfly/[email protected]
Patch Changes
- 4a03ced: SSR: add shim for
ResizeObserver
@patternfly/[email protected]
Patch Changes
- 4a03ced: SSR: add shim for
ResizeObserver