-
Notifications
You must be signed in to change notification settings - Fork 270
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
[framework][Feature Request] Server-Side Rendering of UI5 Web Components #6626
Labels
Comments
ilhan007
changed the title
Server-Side Rendering: initial research
[Topic Core][Research] Server-Side Rendering of UI5 Web Components
Mar 2, 2023
@ilhan007 Any more details regarding this topic? |
The Declarative Shadow DOM proposal has now been merged into the HTML Spec and it looks like Firefox is going to implement it soon as well. Are there any plans to implement this feature in the next couple of months? |
ilhan007
changed the title
[Topic Core][Research] Server-Side Rendering of UI5 Web Components
[framework][Feature Request] Server-Side Rendering of UI5 Web Components
Jul 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
Server-Side Rendering (SSR)
is a technique in which the server generates the full HTML for a page on the server in response to navigation. This avoids additional round-trips for data fetching and templating on the client, since it’s handled before the browser gets a response(https://web.dev/rendering-on-the-web/). When it comes to web components, it means generating and serving the HTML of the web components, including shadow DOM and styles, before their JavaScript implementations have loaded and executed.SSR
can be used for a variety of reasons but performance is the most obvious one - some sites can render faster if they render static HTML first without waiting for JavaScript to load, then (optionally) load the page's JavaScript and hydrate the components.Declarative Shadow DOM
Historically, it has been difficult to use
Shadow DOM
in combination withServer-Side Rendering
because there was no built-in way to express Shadow Roots in the server-generated HTML. There are also performance implications when attaching Shadow Roots to DOM elements that have already been rendered without them. This can cause layout shifting after the page has loaded, or temporarily show a flash of unstyled content while loading the Shadow Root's stylesheets.Declarative Shadow DOM
removes this limitation, bringing Shadow DOM to the server - it's a element with ashadowrootmode
attribute:A template element with the shadowrootmode attribute is detected by the HTML parser and immediately applied as the shadow root of its parent element. Loading the pure HTML markup from the above sample results in the following DOM tree:
Declarative Shadow DOM Support
Feature Request
As an application developer I would like to server-side my app, built UI5 Web Components could support some of the popular frameworks - like Next.js as described in FR #2240 by @MarcusNotheis
Tasks
Additional Context
Lit
already have done some progress on the topic and provides the @lit-labs/ssr package for server-side rendering Lit templates and components.As we internally reuse lit templates, we have to look into that implementation and available integrations with server side frameworks- KOA, Astro
Related Issues
#2240
#6192
Priority
A clear and concise description of the impact/urgency of the required feature.
Stakeholder Info (if applicable)
The text was updated successfully, but these errors were encountered: