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

[nextjs] Render FEaaS components server side #1413

Merged
merged 13 commits into from
Apr 11, 2023

Conversation

art-alexeyenko
Copy link
Contributor

Ensure feaas-component can generate server markup as well as client one.

Description / Motivation

FEaaS wrapper would only add a client component previously - so all the rendering would be done client-side.
With this change we support FEaaS wrapper generating server markup. At the same time there's a fallback to only generate client component when required server props are missing.

It also includes a rework of how it handles extra data (i.e. fields are no longer a part of props), but perhaps it needs to be reintroduced.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate) - tested with connected, production mode

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested review from Inviz and a team March 30, 2023 23:03
@Inviz
Copy link
Contributor

Inviz commented Apr 3, 2023

Seems like a solid work. Thanks Artem for working through the kinks with me, your help is very appreciated.

Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Good work! Please, see review comments below

Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

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

Looks like we lost use of Sitecore datasources (code which reads datasource component fields was removed). Based on the PR description, this was intentional. Is there more coming to bring this back? Or is this now somehow built in to the FEAAS SDK?

@art-alexeyenko art-alexeyenko requested a review from ambrauer April 5, 2023 20:22
Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

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

Just one last thought. Otherwise, looks good to me

@illiakovalenko
Copy link
Contributor

illiakovalenko commented Apr 6, 2023

@art-alexeyenko Please, add note to CHANGELOG file and see comments above + unresolved comments

@art-alexeyenko art-alexeyenko merged commit 5c498b6 into dev Apr 11, 2023
@art-alexeyenko art-alexeyenko deleted the feature/feaas-server-side branch April 11, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants