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

fix: fix Locale Dropdown RTL icon + Webpack aliases ordering #5383

Merged
merged 4 commits into from
Aug 19, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Aug 19, 2021

Motivation

Fix for #5382

I was lazy and used inline styles, but the postCSS RTL plugin are not applied to inline styles so we should avoid them.

image


Also fixing an edge case found in Webpack alias ordering when an intermediate folder has an index.js file

@theme/NavbarItem should always be AFTER @theme/NavbarItem/LocaleDropdownNavbarItem or it would shadow it.

  • add more robust tests to ensure proper ordering

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Aug 19, 2021
@slorber slorber requested a review from lex111 as a code owner August 19, 2021 10:06
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 19, 2021
@massoudmaboudi
Copy link
Contributor

@slorber
Please consider the other issue I mentioned on that same page.

the English word is not aligned with that character. Please check docusaurus website to see the diff.

image

@slorber slorber changed the title fix: fix Locale dropdown IconLanguage RTL margin fix: fix Locale Dropdown RTL icon + Webpack aliases ordering Aug 19, 2021
@netlify
Copy link

netlify bot commented Aug 19, 2021

✔️ [V2]

🔨 Explore the source changes: de00328

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/611e64f346dcb80007e7404e

😎 Browse the preview: https://deploy-preview-5383--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Aug 19, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 92
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5383--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Aug 19, 2021

Size Change: -1 B (0%)

Total Size: 810 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 36.2 kB 0 B
website/build/assets/css/styles.********.css 93.9 kB 0 B
website/build/assets/js/main.********.js 410 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 65.2 kB 0 B
website/build/blog/index.html 35.4 kB 0 B
website/build/docs/index.html 43.1 kB 0 B
website/build/docs/installation/index.html 50.7 kB -1 B (0%)
website/build/index.html 29.8 kB 0 B
website/build/tests/docs/index.html 23.9 kB 0 B
website/build/tests/docs/standalone/index.html 21.8 kB 0 B

compressed-size-action

@slorber
Copy link
Collaborator Author

slorber commented Aug 19, 2021

@massoudmaboudi I can't fix your issue in a generic way because it's due to your Nunito font.

Afaik there's no good generic way to align properly an SVG and some text that works for all fonts, but if you know one PRs are welcome.
If you use a custom font it's your responsibility to do the adjustments to make sure elements are properly aligned. You can swizzle the language icon component and add extra margins/paddings.

@slorber slorber merged commit bcb8830 into main Aug 19, 2021
@slorber slorber deleted the slorber/fix-icon-language-rtl-margin branch August 19, 2021 14:22
@massoudmaboudi
Copy link
Contributor

@slorber
Thank you for the clarification that the issue comes from the font. I will check with different fonts and if any solution is there, I will share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants