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

[docs] Use Button for language menu #17487

Merged
merged 10 commits into from
Sep 21, 2019

Conversation

mbrookes
Copy link
Member

@mui-pr-bot
Copy link

mui-pr-bot commented Sep 19, 2019

Details of bundle changes.

Comparing: ccc470e...de42fab

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 331,962 331,962 90,633 90,633
@material-ui/core/Paper 0.00% 0.00% 68,660 68,660 20,458 20,458
@material-ui/core/Paper.esm 0.00% 0.00% 62,098 62,098 19,203 19,203
@material-ui/core/Popper 0.00% 0.00% 28,397 28,397 10,159 10,159
@material-ui/core/Textarea 0.00% 0.00% 5,082 5,082 2,132 2,132
@material-ui/core/TrapFocus 0.00% 0.00% 3,766 3,766 1,596 1,596
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,348 16,348 5,818 5,818
@material-ui/core/useMediaQuery 0.00% 0.00% 2,488 2,488 1,050 1,050
@material-ui/lab 0.00% 0.00% 154,783 154,783 46,921 46,921
@material-ui/styles 0.00% 0.00% 51,420 51,420 15,288 15,288
@material-ui/system 0.00% 0.00% 15,581 15,581 4,351 4,351
Button 0.00% 0.00% 78,633 78,633 24,021 24,021
Modal 0.00% 0.00% 14,542 14,542 5,114 5,114
Portal 0.00% 0.00% 2,907 2,907 1,318 1,318
Rating 0.00% 0.00% 69,963 69,963 21,856 21,856
Slider 0.00% 0.00% 75,084 75,084 23,184 23,184
colorManipulator 0.00% 0.00% 3,835 3,835 1,519 1,519
docs.landing 0.00% 0.00% 54,267 54,267 14,345 14,345
docs.main +0.06% 🔺 +0.05% 🔺 581,547 581,908 186,199 186,288
packages/material-ui/build/umd/material-ui.production.min.js 0.00% 0.00% 302,849 302,849 87,078 87,078

Generated by 🚫 dangerJS against de42fab

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Sep 19, 2019
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

looks great

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

I like that 👍

@mbrookes
Copy link
Member Author

Personally I prefer the option showing the currently selected language.

image

It more closely follows the spec for menus used for item selection:

https://material.io/components/menus/#exposed-dropdown-menu

The flag is a pretty clear indicator of the menu's purpose if you find yourself viewing the docs in a language you don't understand.

However since there was a preference for the word "language" instead, I have no idea what the right thing to do is vs localisation of that string. React localises it though, so perhaps we should follow suit?

@eps1lon
Copy link
Member

eps1lon commented Sep 20, 2019

Flags can be hard to distinguish depending on size and background.

Displaying the current value makes sense if you have a visible label.

I think I prefer following react here so that it's immediately familiar for people coming from the react docs or vice versa.

@oliviertassinari
Copy link
Member

I like the argument of being close to React (of @eps1lon), the docusaurus approach is interesting too: https://docusaurus.io/en/. But no matter what we pick, it's probably not much different, these are all great options; @mbrookes I think that you can move forward with what you prefer, don't see much need in a long discussion here :)

@mbrookes
Copy link
Member Author

So, there is no common opinion on what to use for the text, if any:

https://uxdesign.cc/my-take-on-language-selectors-945caceb58f7
https://usersnap.com/blog/design-language-switch/
http://www.flagsarenotlanguages.com/blog/best-practice-for-presenting-languages/
https://www.nomensa.com/blog/2010/7-tips-for-multi-lingual-website-accessibility
https://davidboniface.net/best-practice-for-presenting-website-language-selection/

...but there is one common thread – don't use flags.

I propose using the icon we have now, displaying the selected language (as per MD spec recommendation) with the text hidden at small screen sizes, and with the dropdown icon.

We should also remove the flags.

@mbrookes mbrookes force-pushed the docs-navbar-declutter branch from 195f83d to 4e2ce97 Compare September 20, 2019 23:54
@mbrookes mbrookes force-pushed the docs-navbar-declutter branch from e19f7b3 to 7996d0e Compare September 21, 2019 00:24
@oliviertassinari oliviertassinari merged commit dc411f4 into mui:master Sep 21, 2019
@oliviertassinari
Copy link
Member

Awesome

@mbrookes mbrookes deleted the docs-navbar-declutter branch September 21, 2019 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants