NoriginMedia / Norigin-Spatial-Navigation

React Hooks based Spatial Navigation (Key & Remote Control Navigation) / Web Browsers, Smart TVs and Connected TVs
MIT License
315 stars 94 forks source link

Add support for RTL #96

Closed evanwang0 closed 10 months ago

evanwang0 commented 1 year ago

This PR adds support for RTL and addresses issue #88. Feel free to request changes, overwrite, or ignore and close this PR. The PR is provided as a courtesy.

Here is a summary of the changes:

Notes:

evanwang0 commented 1 year ago

Worth mentioning that the issue requests RTL on the fly and while not implemented in the PR can be done through replacing this.writingDirection with a form of document.dir

akash-kush9 commented 12 months ago

Worth mentioning that the issue requests RTL on the fly and while not implemented in the PR can be done through replacing this.writingDirection with a form of document.dir

Hi @evanwang0, Quick question regarding this PR, Once integrated will this allow the app to focus the rightmost element first instead of leftmost element?

evanwang0 commented 11 months ago

@akash-kush9 That is correct.

jeev1989 commented 11 months ago

Thanks @evanwang0 👍 Tried out this fix and it seems to be working as expected. @asgvard , @predikament : When can we expect this fix to be reviewed/merged and made available?

predikament commented 11 months ago

Thanks @evanwang0 👍 Tried out this fix and it seems to be working as expected. @asgvard , @predikament : When can we expect this fix to be reviewed/merged and made available?

We've just added this task to our backlog and it will be reviewed ASAP; We'd like to get this functionality included in a good way.

Braggiouy commented 10 months ago

Tested this PR locally, seems pretty complete and RTL layout quite well integrated.

Just as a hint for testing : https://www.aleksandrhovhannisyan.com/blog/changing-locale-in-chrome-with-dev-tools/

or

We can add dir="rtl" to the <html> tag once we inspect the app in the element inspector.

Quick Demo Video :

https://github.com/NoriginMedia/Norigin-Spatial-Navigation/assets/72386708/ea957df4-5070-4f54-9e62-28e468be38e4

sarah-harissa commented 10 months ago

I am waiting for the approval, thank you guys.