Twitter | Search | |
Nicolas
AFK. Past: Software ; Anthropology .
10,541
Tweets
275
Following
30,694
Followers
Tweets
Nicolas retweeted
Nicolas Feb 20
Replying to @necolas
Interactive Glitch demo of React Native's support for Right-to-Left (RTL) UI layout
Reply Retweet Like
Nicolas 23h
Replying to @thekitze
Although my suggestion is to use and get used to the React Native APIs, it's straightforward to create your own cross-platform abstractions on top of React Native
Reply Retweet Like
Nicolas Feb 20
Replying to @dalmaer
You can use it but there's no native support yet
Reply Retweet Like
Nicolas Feb 20
Replying to @necolas
One great thing about React Native's design is that this functionality–selecting one-of-three possible LTR/RTL layouts at runtime–can be implemented on web in ~100 LOC
Reply Retweet Like
Nicolas Feb 20
Replying to @necolas
Interactive Glitch demo of React Native's support for Right-to-Left (RTL) UI layout
Reply Retweet Like
Nicolas Feb 20
Replying to @danwrong
I had the same thoughts. Didn't find anything simple/ flexible enough
Reply Retweet Like
Nicolas Feb 20
React Native for Web 0.5.0 ↔️ Direction-independent styles. 👆 Improvements to the responder event system. 🐞 Lots of bug fixes
Reply Retweet Like
Nicolas Feb 18
I bought thermals and winter is no longer a threat to my survival
Reply Retweet Like
Nicolas Feb 17
What commonly available fonts do you think are not-as-terrible for Arabic, Farsi, Urdu, etc.?
Reply Retweet Like
Nicolas Feb 17
I'd prefer not to penalise those people with web font downloads. This is an area where OS and browsers vendors could have a greater positive impact
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
One day soon-ish, something like create-react-app could empower anyone to make localised apps that are better than what most billion dollar corporations are putting out there today.
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
I now see localisation as part of accessibility. I knew nothing about RTL layouts and typography before I worked at Twitter, and only know a little more today. But over 500M people use RTL languages and I think we can do better for them.
Reply Retweet Like
Nicolas Feb 17
Replying to @AhmedElGabri
It would be nice if Google included Noto on Android devices and in Chrome, they designed it specifically for these kinds of issues
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
React Native for Web also lets you toggle between LTR and RTL layouts *at runtime*, without an app reload ('forceUpdate' the root). This is something I wanted because I broke RTL at Twitter too many times, simply because it was not easy to debug.
Reply Retweet Like
Nicolas Feb 17
Replying to @AhmedElGabri
Thanks, interesting. Twitter is using whatever someone decided was good once upon a time. Personally, I would defer to Google's material guidelines. The key is to provide development tools that support per-language typography at all, then pick the right font :)
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
Customizing the typography of your text component on a per-language basis is also trivial with React Native if your backend infers the language of user content. Here's a simplified version of the AppText component I made for Twitter:
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
It turns out there is a simple way to correctly align text, whatever the language and global writing direction. Let the browser do it by adding dir="auto" to container element. React Native for Web does this automatically so you don't need to know.
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
Compare that with Twitter Lite, which customises the typography for *user content* in languages like Arabic and Japanese, whatever the app's global language setting.
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
This is Arabic user content on . On the left is Arabic content as rendered when Arabic is the app's language. On the right, when English is the language. Notice how the legibility of Arabic text is worse in the latter case.
Reply Retweet Like
Nicolas Feb 17
Replying to @necolas
Here are some very common RTL bugs. This is LinkedIn when you're using Arabic. Notice how English user content is incorrectly right-aligned, and the western font-family makes it difficult to read tall and dense scripts like Arabic.
Reply Retweet Like