Skip to content

Enhanced RTL support#5071

Open
ws-rush wants to merge 15 commits into
vuejs:mainfrom
ws-rush:enhanced-rtl-support
Open

Enhanced RTL support#5071
ws-rush wants to merge 15 commits into
vuejs:mainfrom
ws-rush:enhanced-rtl-support

Conversation

@ws-rush

@ws-rush ws-rush commented Dec 31, 2025

Copy link
Copy Markdown

Description

change default theme to use logical properties, and enhance URL matching

Linked Issues

~

Additional Context

~

@ws-rush

ws-rush commented Dec 31, 2025

Copy link
Copy Markdown
Author

/publish

@ws-rush

ws-rush commented Dec 31, 2025

Copy link
Copy Markdown
Author

/publish

@pkg-pr-new

pkg-pr-new Bot commented Dec 31, 2025

Copy link
Copy Markdown
npm i https://pkg.pr.new/vitepress@5071

commit: 22ddd76

@ws-rush ws-rush changed the title Enhanced RTL support Enhanced RTL support (WIP) Dec 31, 2025
@userquin

Copy link
Copy Markdown
Member

Here some hints using UnoCSS (should be easy to translate to plain css) : https://github.com/elk-zone/elk/blob/main/CONTRIBUTING.md#rtl-support

Check also if we need to add flip support for icons: https://github.com/elk-zone/elk/blob/371aa5c469b1e025f80c887f5ea18ecccf983129/app/styles/global.css#L203-L205 (at elk.zone we have the elk logo and we flip the elk header https://github.com/elk-zone/elk/blob/main/public/logo.svg on rtl)

@ws-rush

ws-rush commented Dec 31, 2025

Copy link
Copy Markdown
Author

Here some hints using UnoCSS (should be easy to translate to plain css) : https://github.com/elk-zone/elk/blob/main/CONTRIBUTING.md#rtl-support

Check also if we need to add flip support for icons: https://github.com/elk-zone/elk/blob/371aa5c469b1e025f80c887f5ea18ecccf983129/app/styles/global.css#L203-L205 (at elk.zone we have the elk logo and we flip the elk header https://github.com/elk-zone/elk/blob/main/public/logo.svg on rtl)

current theme styling does not use UnoCSS, also flip icons done

@ws-rush

ws-rush commented Dec 31, 2025

Copy link
Copy Markdown
Author

/publish

@ws-rush ws-rush changed the title Enhanced RTL support (WIP) Enhanced RTL support Dec 31, 2025
@ws-rush

ws-rush commented Dec 31, 2025

Copy link
Copy Markdown
Author

I think now it is ready

@userquin

userquin commented Dec 31, 2025

Copy link
Copy Markdown
Member

can you add/enable the rtl to this lang on docs? https://github.com/vuejs/vitepress/tree/main/docs/fa

upps look like it is fine (should be configured at locales entry), shouldn't we add the flip to the hero image or just change the angle?

@userquin

userquin commented Dec 31, 2025

Copy link
Copy Markdown
Member

We also need to change the layout for the selectors, arrow down shouldn't be on the right?

/cc @brc-dd where is the pr docs preview? Found, just clicking on the deploy/netlify link: https://deploy-preview-5071--vitepress-docs.netlify.app/fa/

Check version and lang switcher:

image

@userquin

Copy link
Copy Markdown
Member

Some edge cases, maybe we need some change maybe using bdi, the spanish text is wrong, check the time entry:

image

@ws-rush

ws-rush commented Jan 1, 2026

Copy link
Copy Markdown
Author

@userquin

image image

for direction of hero and dropdown arrows, they look right for me, above comparing between them

@ws-rush

ws-rush commented Jan 1, 2026

Copy link
Copy Markdown
Author

Some edge cases, maybe we need some change maybe using bdi, the spanish text is wrong, check the time entry:

image

you are right, I did the bdi for inline code only, I will change this and search for more edge cases


actually it looks good in my device , I will add Spanish to my device then try

image

@userquin

userquin commented Jan 1, 2026

Copy link
Copy Markdown
Member

for direction of hero and dropdown arrows, they look right for me, above comparing between them

You're right, review the menu button on narrow screen I think it should be flipped.

@userquin

userquin commented Jan 1, 2026

Copy link
Copy Markdown
Member

actually it looks good in my device , I will add Spanish to my device then try

It should display the same text inside the <time>, we use lang in the browser, the problem when some punctuation present inside the time.

@ws-rush

ws-rush commented Jan 2, 2026

Copy link
Copy Markdown
Author

/publish

@ws-rush

ws-rush commented Jan 2, 2026

Copy link
Copy Markdown
Author

for direction of hero and dropdown arrows, they look right for me, above comparing between them

You're right, review the menu button on narrow screen I think it should be flipped.

it is ready

@ws-rush

ws-rush commented Jan 2, 2026

Copy link
Copy Markdown
Author

actually it looks good in my device , I will add Spanish to my device then try

It should display the same text inside the , we use lang in the browser, the problem when some punctuation present inside the time.

I fixed it, it is now works correctly, photos from English, Spanish, Arabic

image image image

@ws-rush

ws-rush commented Jan 2, 2026

Copy link
Copy Markdown
Author

/publish

@rami-elementor

Copy link
Copy Markdown

This PR is duplicate of #5034


provide(layoutInfoInjectionKey, { heroImageSlotExists })

watchEffect(() => {

@userquin userquin Jan 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be used also on ssr, generated html pages should have the dir attr at build time and at runtime.

Maybe this is not the best place to change html dir attr, we should move it to client/app/index.ts (already included for lean at client spa but we should also check if we should add it for ssr):
https://github.com/vuejs/vitepress/blob/main/src/client/app/index.ts#L47

@userquin

userquin commented Jan 5, 2026

Copy link
Copy Markdown
Member

This PR is duplicate of #5034

/cc @brc-dd I like using start/end approach (this pr)

@brc-dd

brc-dd commented Jan 12, 2026

Copy link
Copy Markdown
Member

I like using start/end approach (this pr)

I'll take a look. The approach of both PRs look similar though. 👀 Probably can keep both / parts of both.

Comment thread src/client/theme-default/components/VPDocOutlineItem.vue Outdated
Comment thread src/client/theme-default/components/VPHomeContent.vue Outdated
Comment thread src/client/theme-default/components/VPLocalNavOutlineDropdown.vue Outdated
Comment thread src/client/theme-default/components/VPNavBar.vue Outdated
Comment thread src/client/theme-default/components/VPTeamMembersItem.vue Outdated
Comment thread src/client/theme-default/styles/components/vp-code-group.css Outdated
ws-rush and others added 6 commits June 15, 2026 22:02
Co-authored-by: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com>
Co-authored-by: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com>
Co-authored-by: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com>
Co-authored-by: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants