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

Shadcn migration - language picker #13531

Merged
merged 16 commits into from
Aug 13, 2024
Merged

Shadcn migration - language picker #13531

merged 16 commits into from
Aug 13, 2024

Conversation

pettinarip
Copy link
Member

@pettinarip pettinarip commented Jul 29, 2024

DEPENDS ON:

Description

Language picker implementation + refactor using Shadcn's Popover, Command, Progress, and Badge components.

TODO

@pettinarip pettinarip added the Status: Blocked 🛑 This is blocked label Jul 29, 2024
@github-actions github-actions bot added dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project labels Jul 29, 2024
Copy link

netlify bot commented Jul 29, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit ed4df19
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66bb90f2d531a30008319520
😎 Deploy Preview https://deploy-preview-13531--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 43 (🔴 down 5 from production)
Accessibility: 93 (no change from production)
Best Practices: 89 (🔴 down 8 from production)
SEO: 93 (🟢 up 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@konopkja
Copy link
Contributor

konopkja commented Aug 5, 2024

Screenshot 2024-08-05 at 16 35 29

based on these data I am assuming the filter input inside language picker is not being used very frequently and therefore should not be automatically focused as primary action.

This would be especially problematic on mobile where it would also trigger showing keyboard and overlap other options for selection.

@konopkja
Copy link
Contributor

konopkja commented Aug 5, 2024

cc @minimalsm @pettinarip

@pettinarip
Copy link
Member Author

based on these data I am assuming the filter input inside language picker is not being used very frequently and therefore should not be automatically focused as primary action.

Does that make any negative impact to the UX? IMO:

  • it will improve the UX for those who want to change the language quicker
  • it will keep the same UX for those who just open and close the picker

This would be especially problematic on mobile where it would also trigger showing keyboard and overlap other options for selection.

Agree. However, I tested it on a physical phone and didn't get the focus nor the keyboard popping up. Would be nice to have a second test to confirm that we don't see the keyboard.

@konopkja
Copy link
Contributor

konopkja commented Aug 5, 2024

based on these data I am assuming the filter input inside language picker is not being used very frequently and therefore should not be automatically focused as primary action.

Does that make any negative impact to the UX? IMO:

  • it will improve the UX for those who want to change the language quicker
  • it will keep the same UX for those who just open and close the picker

This would be especially problematic on mobile where it would also trigger showing keyboard and overlap other options for selection.

Agree. However, I tested it on a physical phone and didn't get the focus nor the keyboard popping up. Would be nice to have a second test to confirm that we don't see the keyboard.

based on these data I am assuming the filter input inside language picker is not being used very frequently and therefore should not be automatically focused as primary action.

Does that make any negative impact to the UX? IMO:

  • it will improve the UX for those who want to change the language quicker
  • it will keep the same UX for those who just open and close the picker

This would be especially problematic on mobile where it would also trigger showing keyboard and overlap other options for selection.

Agree. However, I tested it on a physical phone and didn't get the focus nor the keyboard popping up. Would be nice to have a second test to confirm that we don't see the keyboard.

do you mean this PR (focus on the input) would only affect desktop and mobile?

@pettinarip
Copy link
Member Author

pettinarip commented Aug 6, 2024

do you mean this PR (focus on the input) would only affect desktop and mobile?

As far as I have tested it, the focus only happens on desktop. On mobile devices, I have to manually click on the input to filter things.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

This looks great @pettinarip! Can we just update status of TODO's and clear any conflicts? Think we can pull in from there

Comment on lines 54 to 62
// TODO double check this
// sx={{
// p: {
// textDecoration: "none",
// overflow: "hidden",
// textOverflow: "ellipsis",
// whiteSpace: "nowrap",
// },
// }}
Copy link
Member

Choose a reason for hiding this comment

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

Haven't encountered any need for this while testing it out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank, yes, I was trying to see where this was coming from but I think we could clean this up since it doesn't seem to add anything atm.

@wackerow wackerow removed the Status: Blocked 🛑 This is blocked label Aug 6, 2024
@pettinarip
Copy link
Member Author

This looks great @pettinarip! Can we just update status of TODO's and clear any conflicts? Think we can pull in from there

Done. I think we are ready for another review.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks awesome! Great job @pettinarip! Pulling in

@@ -0,0 +1,171 @@
import * as React from "react"
import { Command as CommandPrimitive } from "cmdk"
Copy link
Member

Choose a reason for hiding this comment

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

Discovering these new packages along the way with the shadcn-ui approach. Loving it.

@wackerow wackerow merged commit 096e581 into dev Aug 13, 2024
10 checks passed
@wackerow wackerow deleted the shadcn-lang-picker branch August 13, 2024 21:29
This was referenced Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants