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

v2 migration: guides/development to next #1670

Merged
merged 19 commits into from
Nov 30, 2023

Conversation

vasfvitor
Copy link
Contributor

@vasfvitor vasfvitor commented Nov 8, 2023

What kind of changes does this PR include?

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

Description

Pages:
https://tauri.app/v1/guides/development/development-cycle
https://tauri.app/v1/guides/development/updating-dependencies

v2 (next):

Original from v1:

sidebar preview:

Personal Notes (can be ignored)

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

can be replaced by import { Tabs, TabItem } from '@astrojs/starlight/components'; to place code, if needed
or import CommandTabs from '@components/CommandTabs.astro'; to place commands

This import Command from '@theme/Command'
to import CommandTabs from '@components/CommandTabs.astro';

The Command
<Command name="dev" />
becomes

<CommandTabs
	npm="npm run tauri dev"
	yarn="yarn tauri dev"
	pnpm="pnpm tauri dev"
	cargo="cargo tauri dev"
/>

https://starlight.astro.build/guides/authoring-content/#note-aside
:::info title
into
:::caution[title]

:::info can be: note, tip, caution or danger depending on context.

Copy link

netlify bot commented Nov 8, 2023

Deploy Preview for tauri-docs-starlight ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 104e810
🔍 Latest deploy log https://app.netlify.com/sites/tauri-docs-starlight/deploys/6568acd151491500070a0cd1
😎 Deploy Preview https://deploy-preview-1670--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.

@github-actions github-actions bot added the i18n Is this related to translations? label Nov 8, 2023
Copy link
Member

@lorenzolewis lorenzolewis left a comment

Choose a reason for hiding this comment

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

Thank you! @vasfvitor ! A few notes:

  • KO and IT translations: I saw your message on Discord this morning (just getting back in). I think we should transfer those translations into this branch as well but keep them deactivated. I haven't looked into the best way to do this (whether via drafts, using an underscore prefix, etc.) but I saw you had a local draft with that so will take your guidance on that
  • Instead of having all of the sub-pages in the sidebar I'd prefer to just keep the "parent" page, so in this case "Develop". Then on that landing page you could use the LinkCard component to jump out to those. One UX item I don't like with that is the parent's sidebar entry won't be highlighted when on a sub-page. I've put in a discussion for this in Highlight Sidebar Entry for Subpages withastro/starlight#950 and I know that Astro's main docs are also wanting similar behaviour. We can always do a component override to get this functionality in the meantime.

src/content/docs/fr/guides/develop/development-cycle.mdx Outdated Show resolved Hide resolved
src/content/docs/guides/develop.mdx Outdated Show resolved Hide resolved
src/content/docs/guides/develop/development-cycle.mdx Outdated Show resolved Hide resolved
vasfvitor and others added 3 commits November 27, 2023 22:17
Co-authored-by: Lorenzo Lewis <[email protected]>
Co-authored-by: Lorenzo Lewis <[email protected]>
Co-authored-by: Lorenzo Lewis <[email protected]>
@vasfvitor
Copy link
Contributor Author

About the translations: Ok, I'll look what I've done here

About the highlight: I've been following the Astro Docs migration to Starlight and they at least solved this in their code as you can see here https://docs-git-fork-theotterlord-starlight-migration-astrodotbuild.vercel.app/en/tutorial/1-setup/
So I consider every parent page will have this LinkCard component.
I'll go through each PR this week

@vasfvitor
Copy link
Contributor Author

vasfvitor commented Nov 28, 2023

Don't know if this is trivial but I guess it's up to you. Consider that having descriptions we'd have to write each one, copy from pages contents (as we don't have yet unique descriptions for each page) . With this in mind the simplest way would be 3. List without description. It's already committed this way (3), but in case you want to change, please.

TODO: Highlight the sidebar. I guess a dedicated PR for this one is better.

Added a commit where the develop.mdx page was moved to develop/index.mdx. The end / is not necessary in Astro Config for it to work. If this is ok, then we can settle as the default way to migrate. Same as the Link Card layout, I'd say.

Italian i18n have the /development pages but they are not translated

  1. Grid with description:




2. Grid without description:




3. List without description




4. List with description

@vasfvitor vasfvitor marked this pull request as ready for review November 28, 2023 02:12
@lorenzolewis
Copy link
Member

Awesome! And yes, I heard Sarah say at one point that Astro docs wanted that sub-item highlighting, but didn't take the time to see if/how they'd implemented it. So awesome to see!

I prefer option 1 with the grid with descriptions. One approach you could use to reduce duplicating those descriptions would be to pull in the content collection entry and get the respective title and description (if available) from there. I've done a similar thing in this component: https://github.com/tauri-apps/tauri-docs/blob/next/src/components/list/Features.astro (note: I haven't tested if it works correctly for i18n'd pages, I'm 99% sure it does not).

I actually have been wanting to build on top of LinkCard to allow passing a slug to it and then have the component itself automatically pull in the respective i18n's title, description, and link and PR that upstream, but haven't had the chance.

Would you be interested in wrapping LinkCard to give that functionality? Then that can be easily applied to the rest of the migrations as well.

@vasfvitor
Copy link
Contributor Author

As of now, all pages shares the same description from v1 docs. The ones in the image was copied from page contents as an example. And from what I've seen in v1 pages, it's the same deal: shared description from the _category_.yml file.

Just to be sure we'll settle with 1, then fallback to 2? Will we write copy for each page?

I'm not sure I follow you on the "PR that upstream" part. I understood: create a custom component and open a separated PR here for it to be available.

To update, I'm already playing with a new/replacement component (based on Features.astro) that works with i18n.

Aiming to make available translated content and fallback in the list, and if I manage, add a "fallback" notice on the card.

So far it kinda works for both i18n translated and default pages, but not for fallback, yet. Almost there

@vasfvitor vasfvitor changed the title Draft: migrate guides/development to next feat: migrate guides/development to next Nov 29, 2023
@lorenzolewis
Copy link
Member

Sorry, I could have been a little more clear in my explanation, so my bad.

Let's go with how you currently have it setup for this PR (with just the title and link) and then we can work through #1717 in parallel then update once that's done (if needed). I'll put a few more comments on that PR directly for that.

Does that all sound alright? Ready to merge this in?

`index.md` was `develop.md`. Page title was present in v1 docs.
@vasfvitor
Copy link
Contributor Author

updated to be list, for now without description.
created index page for each i18n page
now it's ready

@lorenzolewis
Copy link
Member

Perfection! Thank you very much! Hopefully the other will be a bit easier now to push through.

@lorenzolewis lorenzolewis merged commit 1ded116 into tauri-apps:next Nov 30, 2023
7 checks passed
@vasfvitor vasfvitor changed the title feat: migrate guides/development to next v2 migration: guides/development to next Dec 5, 2023
@vasfvitor vasfvitor deleted the guides-develop branch February 25, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Is this related to translations?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants