Open massoudmaboudi opened 2 years ago
That looks nice, I think we definitely want this type of stuff.
We might even want to port it to other things, like versions dropdown, navbar link items, sidebar links...
(Note, for navbar link items, we have long thought about using icons on medium-sized screens so people don't have to toggle the sidebar when the screen just becomes slightly narrow)
You are right. For example, the ladder icon on docusaurus website is nice. So maybe we can add an option to any dropdown as n optional config.
Ah, that's a construction barrier. And yes, if we make this an API it should be more easily portable.
Also, if we support this API, it should probably support strings, HTMLs, and images.
It should be able to be placed, on the left, right of the item, and also on the other side of the item like below:
Mmm, that's a bit complicated. Note also that the external link icon is already taking the right edge, so we'll probably put it on the left edge by default. Not sure if we want a config option to change that—should be swizzlable.
Or also a bit further, what do you think of the Material Design to be optional too and if its false, it can show the flag to solve the #7409?
yes, I raise the ideas, you try to choose the best one.
the Material Design to be optional too and if its false,
Not sure what you mean exactly, but Material is absolutely on my radar, and why I mentioned "it should probably support strings, HTMLs, and images". We won't officially couple the API to any icon library, but you should be able to inject most kinds of icons.
This Icon, Just consider we make it optional if the flag is available. Then it will be like the below:
It indicates this is the language dropdown
Ah, I get you. Not a bad idea? We can think about it once we see the UI/UX.
Glad to hear that. Waiting for more updates on this.
agree we should have this and make a poc
This post provides a very lightweight way to get an emoji from a country code:
https://dev.to/jorik/country-code-to-flag-emoji-a21
we can start with something opinionated and then see which options make sense?
Have you read the Contributing Guidelines on issues?
Description
It can be an option in docusaurus.config.js to show the flags of each locale as emoji characters for better compatibility.
I have a dilemma for this feature though
Maybe an optional Unicode character also can be embedded in the config like how it's used in below :
https://www.npmjs.com/package/emoji-flags
But it may help #7409 also.
Has this been requested on Canny?
No response
Motivation
To make an improvement in locale dropdown and #7409
API design
No response
Have you tried building it?
No response
Self-service