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

Cell dimensions? #933

Open
Fil opened this issue Feb 28, 2024 · 1 comment
Open

Cell dimensions? #933

Fil opened this issue Feb 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Feb 28, 2024

I want SSR (#931), but it seems like a distant goal: it's not easy to do from node.js without strong constraints that make the code work both in Node and in the browser, not always possible (e.g. live data), and not always useful to SSR (for example, a complex image generated by a simple algorithm might be much heavier to download than the generating code).

However, and somewhat independently, we should be able to register the dimensions of unrendered cells (width, height, and maybe a few other computed styles) as a cheap way to eliminate "Cumulative Layout Shift". CLS —stuff moving around as the page loads— which is the one metric that gives Framework bad grades in terms of performance and reader experience.

I could see this as a manual process (adding ```js height=500px), though I suspect some simple automation might be possible without necessarily having to do a full SSR.

@Fil Fil added the enhancement New feature or request label Feb 28, 2024
@mbostock
Copy link
Member

Yeah. We should also support expressing the height as an aspect ratio since in many cases content is responsive. Of course in the case of text wrapping it’s impossible to server-side render the dimensions accurately, so it may be a fool’s errand to attempt this and we do need actual SSR…

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

No branches or pull requests

2 participants