Skip to content

feat(useClickOutside): introduce - #5359

Merged
Harkunwar merged 34 commits into
nodejs:major/website-redesignfrom
AugustinMauroy:feat(useClickOutside)
May 15, 2023
Merged

feat(useClickOutside): introduce#5359
Harkunwar merged 34 commits into
nodejs:major/website-redesignfrom
AugustinMauroy:feat(useClickOutside)

Conversation

@AugustinMauroy

@AugustinMauroyAugustinMauroy commented May 4, 2023

Copy link
Copy Markdown
Member

Description

  • Adding react hook useClickOutside
  • New Pr open after some problems form REBASE

Related Issues

close: The Dropdown Component should handle clicks outside #5348

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.

@vercel

vercelBot commented May 4, 2023

Copy link
Copy Markdown

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

NameStatusPreviewCommentsUpdated (UTC)
nodejs-org✅ Ready (Inspect)Visit Preview💬 Add feedbackMay 15, 2023 7:05am
nodejs-org-stories✅ Ready (Inspect)Visit PreviewMay 15, 2023 7:05am

@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 4, 2023 20:29 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 4, 2023 20:29 Inactive
Comment threadhooks/useClickOutside.ts Outdated
Comment threadhooks/useClickOutside.ts Outdated
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 4, 2023 20:44 Inactive
Comment threadhooks/useClickOutside.ts Outdated
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 4, 2023 20:45 Inactive
Comment threadhooks/useClickOutside.ts Outdated
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 4, 2023 20:50 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 4, 2023 20:52 Inactive
Comment threadhooks/useClickOutside.ts Outdated
Comment threadhooks/useClickOutside.ts Outdated
Comment threadcomponents/Common/LanguageSelector/index.tsx Outdated
@shanpriyanshanpriyan added the website redesign Issue/PR part of the Node.js Website Redesign label May 5, 2023
@shanpriyan
shanpriyan changed the base branch from main to major/website-redesignMay 5, 2023 06:13
AugustinMauroyand others added 3 commits May 5, 2023 09:25
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 5, 2023 07:28 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 5, 2023 07:29 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 5, 2023 07:53 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 5, 2023 07:54 Inactive
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 13, 2023 10:20 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 13, 2023 10:22 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 13, 2023 10:35 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 13, 2023 10:37 Inactive
Comment threadhooks/useClickOutside.ts
Comment threadhooks/useClickOutside.ts
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Comment threadhooks/useClickOutside.ts Outdated
Comment threadhooks/useClickOutside.ts Outdated

@ovflowdovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! But I left a few suggestions!

@shanpriyanshanpriyan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 🚀

Good to go after resolving ovflowd's suggestions

@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 14, 2023 16:23 Inactive
AugustinMauroyand others added 2 commits May 14, 2023 18:23
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 14, 2023 16:27 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 14, 2023 16:28 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 15, 2023 06:41 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 15, 2023 06:43 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories May 15, 2023 07:03 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org May 15, 2023 07:05 Inactive
@Harkunwar
Harkunwar merged commit 0a2b64f into nodejs:major/website-redesignMay 15, 2023
ovflowd added a commit that referenced this pull request May 17, 2023
* test(snapshot): Migrate snapshot tests to storybook (#5340)
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Teja Sai Sandeep Reddy Konala <sandeep.konala@knacksystems.com>
Co-authored-by: Claudio Wunder <cwunder@hubspot.com>
Co-authored-by: vasanth9 <cheepurupalli.vasanthkumar.com>
Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <tejasaisandeepreddykonala@MacBook-Pro.local>
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Co-authored-by: Guilherme Araújo <guilherme.araujo@maxxidata.com>
Co-authored-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Co-authored-by: HinataKah0 <128208841+HinataKah0@users.noreply.github.com>
Co-authored-by: Olaleye Blessing <Olayinkablexxy@gmail.com>
Co-authored-by: ktssr <31731919+ktssr@users.noreply.github.com>
Co-authored-by: vasanthkumar <42891954+vasanth9@users.noreply.github.com>
Co-authored-by: Floran Hachez <floran.hachez@gmail.com>
Co-authored-by: Jatin <96469998+JatinSharma32@users.noreply.github.com>
fixed styleling misconfig and fixed storybooks (#5281)
fix storybook styles, imports, typescript config and dependencies (#5319
fix(package.json) Lint command is missing slashes (#5321
fix storybook local development mode (#5335)
fix(i18n): translation key (#5347)
* chore: no-unused-vars ignores pattern starting with _ (#5363)
* Contributing Guidelines Update - Add clarity to step 4 based on clone method (#5369)
Add clarity to step 4 based on clone method
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
* fix(test): dir name (#5354)
* feat(stability): migrate component (#5339)
* Migrate JsonLink component (#5370)
* Migrate JsonLink component
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
* Add storybook snap and robot icon
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
* Remove IconContext provider
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
---------
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* refactor(useDownloadLink): Move useDetectOs to useDownloadLink (#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 <cwunder@gnome.org>
* refactor(useDownloadLink): undo deleted file
---------
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* feat: Add MUI Config and Theme Provider (#5368)
* 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 <10580591+Harkunwar@users.noreply.github.com>
* refactor(delete): duplicate test file (#5377)
refactor(test): Delete duplicate test file
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* feat(useClickOutside): introduce (#5359)
* feat(useClickOutside): introduce
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* 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 <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* update listener
* Update components/Common/LanguageSelector/index.tsx
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: languageSelector
* update with feedback
* better unit test
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* feat(useClickOutside): update with feedback
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: if click on modal
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Apply suggestions from code review
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: build
---------
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
---------
Signed-off-by: Vessy Shestorkina <46304479+Ve33y@users.noreply.github.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <sandeep.konala@knacksystems.com>
Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <tejasaisandeepreddykonala@MacBook-Pro.local>
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Co-authored-by: Guilherme Araújo <guilherme.araujo@maxxidata.com>
Co-authored-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Co-authored-by: HinataKah0 <128208841+HinataKah0@users.noreply.github.com>
Co-authored-by: Olaleye Blessing <Olayinkablexxy@gmail.com>
Co-authored-by: ktssr <31731919+ktssr@users.noreply.github.com>
Co-authored-by: vasanthkumar <42891954+vasanth9@users.noreply.github.com>
Co-authored-by: Floran Hachez <floran.hachez@gmail.com>
Co-authored-by: Jatin <96469998+JatinSharma32@users.noreply.github.com>
Co-authored-by: Vessy <46304479+Ve33y@users.noreply.github.com>
Co-authored-by: Mert Can Altın <mertgold60@gmail.com>
ovflowd added a commit that referenced this pull request May 24, 2023
* feat(useClickOutside): introduce
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* 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 <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* update listener
* Update components/Common/LanguageSelector/index.tsx
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: languageSelector
* update with feedback
* better unit test
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* feat(useClickOutside): update with feedback
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: if click on modal
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Apply suggestions from code review
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: build
---------
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
ovflowd added a commit that referenced this pull request May 24, 2023
* feat(useClickOutside): introduce
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* 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 <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* update listener
* Update components/Common/LanguageSelector/index.tsx
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: languageSelector
* update with feedback
* better unit test
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* feat(useClickOutside): update with feedback
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: if click on modal
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
* Update hooks/useClickOutside.ts
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Update hooks/useClickOutside.ts
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update useClickOutside.ts
* Apply suggestions from code review
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update hooks/useClickOutside.ts
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix: build
---------
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

website redesignIssue/PR part of the Node.js Website Redesign

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Dropdown Component should handle clicks outside

6 participants

@AugustinMauroy@shanpriyan@Harkunwar@ovflowd@aymen94@HinataKah0