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: add /releases page #1688

Merged
merged 45 commits into from
Mar 25, 2024
Merged

feat: add /releases page #1688

merged 45 commits into from
Mar 25, 2024

Conversation

amrbashir
Copy link
Member

@amrbashir amrbashir commented Nov 18, 2023

What kind of changes does this PR include?

  • New or updated content
  • Changes to the docs site code

Description

  • What does this PR change? Give us a brief description.
    Add a release notes page.

Copy link

netlify bot commented Nov 18, 2023

Deploy Preview for tauri-docs-starlight ready!

Name Link
🔨 Latest commit d938f70
🔍 Latest deploy log https://app.netlify.com/sites/tauri-docs-starlight/deploys/66016bce7d94c5000889a1f4
😎 Deploy Preview https://deploy-preview-1688--tauri-docs-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@lorenzolewis
Copy link
Member

I'm really curious if we need this when the same information is on GitHub. What's the objective you're wanting from this? Just a more focused and filtered list of releases to highlight the more important/popular packages?

@amrbashir
Copy link
Member Author

That and Github releases page UX is awful and doesn't support quick navigation to a certain release (unless you know exactly what release you want)

@lorenzolewis
Copy link
Member

Hmm, that's a good point. I also wonder if change logs for the plugins would be nice to have? That could be included on the respective plugin pages. At first I was a bit torn at having the change details inline and running into formatting issues, but it's all markdown so that shouldn't be an issue.

On the implementation, I'd prefer polling the GitHub API during build and statically have the changelog on pages instead of dynamically on each page load. That'd reduce overall page load time for the viewer and make it feel snappier (plus makes it so we have less client-side JS to ship).

I'd like to play around with the UI a little bit, but what are your thoughts on the above before that?

@amrbashir
Copy link
Member Author

Hmm, that's a good point. I also wonder if change logs for the plugins would be nice to have? That could be included on the respective plugin pages. At first I was a bit torn at having the change details inline and running into formatting issues, but it's all markdown so that shouldn't be an issue.

Nice one, but inlining is probably not the way to go, just to not pollute documentation, I think all releases just be under /releases, because ideally we want to support tauri.app/releases/tauri/1.0.2 (which I just thought of now, so I will convert this PR to a draft until I get some time to get back to ti)

On the implementation, I'd prefer polling the GitHub API during build and statically have the changelog on pages instead of dynamically on each page load. That'd reduce overall page load time for the viewer and make it feel snappier (plus makes it so we have less client-side JS to ship)

That particular page doesn't need to have the best performance but yeah that would probably be better as it will make implementing tauri.app/releases/tauri/1.0.2 easier.

I'd like to play around with the UI a little bit, but what are your thoughts on the above before that?

Definitely feel free to do so, I don't very much like the styling I did

@amrbashir amrbashir marked this pull request as draft November 29, 2023 23:34
@lorenzolewis
Copy link
Member

Cool. If we do that then I can also just update some of the plugin meta links on the pages to point to a changelog page. Give me a shout if you want me to take a look at anything in the meantime.

@amrbashir amrbashir marked this pull request as ready for review December 14, 2023 00:45
@amrbashir
Copy link
Member Author

Shifted this PR to generate the releases pages on build, should be ready for review.

@amrbashir
Copy link
Member Author

I don't know why build fails with links validation tbh, @lorenzolewis do you have any idea why this happens?

@lorenzolewis
Copy link
Member

I believe because the links are formatted like /releases/@tauri-apps/cli/v2_0_0-alpha_18 but astro with change those to /releases/tauri-apps/cli/v2_0_0-alpha_18 to get rid of any special characters (note the @ is removed). They use https://www.npmjs.com/package/github-slugger under the hood (or a custom impl that gets the same output) so I'd use that to generate any links (and possibly any filenames as well).

@amrbashir
Copy link
Member Author

I believe because the links are formatted like /releases/@tauri-apps/cli/v2_0_0-alpha_18 but astro with change those to /releases/tauri-apps/cli/v2_0_0-alpha_18 to get rid of any special characters (note the @ is removed). They use npmjs.com/package/github-slugger under the hood (or a custom impl that gets the same output) so I'd use that to generate any links (and possibly any filenames as well).

Can we override this behavior somehow? ideally the link should contain the @ just fine, similar to https://paka.dev/npm/@tauri-apps/api

@lorenzolewis
Copy link
Member

Hmm, tbh I don't see anything in Starlight that would affect this, and generating a normal Astro page seems to retain special characters. We're using a slightly old version due to a few dependency incompatibilities so let me check in the morning if I can figure out whats happening.

@lorenzolewis
Copy link
Member

Actually, it may have to do with Content Collections because they do a tad bit of magic sauce on top of the default route handling. We can try this and see if it works (away from computer right now): https://docs.astro.build/en/guides/content-collections/#defining-custom-slugs

@amrbashir
Copy link
Member Author

amrbashir commented Dec 19, 2023

Actually, it may have to do with Content Collections because they do a tad bit of magic sauce on top of the default route handling. We can try this and see if it works (away from computer right now): docs.astro.build/en/guides/content-collections/#defining-custom-slugs

It didn't work unfortunately, the error is coming from this plugin though https://github.com/HiDeoo/starlight-links-validator

@simonhyll
Copy link
Contributor

If we can get the sidebar to show on all pages I'd say we can merge this and think of improvements later.

Shows here: https://deploy-preview-1688--tauri-docs-starlight.netlify.app/releases/
Doesn't show here: https://deploy-preview-1688--tauri-docs-starlight.netlify.app/releases/tauri/v1.2.2/

@vasfvitor
Copy link
Contributor

vasfvitor commented Mar 22, 2024

@simonhyll to account for this then I changed the design so the list of releases is enclosed in a dropdown like menu, as if it's mobile. Not quite good looking imo, but gtg I'd say

Copy link
Contributor

@simonhyll simonhyll left a comment

Choose a reason for hiding this comment

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

While I would want the right sidebar to show up in a manner more similar to the existing Starlight right sidebar, I think what we have currently is good enough to merge. We can toy around with the exact appearance down the line.

Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

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

I agree with Simon but it's tricky to generate a custom table of contents view, so let's go with this for now.

Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

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

I agree with Simon but it's tricky to generate a custom table of contents view, so let's go with this for now.

@lucasfernog lucasfernog merged commit 5c81737 into next Mar 25, 2024
7 checks passed
@lucasfernog lucasfernog deleted the feat/releases branch March 25, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants