-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Closed
Labels
good first issueIssues for newcomersIssues for newcomershacktoberfestThis Issue is meant for Hacktoberfest 2023This Issue is meant for Hacktoberfest 2023help wantedwebsite redesignIssue/PR part of the Node.js Website RedesignIssue/PR part of the Node.js Website Redesign
Description
Create a LanguageDropDown
component using the new figma design (direct link).
This component is an icon-button that when activated shows a dropdown of all locales. This is the final port of the LanguageDropDowncomponent recently deleted. Much of the functionality is the same to end users, but with different tech.
Before You Start...
- Use the Contributor's Guide to learn how to setup your environment, run available commands, and construct proper commits.
- Review the technologies used when building the site, and why they were chosen.
- Review the component creation guide to follow our standards.
- ❗ Review the translation guide, especially how to add new keys.
Details
❓ Not sure where to start breaking down the figma? Read this short guide
🌐 This story requires some internationalization support. Slow down!
- Create a new directory called
LanguageDropDown
within theCommon
directory that contains all the new code. - Install
@radix-ui/react-dropdown-menu
for the accessible foundation and functionality we need.- Use
DropdownMenu.Trigger
to place the icon and button - The
@heroicons/react
module has the iconlanguage
available for use. - source the languages to display and the current value from the '@/hooks/useLocale' hook
- implement a no-op for the click handler
- Use
- Add a storybook story file
components/Common/LanguageDropDown/index.stories.tsx
which exercises each of the component's states. - Delete https://github.com/search?q=repo%3Anodejs%2Fnodejs.org%20useClickOutside&type=code after a quick search of the codebase - this was leftover from the previous design
- The
aria-label
must be internationalized, and in English stateChoose Language
. Add a new keycomponents.common.languageDropdown.label
to thei18n/locales/en.json
file.useIntl
fromreact-intl
should be used to reference the key. Look for examples elsewhere in the codebase or in the old PR.
There are 2 states to capture within styles and stories:
- Light
- Dark
Metadata
Metadata
Assignees
Labels
good first issueIssues for newcomersIssues for newcomershacktoberfestThis Issue is meant for Hacktoberfest 2023This Issue is meant for Hacktoberfest 2023help wantedwebsite redesignIssue/PR part of the Node.js Website RedesignIssue/PR part of the Node.js Website Redesign