-
Notifications
You must be signed in to change notification settings - Fork 12
Dynamic release notes rendering #1136
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I've tried to make it work on the server side using next-mdx-remote but it is still not working properly with Nextra layout. |
|
Hi @AlexIchenskiy, that's great! 👏 Lab v3.0.0 - Jan 29th, 2025 |
|
Hey @katarinasupe, thanks for the feedback! For now, the preview shows the latest Lab update with styles aligned to the rest of the page. However, it is not added to the table of contents. I can try adding it programmatically, but this solution is somewhat fragile - it will break if anything changes in Nextra. One option is to fix the Nextra version, ensuring stability, but I am unsure if this is the best approach. Do you have any suggestions, or do you think I should use this solution? Also, how do you think we should structure the release notes? I believe achieving what we currently have without significant effort and UX challenges may be difficult, as this involves mixed MDX and fetched data that cannot be sorted by date together. Is it a good idea to separate Lab updates from other product updates into different sections for better organization and sorting? Let me know your thoughts so we can decide the best approach for integrating the new Lab release notes fetching mechanism :) |
|
Note: @AlexIchenskiy and I synced and agreed that the title will be manually written so it's visible in the table of content. This will be applied to the latest release and merged to main. |
|
Dynamic release notes rendering for the Lab is ready! It fetches the data client-side to render release notes for three existing categories: ### Lab v3.1.0 - Mar 12th, 2025
<LabReleasesClient version="3.1.0" />as shown in the code. It can only be tested on https://documentation-git-dynamic-release-notes-memgraph.vercel.app/ or https://memgraph.com/ due to CORS restrictions. You can test it on this branch or contact the platform team if you want to add more links to allow CORS for testing on other branches :) |
|
Thank you @AlexIchenskiy! I'll merge it to master and track how it performs 😄 @tonilastre this means that it can be used for the next version of Lab. Please open the PR for release notes for the next version on the release branch, as you know when the release notes are ready. |
I explored two options, and each currently has a blocker:
Option 1: Server-side rendering
In this option there are both .jsx and .mdx file for the same page, since in the .jsx data is being fetched in getStaticProps (pre-rendering at build time). The problem is that he page renders as .jsx file and it doesn't fit well with our docs. I tried fixing that with Nextra Layout but then other issues arise which I didn't manage to get resolved.
Option 2: Client-side rendering
This option is not ideal, and it would be better to have server-side rendering for this kind of static page. Still, to overcome the issue of Option 1, I tried this option as well. This option fetches the data in to component on the fly, but this means it will fetch the data multiple times (for every Lab release that uses this component). Here, the issue is that the API (https://lab.memgraph.com/public/versions) does not allow requests from the frontend (due to CORS restrictions), and the browser blocks the fetch request (might be just because of the local development).
Next steps: ask the Platform team if they are familiar with this and maybe have a solution.
This is not a priority.