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

feat(GridBase): Apply spec for server-side rendering for relative gri… #15556

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MayaKirova
Copy link
Contributor

…d sizes.

Closes #15202

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@MayaKirova
Copy link
Contributor Author

@dkamburov @ChronosSF

FYI, the grid will now retain 100% size (width/height) from the SSR render, however note that things inside the grid may still flicker during hydration on the client.

For example:

  • Scrollbars may show, since we're going from an empty grid to a grid with data.

  • Columns that have relative size (in %), may change their size after hydration (and as a result of that also spawn a scrollbar). This makes sense because they were originally measured to the size the sever has used for pre-render.

    So it looks similar to this, when hydration occurs:
    grid_hydration

@ChronosSF ChronosSF requested review from kdinev and removed request for damyanpetev March 25, 2025 09:40
kdinev
kdinev previously approved these changes Mar 25, 2025
@mddragnev mddragnev added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Mar 28, 2025
@mddragnev
Copy link
Member

@MayaKirova If you have a grid width a fixed sizes ( let say 600px width and height) then the data should be rendered on the server but it doesnt. It renders on the client

@mddragnev mddragnev added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Apr 1, 2025
return !this.platform.isBrowser && this.isPercentHeight ? undefined : this.data;
}

@HostBinding('style.display')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't those host bindings be in the scss in the themes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They already are (you can find the same styles in the theme), but they don't get applied until the theme is fully loaded and they are necessary for the body content to stretch correctly in SSR. Hence why they are set inline as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid: general version: 19.2.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSR Grid Improvements
5 participants