Skip to content

Conversation

@HinataKah0
Copy link
Contributor

Migrate EditLink component from nodejs.dev
and create a new Story.

Related to: #5242

@HinataKah0 HinataKah0 requested a review from a team as a code owner April 14, 2023 10:02
@SEWeiTung
Copy link
Contributor

@HinataKah0 : Plz first to run the code formation check to verify your codes :)

Thank you for your 1st contribution!

npm run prettier:fix

Copy link
Contributor

@SEWeiTung SEWeiTung left a comment

Choose a reason for hiding this comment

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

There're still many things I want to mention for the "Edit on GitHub", and this problem has happened in "nodejs.dev":

“Edit on GitHub”'s Problem

First let's see a bug (Sorry I cannot send it directly to the nodejs.dev, bcoz it's now archived, and no-one has reported the bug yet):

1)Open the link something like this : https://nodejs.dev/zh-cn/about/

2)Click "Edit on GitHub":
网页捕获_15-4-2023_103945_nodejs dev

3)Notice we don't have a simplified translated file here yet, so this will return you a 404 page instead!
网页捕获_15-4-2023_105748_github com

Reason

We don't have real translated file yet, so we cannot use "edit" in the baseURL, as what I've mentioned in the code-review.

Several Solutions:

Solution 1:Smart Jump

Any languages with the "Edit on GitHub", when clicking it, it will jump to either the language itself (if we really have the page), or jump to the English page (to edit in English). Because we use translations in Crowdin instead of in GitHub.

Solution 2:"Edit" with an "Adding" function when without the translated page

  1. If we don't the page, we use "new" in the base URL. Then an empty page will be returned to you in GitHub, where you can do whatever you can.
  2. If we have the translated page, just keep "edit" in the base URL instead.

PS: Do we really need "Edit on GitHub"? Bcoz we've translated files in Crowdin instead of in GitHub, and if we do that, the default one will be in GitHub, is it suitable?

Solution 3:"Edit on GitHub" in English and "Edit on Crowdin" for other translations

I tend to cope with this, bcoz we're translating and editing in Crowdin mainly. And another advantage is that no matter whether we've got the page or not, we can directly open the file in the English version, and choose the language you wanna to translate into. To simplifiy the problem ,we can just make the "Edit On GitHub"'s link something like this following:

https://crowdin.com/project/nodejs-website/(your current language prefix here)

Take the Simplified Chinese as an example:
https://crowdin.com/project/nodejs-website/zh-CN

Notice:Crowdin doesn't include English itself, maybe for English, we still need "Edit on GitHub", but "Edit on Crowdin" for other translations?

Others

How do check the code just depends on how we think of the "Edit On GitHub"'s problem. And that's the reason why I use "Request changes" here. I'm not saying the code is "right" or "wrong", it should rely on discussions bcoz there're many things maybe we've missed before.

@SEWeiTung
Copy link
Contributor

Maybe "Edit On GitHub" for translations (for English pages/other translation pages) won't be too easy to migrate, it's nice for us to have a discussion here before deciding how to do XD

@ovflowd ovflowd force-pushed the major/website-redesign branch from 5cdab56 to 0240b9b Compare April 15, 2023 08:17
Ran:
npm i @fortawesome/react-fontawesome
npm i @fortawesome/free-solid-svg-icons
Migrate EditLink component from nodejs.dev
and create a new Story.
@ovflowd ovflowd force-pushed the feat/migrate-EditLink-component-2 branch from 353689e to e623d46 Compare April 15, 2023 09:09
@ovflowd
Copy link
Member

ovflowd commented Apr 15, 2023

Hey @HinataKah0 I've re-created your branch with the updated major/website-redesign so that you didn't need to rebase xD

Anyhow, can we use react-icons here instead? We're going to leave mui-icons and fort-awesome in favour of react-icons

@HinataKah0
Copy link
Contributor Author

HinataKah0 commented Apr 15, 2023

@MaledongGit

About lint issue:
It was resolved after merging major/website-redesign.

About redirection URL:
Thanks for bringing it up, it's a valid point.
+1 on it, I think let's wait for a while to hear inputs from others who understand the translation workflow as well.
I don't think it's worth to over-engineer the redirection logic. So I prefer to make it simple but enough to cater to our translation workflow.
Based on the README, initial development "usually" happens in English. So +1 for en -> "Edit on GitHub" and xx -> "Edit on Crowdin" currently.

@ovflowd

Thanks! Sure, react-icons works for me.

It looks like I'll change my copy-paste-able (I am lazy in general) commands to not rebase to make it similar with everyone's workflow 😝

@shanpriyan shanpriyan added the website redesign Issue/PR part of the Node.js Website Redesign label Apr 15, 2023
@SEWeiTung SEWeiTung dismissed their stale review April 16, 2023 01:59

Agreed together

@SEWeiTung
Copy link
Contributor

SEWeiTung commented Apr 16, 2023

So +1 for en -> "Edit on GitHub" and xx -> "Edit on Crowdin" currently.

Before posting this suggestions, I didn't anything related to it on README, is it you that is voting for this idea? Still on discussion or……?

But no matter what we do, if all of you can agree with the same idea or maybe a better one, that's nice, and I've cancelled my review now.

@HinataKah0
Copy link
Contributor Author

HinataKah0 commented Apr 16, 2023

is it you that is voting for this idea?

"+1" means I vote for the idea.

Actually, I think this is easily "revert"-able. So we can try any "easy-to-implement" idea first, then change it in the future if we see it doesn't fit well.

@ovflowd
Copy link
Member

ovflowd commented Apr 16, 2023

I'm fine with whatever y'all decide :)

@HinataKah0 HinataKah0 marked this pull request as draft April 18, 2023 16:32
English: redirect to GitHub edit page
Non-English: redirect to TRANSLATION.md
@vercel
Copy link

vercel bot commented Apr 20, 2023

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

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2023 9:36am
nodejs-org-stories ✅ Ready (Inspect) Visit Preview Apr 24, 2023 9:36am

@vercel vercel bot temporarily deployed to Preview – nodejs-org April 20, 2023 11:49 Inactive
@HinataKah0 HinataKah0 marked this pull request as ready for review April 20, 2023 11:50
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 11:50 Inactive
@HinataKah0
Copy link
Contributor Author

Edit (English):
Screenshot 2023-04-20 at 8 21 21 PM

Translate (Non-English):
Screenshot 2023-04-20 at 8 20 05 PM

@ovflowd
Copy link
Member

ovflowd commented Apr 20, 2023

@HinataKah0 no need to add screenshots of Storybooks here. Vercel Bot already adds preview link for Storybook 👀

@vercel vercel bot temporarily deployed to Preview – nodejs-org April 21, 2023 14:13 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 22, 2023 03:55 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org April 22, 2023 03:56 Inactive
fix en.json's conflicts

Signed-off-by: Wai.Tung <[email protected]>
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 22, 2023 03:59 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org April 22, 2023 04:01 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org April 22, 2023 10:17 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 22, 2023 10:18 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org April 22, 2023 10:20 Inactive
Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

LGTM! Tremendous work :) Thank you for this amazing contribution <3

@HinataKah0
Copy link
Contributor Author

HinataKah0 commented Apr 22, 2023

@MaledongGit Sorry I missed to address your comment.

About all uppercase, I did comparison:
Screenshot 2023-04-22 at 6 49 03 PM
Screenshot 2023-04-22 at 6 49 28 PM

Styling is always opinionated 😛
TBH, I prefer the 2nd one as well (aesthetic). However, the 2nd one seems weaker in size compared to the paragraph above it which makes it less noticeable. So, if we want to change the style, I think we might need to increase the font size a bit or keep it as it is for now.

I think let's keep it as it is since it is very much a matter of taste (different people will have different opinions).

@SEWeiTung
Copy link
Contributor

TBH, I prefer the 2nd one as well (aesthetic). However, the 2nd one seems weaker in size compared to the paragraph above it which makes it less noticeable.

Yes, I must admin it looks not noticeable, mixed with other Latin-words.
Maybe prettier it with some styles (to change the colors of the font).
But that's not an important case. Just a suggestion left here.

@ovflowd
Copy link
Member

ovflowd commented Apr 23, 2023

Can someone give the extra approval that this PR requires? :) cc @nodejs/website

Copy link
Member

@mikeesto mikeesto left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution

@vercel vercel bot temporarily deployed to Preview – nodejs-org April 24, 2023 09:32 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 24, 2023 09:33 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories April 24, 2023 09:35 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org April 24, 2023 09:36 Inactive
@ovflowd ovflowd merged commit f989ea9 into nodejs:major/website-redesign Apr 24, 2023
ovflowd added a commit that referenced this pull request May 3, 2023
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>
@HinataKah0 HinataKah0 deleted the feat/migrate-EditLink-component-2 branch May 14, 2023 09:33
ovflowd added a commit that referenced this pull request May 14, 2023
* feat(unit-test): introduce unit test on website redesign branch (#5178

feat(unit-test): introduce unit test

* chore(minor): just a tiny design nitpick

* chore: set up storybook (#5191) (#5214)

* chore: set up testing-library jest extend (#5231)

Co-authored-by: Manish Kumar ⛄ <[email protected]>

* chore(dependencies): updated dependencies

* feat: create section title component (#5237)

Co-authored-by: Wai.Tung <[email protected]>

* 📎 chore(migration): migrate banner component (#5233)

Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>

* feat: migrate AnimatedPlaceholder component (#5238

Migrate AnimatedPlaceholder component from nodejs.dev
and create a new Story.

* feat: create article alert component (#5243)

* feat: migrate blockquote component (#5259)

* feat(stylelint,storybook): fixed styleling misconfig and fixed storybooks (#5281)

* feat: create article data tag component (#5280)

* feat: migrate AuthorList component and add story 🎉 (#5277)

Co-authored-by: Michael Esteban <[email protected]>

* chore(migration): migrate language selector component (#5266)

Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>

* feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5236)

Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>

* chore: updated contributing guidelines, eslint rules and storybook templates (#5294)

Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Manish Kumar ⛄ <[email protected]>

* chore: contributing quick fix of example

Signed-off-by: Claudio Wunder <[email protected]>

* chore: story guide and react spreading

Signed-off-by: Claudio Wunder <[email protected]>

* chore: remove base styles from old styling

* chore: fix storybook styles, imports, typescript config and dependencies (#5319

* chore: optimises tsconfig

* chiore: add missing dependencies

* chore: type storybook constants

* chore: styles moved styles to somewhere else

* chore: add global json type definition

* chore: i18n aria-label instead of sr-only

* chore: added open sans font family and space between imports

* chore: moved styles and fixed styles and updated banner stories

* fix: stylelint rules

* chore: updated tsconfig

* chore: fix tests

* fix: darkmodetoggle test

* chore: stories use index.stories.tsx

* chore: adopt turborepo (#5316

* chore: revert pnpm use plain npm

* fix: package.json

* chore: remove warnings and add node_env

* chore: cross-env

* fix: fix turbo pipelines

* chore: only cache certain files

* chore: turbo shouldn't care about coverage outputs

* chore: proper inputs and outputs for pipelines

* chore: do not store some outputs and updated inputs for lint

* chore: added prettier configs

* chore: remove console.info

* chore: updated inputs of all other entries

* fix(package.json) Lint command is missing slashes (#5321

fix(package.json) lint:fix missing slashes

* moved `DataTag` to `components/Api` (#5317)

Co-authored-by: vasanth9 <cheepurupalli.vasanthkumar.com>
Co-authored-by: Shanmughapriyan S <[email protected]>

* hot-fix: dependency updates and fix dev runtime

* chore: updated start command

* migration(Layout): newFooter (#5320)

Co-authored-by: Claudio Wunder <[email protected]>

* feat: migrate EditLink component (#5271)

Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>

* feat(blog) Migrate BlogCard component (#5323)

Co-authored-by: Michael Esteban <[email protected]>

* Issue#5307 - Add framer-motion to the dependency list (#5318)

* chore: add remote turbo cache and simplified gh actions cache (#5326)Co-authored-by: Aymen Naghmouchi <[email protected]>

* chore: add remote turbo cache and simplified gh actions cache

* chore: updated cache rules

* chore: more cache rules

---------

Co-authored-by: Aymen Naghmouchi <[email protected]>

* chore: fix storybook local development mode (#5335)

* chore: migrate pagination component (#5331)

Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>

* Chore(node feat) (#5338)

Co-authored-by: Claudio Wunder <[email protected]>

* chore: migrate releases types (#5324)

* hotfix: first element no margin-top

* (website redesign) Feat(shellbox): migration (#5234)

Co-authored-by: Manish Kumar ⛄ <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>

* fix(i18n): translation key (#5347)

Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>

* chore: updated dependencies

* chore: vercel enable middleware and i18n redirection (#5300)

* feat(unit-test): introduce unit test on website redesign branch (#5178

feat(unit-test): introduce unit test

* chore: set up storybook (#5191) (#5214)

* feat(stylelint,storybook): fixed styleling misconfig and fixed storybooks (#5281)

* feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5236)

Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>

* chore: updated contributing guidelines, eslint rules and storybook templates (#5294)

Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Manish Kumar ⛄ <[email protected]>

* chore: fix storybook styles, imports, typescript config and dependencies (#5319

* chore: optimises tsconfig

* chiore: add missing dependencies

* chore: type storybook constants

* chore: styles moved styles to somewhere else

* chore: add global json type definition

* chore: i18n aria-label instead of sr-only

* chore: added open sans font family and space between imports

* chore: moved styles and fixed styles and updated banner stories

* fix: stylelint rules

* chore: updated tsconfig

* chore: fix tests

* fix: darkmodetoggle test

* chore: stories use index.stories.tsx

* chore: adopt turborepo (#5316

* chore: revert pnpm use plain npm

* fix: package.json

* chore: remove warnings and add node_env

* chore: cross-env

* fix: fix turbo pipelines

* chore: only cache certain files

* chore: turbo shouldn't care about coverage outputs

* chore: proper inputs and outputs for pipelines

* chore: do not store some outputs and updated inputs for lint

* chore: added prettier configs

* chore: remove console.info

* chore: updated inputs of all other entries

* feat(stability): migrate component

* chore(snapshot): update

* Update components/Api/Stability/index.tsx

Co-authored-by: Claudio Wunder <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update components/Api/Stability/index.tsx

Co-authored-by: Claudio Wunder <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update components/Api/Stability/index.tsx

Co-authored-by: Claudio Wunder <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* fea(stability): update stories + fix

* Update components/Api/Stability/index.stories.tsx

Co-authored-by: Claudio Wunder <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* fix(i18n): update turkish language direction (#5182)

* chore: rollback CODEOWNER changes (#5183)

* Sync: merge `major/website-redesign` into `main` (#5356)

Co-authored-by: Manish Kumar ⛄ <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: vasanth9 <cheepurupalli.vasanthkumar.com>
Co-authored-by: Aymen Naghmouchi <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Augustin Mauroy <[email protected]>
Co-authored-by: Guilherme Araújo <[email protected]>
Co-authored-by: Augustin Mauroy <[email protected]>
Co-authored-by: HinataKah0 <[email protected]>
Co-authored-by: Olaleye Blessing <[email protected]>
Co-authored-by: ktssr <[email protected]>
Co-authored-by: Harkunwar Kochar <[email protected]>
Co-authored-by: vasanthkumar <[email protected]>
Co-authored-by: Floran Hachez <[email protected]>
Co-authored-by: Jatin <[email protected]>

* feat(stability): update snapshot

* Update components/Api/Stability/index.tsx

Co-authored-by: Jithil P Ponnan <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* code format

* Update components/Api/Stability/index.tsx

Co-authored-by: Jithil P Ponnan <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

---------

Signed-off-by: Claudio Wunder <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Guilherme Araújo <[email protected]>
Co-authored-by: Manish Kumar ⛄ <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>
Co-authored-by: HinataKah0 <[email protected]>
Co-authored-by: Olaleye Blessing <[email protected]>
Co-authored-by: ktssr <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Harkunwar Kochar <[email protected]>
Co-authored-by: vasanthkumar <[email protected]>
Co-authored-by: Jatin <[email protected]>
Co-authored-by: Aymen Naghmouchi <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Yagiz Nizipli <[email protected]>
Co-authored-by: Nick Schonning <[email protected]>
Co-authored-by: Floran Hachez <[email protected]>
Co-authored-by: Jithil P Ponnan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

website redesign Issue/PR part of the Node.js Website Redesign

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants