Skip to content
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

Create LanguageDropDown component #5981

Closed
bmuenzenmeyer opened this issue Oct 11, 2023 · 9 comments · Fixed by #5982
Closed

Create LanguageDropDown component #5981

bmuenzenmeyer opened this issue Oct 11, 2023 · 9 comments · Fixed by #5982
Labels
good first issue Issues for newcomers hacktoberfest This Issue is meant for Hacktoberfest 2023 help wanted website redesign Issue/PR part of the Node.js Website Redesign

Comments

@bmuenzenmeyer
Copy link
Collaborator

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.

Read more about the Node.js Website redesign


Before You Start...


Details

image
image

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 the Common 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 icon language 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
  • 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 state Choose Language. Add a new key components.common.languageDropdown.label to the i18n/locales/en.json file. useIntl from react-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
@bmuenzenmeyer bmuenzenmeyer added help wanted good first issue Issues for newcomers website redesign Issue/PR part of the Node.js Website Redesign hacktoberfest This Issue is meant for Hacktoberfest 2023 labels Oct 11, 2023
@bmuenzenmeyer bmuenzenmeyer moved this to 🔖 Ready in Website Redesign Oct 11, 2023
@burhanharoon
Copy link

Hi @bmuenzenmeyer, I would love to work on this, can you please assign me this so that I can start the development? Thanks!

@burhanharoon
Copy link

@bmuenzenmeyer nevermind about assigning, I just got to know you guys don't assign the issues, FYI I'm still working on this.

@ovflowd
Copy link
Member

ovflowd commented Oct 11, 2023

Also, for the Storybook, feel free to add mocked language options to the Dropdown, we don't need to get the real Dropdown options (Available Languages) for the Storybook.

@ovflowd
Copy link
Member

ovflowd commented Oct 11, 2023

It would also be interesting to add Unit Tests to ensure that onClick behaviour actually renders the Dropdown

@DhairyaMajmudar
Copy link

@ovflowd I am working on the model but not able to preview what I am building can you pls. help for that

@ovflowd
Copy link
Member

ovflowd commented Oct 11, 2023

@ovflowd I am working on the model but not able to preview what I am building can you pls. help for that

Read the Contribution Guidelines. It's all documented there. I'm not going to provide 1:1 support, sorry. (I don't have time for that)

@DhairyaMajmudar
Copy link

@ovflowd I am working on the model but not able to preview what I am building can you pls. help for that

Read the Contribution Guidelines. It's all documented there. I'm not going to provide 1:1 support, sorry. (I don't have time for that)

OkayJi 🥺

@ovflowd
Copy link
Member

ovflowd commented Oct 11, 2023

@ovflowd I am working on the model but not able to preview what I am building can you pls. help for that

Read the Contribution Guidelines. It's all documented there. I'm not going to provide 1:1 support, sorry. (I don't have time for that)

OkayJi 🥺

But is there anything specific that is not working? To preview changes you simply need to run npm run storybook then open http://localhost:6006

@Rounak-stha
Copy link
Contributor

Rounak-stha commented Oct 11, 2023

Hey, I was already working on this. As issues are not assigned, I didn't leave any comments.

@bmuenzenmeyer bmuenzenmeyer moved this from 🔖 Ready to 👀 In review in Website Redesign Oct 17, 2023
@bmuenzenmeyer bmuenzenmeyer linked a pull request Oct 17, 2023 that will close this issue
5 tasks
@bmuenzenmeyer bmuenzenmeyer moved this from 👀 In review to ✅ Done in Website Redesign Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues for newcomers hacktoberfest This Issue is meant for Hacktoberfest 2023 help wanted website redesign Issue/PR part of the Node.js Website Redesign
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants