Skip to content

chore: Migrate Hero component #5366

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

Closed

Conversation

ktssr
Copy link
Contributor

@ktssr ktssr commented May 8, 2023

Description

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npx turbo lint to ensure the code follows the style guide. And run npx turbo lint:fix to fix the style errors if necessary.
  • I have run npx turbo format to ensure the code follows the style guide.
  • I have run npx turbo test to check if all tests are passing, and/or npx turbo test:snapshot to update snapshots if I created and/or updated React Components.
  • I've covered new added functionality with unit tests if necessary.

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: vasanthkumar <[email protected]>
Co-authored-by: Floran Hachez <[email protected]>
Co-authored-by: Jatin <[email protected]>
fixed styleling misconfig and fixed storybooks (nodejs#5281)
fix storybook styles, imports, typescript config and dependencies (nodejs#5319
fix(package.json) Lint command is missing slashes (nodejs#5321
fix storybook local development mode (nodejs#5335)
fix(i18n): translation key (nodejs#5347)
@vercel
Copy link

vercel bot commented May 8, 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 May 19, 2023 8:33am
nodejs-org-stories ❌ Failed (Inspect) May 19, 2023 8:33am

@vercel vercel bot temporarily deployed to Preview – nodejs-org May 8, 2023 15:26 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 8, 2023 15:27 Inactive
Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM

import Hero from '..';
import type { NodeReleaseData } from '../../../../types';

const mockNodeReleaseData: NodeReleaseData[] = [
Copy link
Member

Choose a reason for hiding this comment

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

We should create fixture I thinks it's will ship with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe that mocking like this should be sufficient for this test file.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but since we are going to test all the components of the Download page. Better to have a unique mock for all the tests. What do you think about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the fixture is already in progress, Is there any action item for me?

Copy link
Member

Choose a reason for hiding this comment

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

Leave as is and update when the fixture is available.

Copy link
Member

Choose a reason for hiding this comment

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

@HinataKah0's PR is almost ready so, we should be able to very soon use their fixtures!

@@ -0,0 +1,110 @@
@use '../../../styles/typography.scss';
Copy link
Member

Choose a reason for hiding this comment

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

Why this import is needed? 🤔

Copy link
Contributor Author

@ktssr ktssr May 12, 2023

Choose a reason for hiding this comment

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

We are extending .t-subheading from this file in line number 25

@Harkunwar
Copy link
Contributor

Hello @ktssr , could you run npm run test:storybook:snapshot to add snapshots. That is the reason your tests are failing.

@ktssr ktssr force-pushed the chore/migrate-hero-component branch from 38b55bf to d30b503 Compare May 12, 2023 08:32
@vercel vercel bot temporarily deployed to Preview – nodejs-org May 12, 2023 08:35 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 12, 2023 08:36 Inactive
title: 'Run JavaScript Everywhere.',
subTitle:
'Node.js is a free, open-sourced, cross-platform JavaScript run-time environment that lets developers write command line tools and server-side scripts outside of a browser.',
nodeReleaseData: [
Copy link
Member

Choose a reason for hiding this comment

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

this will also use the fixture

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there any reason for this. This is being used only in single test unlike NodeReleaseData?

Copy link
Member

Choose a reason for hiding this comment

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

we should create an fixture to gather all thing in one point.

@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 13, 2023 04:32 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org May 13, 2023 04:33 Inactive
AugustinMauroy and others added 10 commits May 14, 2023 09:10
* Migrate JsonLink component

Signed-off-by: Vessy Shestorkina <[email protected]>

* Add storybook snap and robot icon

Signed-off-by: Vessy Shestorkina <[email protected]>

* Remove IconContext provider

Signed-off-by: Vessy Shestorkina <[email protected]>

---------

Signed-off-by: Vessy Shestorkina <[email protected]>
Signed-off-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
…s#5376)

* refactor(useDownloadLink): Move useDetectOs to useDownloadLink

* refactor(useDownloadLink): rename file

* refactor(useDownloadLink): rename file

* Apply suggestions from code review

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

* refactor(useDownloadLink): undo deleted file

---------

Signed-off-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
* feat: Add MUI Config and Theme Provider

* added createTheme

* refactor themeConfig

* feat(theme): Fix linting and package-lock

* feat(theme): Add emotion styled and emtion react

---------

Co-authored-by: Harkunwar Kochar <[email protected]>
refactor(test): Delete duplicate test file

Co-authored-by: Claudio Wunder <[email protected]>
* feat(useClickOutside): introduce

* Update hooks/useClickOutside.ts

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

* feat(useClickOutside): fix and twix

* feat(dropdown): remove useless ref

* feat(useClickOutside): update unit test

* feat(UseClickOutside): update type

* fix: usage of type

* Update hooks/useClickOutside.ts

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

* update listener

* Update components/Common/LanguageSelector/index.tsx

Co-authored-by: Shanmughapriyan S <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* fix: languageSelector

* update with feedback

* better unit test

* Update hooks/useClickOutside.ts

Co-authored-by: Harkunwar Kochar <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* feat(useClickOutside): update with feedback

* Update hooks/useClickOutside.ts

Co-authored-by: Shanmughapriyan S <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update hooks/useClickOutside.ts

Co-authored-by: Shanmughapriyan S <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* fix: if click on modal

* Update hooks/useClickOutside.ts

Co-authored-by: Harkunwar Kochar <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update hooks/useClickOutside.ts

Signed-off-by: Harkunwar Kochar <[email protected]>

* Update hooks/useClickOutside.ts

Co-authored-by: Harkunwar Kochar <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update useClickOutside.ts

* Update hooks/useClickOutside.ts

Co-authored-by: Shanmughapriyan S <[email protected]>
Signed-off-by: Augustin Mauroy <[email protected]>

* Update useClickOutside.ts

* Apply suggestions from code review

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

* Update hooks/useClickOutside.ts

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

* Update hooks/useClickOutside.ts

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

* fix: build

---------

Signed-off-by: Augustin Mauroy <[email protected]>
Signed-off-by: Harkunwar Kochar <[email protected]>
Signed-off-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Harkunwar Kochar <[email protected]>
* feat: create codebox component

* feat: add pointer to copy button

* feat: add shell support

* feat: use code element instead of pre

* chore: fix eslint issues

* refactor: remove shell codebox

* refactor: use react.fc type

* refactor: remove duplicate encoding

* refactor: use pre element for codebox

* style: some eol

* style: some eol

* refactor: use pre element for codebox

* chore: create inlinecode story

* refactor: create inline code story type

* chore: revert .browserslistrc

* test: remove duplicated test

* test: remove beginning space on code

* refactor: setup userEvent on tests

* refactor: remove useless async

* test: manual mock isomorphic-dompurify

* fix: some fixes

* chore: create multi lang story

* test: snapshot before and after switch lang

* refactor: inline mock

* refactor: use decorators

* chore: split inlinecode component

* feat: add selected lang state

* refactor: add inlinecode decorator

* refactor: remove duplicate classes

* chore: revert .browserslistrc

* test: fix tests

* chore: wip

* feat: use story component arg

* style: stories

* test: remove i18n from clipboard test

* chore: migrate pagination component (nodejs#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: add a proper decorated component

* refactor: decorated inline code

* Chore(node feat) (nodejs#5338)

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

* (website redesign) Feat(shellbox): migration (nodejs#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 (nodejs#5347)

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

* feat: add hover states

* chore: fix rebase leftovers

* chore: update snapshots

* chore: install @types/prismjs

* Update index.stories.tsx

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

* chore: remove duplicate snapshots

* chore: remove duplicate snapshot

---------

Signed-off-by: Claudio Wunder <[email protected]>
Co-authored-by: ktssr <[email protected]>
Co-authored-by: Teja Sai Sandeep Reddy Konala <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Wai.Tung <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Augustin Mauroy <[email protected]>
Co-authored-by: Manish Kumar ⛄ <[email protected]>
Co-authored-by: Shanmughapriyan S <[email protected]>
Co-authored-by: Michael Esteban <[email protected]>
* Migrate: Source-link

* Fix: JSON key moved to the end of the file

* Test: Storybook snapshot test

---------

Signed-off-by: Claudio Wunder <[email protected]>
Co-authored-by: Claudio Wunder <[email protected]>
@vercel
Copy link

vercel bot commented May 19, 2023

@MaledongGit is attempting to deploy a commit to the OpenJS Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 19, 2023 05:38 Inactive
ovflowd and others added 2 commits May 19, 2023 10:29
* feat: introduce built-in next.js exports and updated scripts and configs (nodejs#5384)

* chore: updated gitignore and rmeoved robots.txt

* chore: updated next-sitemap config

* chore: next-config refactored options and export support

* chore: updated imports to node: prefix

* chore: updated contributing guidelines

* chore: updated scripts

* chore: updated next-sitemap

* chore: added missing props

* fix: github-pages

* chore: remove unused package

* fix(storybook): update packages (nodejs#5386)

---------

Co-authored-by: Harkunwar Kochar <[email protected]>
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 19, 2023 08:33 Inactive
@ovflowd ovflowd force-pushed the major/website-redesign branch from cb8c95e to 9243764 Compare May 24, 2023 13:33
@ovflowd ovflowd requested a review from a team as a code owner May 24, 2023 13:33
@ovflowd ovflowd deleted the branch nodejs:major/website-redesign May 24, 2023 13:37
@ovflowd ovflowd closed this May 24, 2023
@ovflowd
Copy link
Member

ovflowd commented May 24, 2023

FYI: We deleted the major/website-redesign branch to simplify our release and rollout process. Please feel free to recreate this PR or reopen it with the main branch as a target.

Thank you, and we apologise for the inconvenience!

@ktssr
Copy link
Contributor Author

ktssr commented May 25, 2023

FYI: We deleted the major/website-redesign branch to simplify our release and rollout process. Please feel free to recreate this PR or reopen it with the main branch as a target.

Thank you, and we apologise for the inconvenience!

How about the fixture is it created

@ovflowd
Copy link
Member

ovflowd commented May 25, 2023

Hey @ktssr not yet! @HinataKah0 was waiting on some changes to happen on @nodevu/core, and they got merged this week!

@ktssr ktssr deleted the chore/migrate-hero-component branch July 8, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants