Show fallback icon on missing country flag icon #2793

Merged
merged 1 commit into from Feb 3, 2017

Projects

None yet

3 participants

@Kissaki
Member
Kissaki commented Jan 30, 2017 edited

If a country flag icon does not exist, we now display a placeholder (__.svg)

It looks like this, with the Aland Islands missing its flag.

2017-01-30 21_02_32-mumble server connect


  • Is the placeholder ok? Maybe make it less dark, and increase the question mark size?
  • I’m not too fond of adding the __.svg to the icons/flags folder, which is otherwise only SVGs from emojione, plus our own README and LICENSE files. But I don’t know where else I would put it, it fits best in there after all.
@Kissaki Kissaki added the ui label Jan 30, 2017
@Kissaki Kissaki requested a review from mkrautz Jan 30, 2017
@mkrautz
Member
mkrautz commented Jan 30, 2017

How about just using the globe icon? That's what I initially thought would be good.

@Kissaki
Member
Kissaki commented Jan 30, 2017 edited

I don't think that's a good idea. We use the globe icon for categories/continent, so I would rather not use it for countries.

Through its bright color, the globe is also very prominent and jumps into the eye compared to the country flags.

@mkrautz
Member
mkrautz commented Jan 30, 2017

I honestly prefer the globe icon. It's an error state, it's not really meant to happen. It's an icon we already have, and it doesn't look too out of place for a country/region where we a flag is missing.

@hacst Thoughts?

@hacst
Member
hacst commented Jan 30, 2017 edited

Don't have strong feelings in either direction. Personally I would've been fine with leaving it blank (did that produce visual artifacts?).

EDIT: Just saw the other issue. From my POV I would've been fine with the previous behavior. If you think we need a placeholder I guess I slightly prefer the globe one unless we can get a better made "?" one. It looks kinda off in the screenshot as is.

@Kissaki
Member
Kissaki commented Jan 31, 2017

def-globe def-grey

none grey2 globe

Maybe grey one should be darker on dark skin (but that's a skin thing)
grey

@Kissaki
Member
Kissaki commented Jan 31, 2017 edited

Actually, wouldn’t it be nice to have continent icons for the continents?
Iso 3166 does not define them, and we (emojione) does not provide them. Maxmind defines the continent codes here. We already have the continent codes in our data. Sadly, no icons.

@mkrautz
Member
mkrautz commented Feb 1, 2017

How about we try to figure out which flags we're actually missing and perhaps update mkflags.py (or add another script) to print the missing flags?

Perhaps our coverage is pretty good?

(Though, I would prefer just falling back to the globe either way.)

@mkrautz
Member
mkrautz commented Feb 1, 2017

(BTW, this PR also contains the retracted continent commit?)

@Kissaki
Member
Kissaki commented Feb 2, 2017

Sorry, that’s not supposed to be there. I’ll remove that commit.

@Kissaki
Member
Kissaki commented Feb 2, 2017 edited

The question mark placeholder could be misinterpreted as unknown - but the country (and probably its flag) is known, it's just that we do not have an icon.

The benefit of having some kind of icon is the name being vertically aligned with the others. Perhabs aligning it with a space rather than icon would work as well.

The globe is used for continents, undistinguishing. It already is sort of a placeholder (for this category type). Countries are a different level than continents though. All of these are subdivisions of the globe.

Let’s just use the globe then, to have something.

I expect us to have good coverage already. We have 257 flags, Maxmind lists 254 possible country codes, which includes stuff like the following which we do not have flags for (so the numbers are not direct matches; they can not even be represented in the corresponding countrycode a-z unicode):

A1,"Anonymous Proxy"
A2,"Satellite Provider"
O1,"Other Country"
@Kissaki Kissaki Show fallback icon on missing country flag icon
If a country flag icon does not exist, we now display the globe icon, which
is being used for the continents as well.

This will vertically align the country name with the others that have an
icon.
95c7b5e
@Kissaki
Member
Kissaki commented Feb 2, 2017

I pushed the changes accordingly, to display the globe icon. Please review again.

@mkrautz
Member
mkrautz commented Feb 2, 2017

@Kissaki should the commit summary be worded differently now that we use the globe icon?

@Kissaki
Member
Kissaki commented Feb 3, 2017

I did change the commit message accordingly. Did I miss something?

The globe icon is used as a fallback icon. Second sentence should make that clear.

@mkrautz
Member
mkrautz commented Feb 3, 2017

Ah, I might have confused it with the PR title.

@mkrautz mkrautz changed the title from Add unknown country flag icon as fallback to Show fallback icon on missing country flag icon Feb 3, 2017
@mkrautz
mkrautz approved these changes Feb 3, 2017 View changes
@mkrautz mkrautz merged commit d871f34 into mumble-voip:master Feb 3, 2017
@Kissaki Kissaki deleted the Kissaki:flag-unknown branch Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment