-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixed Project og title added in ssr #3177
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
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
Hi @Rishab87, thanks for your work on this! I think although the changes here do work, I would double check that the changes to the I think a previously closed PR for this issue (https://github.com/processing/p5.js-web-editor/pull/2181/files#diff-b4206729ee1785504afa67759156d1d5dcaaa104c981f072f6e2538f0f2ff1d5), does create a solution for this by creating a separate function to render the index specifically for a project. One approach you could take is to reference this PR without including the portions that reformatted the files. |
Thanks for your time and help @raclim. I have added a separate |
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.
Thanks for much for your patience on this—sometimes it might take a moment to review PRs depending on what's happening with the project!
I went ahead with pushing some changes to this PR after noticing that some of the non-user project pages would crash on loading. It seems like this might be happening because the sendHtml()
function in server/views/index.js
was changed to expect an object rather than a boolean (which is how it's set up in other places where sendHtml()
is called).
To keep this consistent, I changed back the function to accept a boolean and added a new getProjectForUser()
method in the controller to retrieve the project's name in the /:username/sketches/:project_id
route. I did this to try to ensure that these changes don't affect the rest of the app while also trying to maintain your original work as much as possible.
I think another potential change that could be added in finding a way to consolidate the renderIndex()
and renderProjectIndex()
functions in server/views/index.js
since they're mostly doing the same thing, but I feel like it's okay to keep it for now and to refactor it later down the line!
I'm sorry that I ended up changing things around a bit—please feel free to create a new PR with any additional changes that you'd like to make here! Otherwise, thanks again for your work on this and I'm going to merge this in!
Thanks for your feedback , I'm really sorry to hear that you had to make a few changes as my code was breaking few parts of the application , I will be more careful next time while testing the application, thank you for your time and help. I'll surely try to improve this further and merge both the functions into one. |
No worries @Rishab87! I went ahead with implementing some of these changes to get this out since this issue's been around for a while 😅 I really appreciate you staying on top of this! |
Fixes #2177
Changes:
modified ssr to display og title
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123