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

Proposal: Inline Components #4

Open
loreanvictor opened this issue Jan 31, 2023 · 2 comments
Open

Proposal: Inline Components #4

loreanvictor opened this issue Jan 31, 2023 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@loreanvictor
Copy link
Owner

loreanvictor commented Jan 31, 2023

Inline components are web components that render their content directly on the host element instead of the shadow root. This sacrifices encapsulation in favor of enabling pre-rendering. In the long run, hopefully something in lines of declarative shadow DOM gets standardised and need for inline components would vanish.

Requirements:

  • Except for stuff that explicitly rely on encapsulation (e.g. adding stylesheets), the component body should be unaware of the fact that it is an inline component.
  • All hooks must work (will they?)
  • Minimal code for making this work (ideally just the base component class).
@loreanvictor loreanvictor added enhancement New feature or request question Further information is requested labels Jan 31, 2023
@loreanvictor
Copy link
Owner Author

loreanvictor commented Feb 1, 2023

Perhaps this could also be a separate lib? It might be a good idea to keep API surface minimal.

Additionally, relationship between inline components and static components needs to be considered, as static components are only useful for SSR, which currently only makes sense if they are inline. But two questions remain:

  • Are inline, non-static components, a useful concept?
  • Isn't it enough to simply not include the code for static components in the bundle? In that case, isn't the concept tightly coupled with a particular SSR solution?

@loreanvictor
Copy link
Owner Author

seems like Safari added support for DSD and the Mozilla team is also positive, which, alongside Chrome already supporting the feature, might make this proposal obsolete. will keep it open for now, both to track standardisation of DSD, and also to contemplate other potential use cases for inline components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant