-
Notifications
You must be signed in to change notification settings - Fork 106
fix(core): ssr events #2891
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
Merged
Merged
fix(core): ssr events #2891
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d5c27c2
chore: nvm use lts
bennypowers ba4408c
chore: bump lit-labs/ssr
bennypowers cd54b8b
chore: bump lit/context
bennypowers 1bddaa9
fix: update context usage for ssr
bennypowers ed2a4c9
fix: use lit-ssr html function
bennypowers 0088148
fix(core): rely on lit's dom-shim
bennypowers 837f66a
chore: update and align lit version
bennypowers a127114
fix(core): ssr connected callback
bennypowers 1fffb2c
fix(elements): ssr connected callbacks
bennypowers 9bd0874
fix(elements): table th role from context instead of dom
bennypowers d605a41
feat(core): wip slots decorator
bennypowers 49c3202
fix(core): empty array check
bennypowers 0b3dffa
fix(core): remove need for static decorator for ssr slot hints
bennypowers dd752d5
fix: revert slot controller changes
bennypowers 453280b
fix: keep isServer in client-side slot controller
bennypowers 81ef4f2
refactor(tools): readability
bennypowers 9217a54
docs: major changeset
bennypowers a494466
Merge branch 'main' into fix/ssr-events
bennypowers 7d1546d
Merge branch 'main' into fix/ssr-events
zeroedin 701f33f
fix(core): add isServer to scrollspy controller
zeroedin 72d738e
Revert "fix(core): add isServer to scrollspy controller"
bennypowers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@patternfly/pfe-core": patch | ||
| "@patternfly/elements": patch | ||
| --- | ||
| Enable context protocol in SSR scenarios. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.10.0 | ||
| v22.13.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import type { ReactiveElement } from 'lit'; | ||
|
|
||
| import { SlotController, type SlotControllerArgs } from '../controllers/slot-controller.js'; | ||
|
|
||
| /** | ||
| * Enable ssr hints for element | ||
| * @param args a spread of slot names, or a config object. | ||
| * @see SlotController constructor args | ||
| */ | ||
| export function slots<T extends typeof ReactiveElement>(...args: SlotControllerArgs) { | ||
bennypowers marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return function(klass: T): void { | ||
| klass.createProperty('ssrHintHasSlotted', { | ||
| attribute: 'ssr-hint-has-slotted', | ||
| converter: { | ||
| fromAttribute(slots) { | ||
| return (slots ?? '') | ||
| .split(/[, ]/) | ||
| .map(x => x.trim()) | ||
| .map(x => x === 'default' ? null : x); | ||
| }, | ||
| }, | ||
| }); | ||
| klass.addInitializer(instance => { | ||
| new SlotController(instance, ...args); | ||
| }); | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.