create-t3-app icon indicating copy to clipboard operation
create-t3-app copied to clipboard

docs: language select and outdated docs banner

Open juliusmarminge opened this issue 2 years ago • 12 comments

Closes #770

✅ Checklist

  • [ ] I have followed every step in the contributing guide (updated 2022-10-06).
  • [ ] The PR title follows the convention we established conventional-commit
  • [ ] I performed a functional test on my final commit

Changelog

[Short description of what has changed]


Screenshots

[Screenshots]

💯

juliusmarminge avatar Nov 17 '22 16:11 juliusmarminge

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
create-t3-app ✅ Ready (Inspect) Visit Preview Nov 23, 2022 at 8:53PM (UTC)

vercel[bot] avatar Nov 17 '22 16:11 vercel[bot]

⚠️ No Changeset found

Latest commit: 436e57576458a0ba8990775ff669b8d4fc3ca629

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 17 '22 16:11 changeset-bot[bot]

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 100
🟢 Accessibility 100
🟢 Best practices 93
🟠 SEO 86
🟠 PWA 54

Lighthouse ran on https://create-t3-app-git-i18n-prep-t3-oss.vercel.app/

github-actions[bot] avatar Nov 17 '22 16:11 github-actions[bot]

CleanShot 2022-11-17 at 21 11 15@2x

needs some more styling and transitions

juliusmarminge avatar Nov 17 '22 20:11 juliusmarminge

@c-ehrlich I'm not sure how we're supposed to show how many revisions behind the English version the page is? Right now just fetching a single commit and comparing their dates.

What would be considered a revision?

juliusmarminge avatar Nov 17 '22 21:11 juliusmarminge

This is how it looks:

CleanShot 2022-11-17 at 22 28 53@2x

juliusmarminge avatar Nov 17 '22 21:11 juliusmarminge

Left todo:

  • Animate opening?
  • Close when clicking outside

juliusmarminge avatar Nov 17 '22 22:11 juliusmarminge

The header is currently overflowing on mobile

image

The Vue docs (imo one of the best internationalizations) just uses the language icon without showing which language you're currently on. I think that's ok, the active language is somewhat self evident information (it's either the one you want to read the docs in, or it isn't) image

Banner looks good from screenshots. Will take a look at the code tonight.

c-ehrlich avatar Nov 18 '22 07:11 c-ehrlich

The Vue docs (imo one of the best internationalizations) just uses the language icon without showing which language you're currently on. I think that's ok, the active language is somewhat self evident information (it's either the one you want to read the docs in, or it isn't)

Yep I agree. It is taking too much space too. Also I don't think we need to generalize the languages with country flags. Just the language name is fine

nexxeln avatar Nov 18 '22 09:11 nexxeln

Astro also includes a note block when a page is not translated at all, could this be added too? image

Note This page is not available on your language yet, meanwhile you will see the english version. Help us translate! More information about how to contribute.

hodeinavarro avatar Nov 18 '22 09:11 hodeinavarro

Yep I agree. It is taking too much space too. Also I don't think we need to generalize the languages with country flags. Just the language name is fine

I like flags :( Fair point about the generalization but I still think it adds something

juliusmarminge avatar Nov 18 '22 10:11 juliusmarminge

We should probably have some fallback behavior if the files doesn't exist yet for a specific langauge right?

https://user-images.githubusercontent.com/51714798/202825138-10f76736-6c8f-4a08-a0e3-18bcf45fe1fe.mp4

Example: Astro renders the english version in the sidebar if it doesn't exist for the native language:

CleanShot 2022-11-19 at 01 44 56@2x

juliusmarminge avatar Nov 19 '22 00:11 juliusmarminge