-
-
Notifications
You must be signed in to change notification settings - Fork 202
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: User pages SSR & open graph #1095
Conversation
β Deploy Preview for oss-insights ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
β Deploy Preview for design-insights ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the correct image URL. Make a 2nd HEAD request for the actual image! π
@0-vortex @brandonroberts |
Updated the code to now run the data fetching in parallel. |
This is a "backfill" type (first time ever) generation issues, due to our S3 bucket being versioned: https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html You are, however, correct that the fetch request can reject the promise under a network error case or the API returning 500 server error. In that case, we should catch and not let the meta generation fail or break the page, potentially returning a placeholder image. |
Some more information: image generation takes at best 7 seconds. When posting a user page to any social media, the 2nd server request will read the static re-generated. You can test the caching needs update 304 status for users in the list with 3 days last generation, while, users not in this list will trigger 404: |
@0-vortex |
previous version was ok, this is not fixing the potential error. |
This reverts commit 2432b53.
@0-vortex Reverted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let see if we can get this merged to move on to the next social card, Highlights. The approach and performance can be improved as we learn through more use cases.
π This PR is included in version 1.42.0-beta.1 π The release is available on GitHub release Your semantic-release bot π¦π |
## [1.42.0](v1.41.1...v1.42.0) (2023-04-18) ### π Features * redirect user to the dashboard with repos after onboarding ([#1096](#1096)) ([765de71](765de71)) * server render user pages and add open graph image ([#1095](#1095)) ([d1a043b](d1a043b)) ### π Bug Fixes * update user id check for editing an insight page ([166530d](166530d))
π This PR is included in version 1.42.0 π The release is available on GitHub release Your semantic-release bot π¦π |
## [1.42.0-beta.1](open-sauced/app@v1.41.1...v1.42.0-beta.1) (2023-04-17) ### π Features * redirect user to the dashboard with repos after onboarding ([#1096](open-sauced/app#1096)) ([765de71](open-sauced/app@765de71)) * server render user pages and add open graph image ([#1095](open-sauced/app#1095)) ([d1a043b](open-sauced/app@d1a043b))
## [1.42.0](open-sauced/app@v1.41.1...v1.42.0) (2023-04-18) ### π Features * redirect user to the dashboard with repos after onboarding ([#1096](open-sauced/app#1096)) ([765de71](open-sauced/app@765de71)) * server render user pages and add open graph image ([#1095](open-sauced/app#1095)) ([d1a043b](open-sauced/app@d1a043b)) ### π Bug Fixes * update user id check for editing an insight page ([166530d](open-sauced/app@166530d))
What type of PR is this? (check all applicable)
Description
/user/[username]
into server-side rendering, instead of default static site generation.Some Notes
User profile's data is fetched on the server because it is needed for the user's bio meta tag. However, user's contribution data is not needed in the meta tags so it is fetched client-side to decrease the load on the server. This means a generic loading state for the whole page is now unacceptable, and there should be loading states over the components that wait for the contribution data. (Needs a ticket).Not applicable anymore till the below point is dealt with.Requesting User data & social card data are done sequentially. They are independent and so should be done in parallel for faster response.Done.Insight/Reasoning behind the decision to move to SSR: #1091 (comment)
Related Tickets & Documents
fixes #1091
fixes #879
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
Some tickets need opening, mentioned in the side-effects in the description.
[optional] What gif best describes this PR or how it makes you feel?