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

Deprecate 16px flag #2836

Open
benjaminpjones opened this issue Sep 23, 2024 · 4 comments
Open

Deprecate 16px flag #2836

benjaminpjones opened this issue Sep 23, 2024 · 4 comments

Comments

@benjaminpjones
Copy link
Contributor

Background

OGS maintains a fork of world-flags-sprite, which it uses to display national flags around the site. There are two supported resolutions, 16px and 32px. Maintaining two sets of images is a pain, and there is a lingering bug (#2043) in the 16px flag set.

Suggested Changes

Related PRs

@anoek
Copy link
Member

anoek commented Sep 23, 2024

Yep sounds reasonable

@benjaminpjones
Copy link
Contributor Author

I marked this as a "good first issue" because it's relatively low stakes (worst case - display issues for some flag icons). To anyone who wants to take this on - I'm happy to answer any questions about the codebase!

@brown-eric
Copy link

Hey! I'm interested in helping but I'm pretty new to this. Do you think this is a reasonably small workload? If you could help me through this I'd be really grateful

@benjaminpjones
Copy link
Contributor Author

benjaminpjones commented Sep 26, 2024

Very cool!

Do you think this is a reasonably small workload?

I would classify this as a medium-sized project, but shouldn't be too bad if you're already familiar with React and CSS (we're using Stylus, but most of it looks like legal CSS). Here is a breakdown of what I think needs to happen for "Re-implement to always use "f32", then scale the small flag accordingly.":

  • In Flag.tsx, instead of setting the class to "f16" for small flags, set the class to "f32" to use the 32px resolution and add another css class to indicate "small".
  • In Flag.style, add some styling for the "small" class that transforms scales the image to half its original size. (possibly using transform: scale(0.5, 0.5); or width properties)
  • Check existing usages of the small flag should still look about the same. If not, you can adjust individual styling (most files have a corresponding .styl file).

If you could help me through this I'd be really grateful

Definitely check out CONTRIBUTING.md to get started, but happy to answer any other questions you may have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants