expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

feat: Improve language picker UI with icons

Open ShubhamOulkar opened this issue 6 months ago • 2 comments

Task

closes #1804

desktop mobile
image Screen Shot 2025-05-31 at 16 20 38

How SVG Icons Were Created?

  • The SVG flag icons were sourced from Nucleo SVG Flag Icons.
  • Each SVG file was copied and added to the repository using the VS Code editor.
  • While there are several ways to edit SVGs in VS Code, including using extensions for live preview or advanced editing, I used the default text editor setup to make the required changes.
  • The SVGs were customized and optimized to fit the required sizes(20x22) and design specifications for our language picker UI, so that we don't need to write CSS to customize icons.

ShubhamOulkar avatar May 30 '25 14:05 ShubhamOulkar

Deploy Preview for expressjscom-preview ready!

Name Link
Latest commit 75031e470c5bb08ea23efee8ed2a5e0ae12f0de7
Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/687873d6d9529f0008a91091
Deploy Preview https://deploy-preview-1933--expressjscom-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

netlify[bot] avatar May 30 '25 14:05 netlify[bot]

cool work, thanks for your contribution.

cengizcmataraci avatar Jun 07 '25 17:06 cengizcmataraci

Thanks @ctcpip for you time. My initial thoughts were same as yours. Let's wait for others, since it was proposed in issue #1804. Otherwise I am ok with removing icons and move on with just bug fixes as reported in description.

ShubhamOulkar avatar Jul 07 '25 15:07 ShubhamOulkar

I agree with @ctcpip

bjohansebas avatar Jul 11 '25 17:07 bjohansebas

Can we leave just the icon, please? imagen

bjohansebas avatar Jul 18 '25 00:07 bjohansebas

Can we leave just the icon, please? imagen

Actually, I want to 😃. This approach removes a lot of unnecessary files and code. We don't need mobile lang picker file as well as JS and CSS written for this. I already mentioned this in comment https://github.com/expressjs/expressjs.com/issues/1804#issuecomment-2742378877. But didn't got reviews. Then I decide to keep as it is and just fix issues referenced in description. Also I did check history, you guys did a lot of work to bring that mobile lang picker on the website.

ShubhamOulkar avatar Jul 18 '25 02:07 ShubhamOulkar

Long story short 😃 — on small screens, we only show the i18n icon, and now we're switching desktop to use the same. So it makes sense to use a single UI component across all screen sizes.

ShubhamOulkar avatar Jul 18 '25 12:07 ShubhamOulkar

I'm going to draft this PR for now. It will be closed later as part of the i18n component simplification, as mentioned in https://github.com/expressjs/expressjs.com/pull/1933#issuecomment-3089396640.

ShubhamOulkar avatar Jul 21 '25 14:07 ShubhamOulkar

We decided to make design simple and reusable on all screen sizes.

ShubhamOulkar avatar Aug 02 '25 11:08 ShubhamOulkar