Skip to content

fix(website): change the direction of the contributor avatar to right based on locale#422

Merged
aymericzip merged 1 commit intoaymericzip:mainfrom
benedictfred:fix/locale-direction
May 9, 2026
Merged

fix(website): change the direction of the contributor avatar to right based on locale#422
aymericzip merged 1 commit intoaymericzip:mainfrom
benedictfred:fix/locale-direction

Conversation

@benedictfred
Copy link
Copy Markdown
Contributor

Description

This pull request updates the contributor cloud component to better support right-to-left (RTL) languages. The main improvement is adjusting the layout of contributor avatars based on the text direction of the current locale.

Changes Made

Internationalization and RTL support:

  • Added getHTMLTextDir and useLocale imports to determine the current locale's text direction, enabling dynamic RTL/LTR layout adjustments.
  • Modified generateCloudPositions to accept an isRTL parameter and updated the logic so that the cloud's center shifts appropriately for RTL languages.
  • Updated the main ContributorCloud component to use the current locale and pass the correct isRTL value to generateCloudPositions, ensuring the avatar cloud layout matches the reading direction.

Linked Issue

This PR closes issue #404

Screenshot

image

@aymericzip
Please review, if there are improvements to make, tell me. Thanks.

Copy link
Copy Markdown
Owner

@aymericzip aymericzip left a comment

Choose a reason for hiding this comment

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

Good to me, merging it

Thanks @benedictfred !

@aymericzip aymericzip merged commit 11e7951 into aymericzip:main May 9, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants