ultrabug / mkdocs-static-i18n

MkDocs i18n plugin using static translation markdown files
https://ultrabug.github.io/mkdocs-static-i18n/
MIT License
229 stars 38 forks source link

Plugin makes mkdocs-material pages scroll horizontally on mobile #272

Closed alexjlockwood closed 11 months ago

alexjlockwood commented 12 months ago

When I enable this plugin, on mobile the doc site becomes horizontally scrollable on my phone:

https://github.com/ultrabug/mkdocs-static-i18n/assets/1380747/4eadc703-993a-4c12-a5ad-ecbf73946459

I wonder if there is any way that this can be avoided? (Disclaimer: I'm not certain whether this should be considered an issue with the plugin or mkdocs-material)

My gut tells me it is an issue with the plugin though because it seems like the addition of the extra horizontal scroll space is equal to the width of the language switcher icon button in the site header. But please let me know if I'm wrong and whether I should file a bug against mkdocs-material instead.

alexjlockwood commented 12 months ago

I tested this against @kamilkrzyskow's own website here: https://gothic-modding-community.github.io/gmc/

Seems like the issue is not present. Although his website is on older versions of both this plugin and mkdocs-material so I can't be sure...

kamilkrzyskow commented 12 months ago

Our page still uses the older 0.56 release, because I still wait for the merge approval. So this might not be a good website to compare against. Sorry about that.

alexjlockwood commented 12 months ago

I realized just now the issue might be on my end, as I realized that the popup menu of the translation picker has a large width:

Screenshot 2023-10-10 at 5 52 30 PM

Maybe if I reduce the width of the languages in the popup menu it will solve the issue. 🤔

alexjlockwood commented 12 months ago

If I reduce the length of the translation picker it seems to work as intended!

Screenshot 2023-10-10 at 5 55 34 PM

Maybe this is something that can't be avoided if the length of the translation picker is too wide?

kamilkrzyskow commented 12 months ago

You could try it without the plugin then, just setup the Material theme with some long alternates, and report a bug there. I believe they could set it up so on mobile it wraps 🤔

alexjlockwood commented 11 months ago

@kamilkrzyskow Yes I can report a bug there, thanks!