-
Notifications
You must be signed in to change notification settings - Fork 289
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
RTL Bug Android #544
Comments
Have you looked into whether something like this works: facebook/react-native#19150 (comment) |
Thank you for the response that's a very good suggestion, I was waiting for him to confirm if it works if he doesn't by the end of today, I'll try it myself and report back here. |
Got some free time, I thought I'd give it a try now. modified this file : VirtualRenderer.prototype.updateOffset = function (offsetX, offsetY, isActual, correction) {
if (this._viewabilityTracker) {
console.log(offsetX,this.getLayoutDimension().width, offsetY, isActual, correction);
var offset = this._params && this._params.isHorizontal ? I18nManager.isRTL && Platform.OS === "android" ?
this.getLayoutDimension().width - offsetX :
offsetX : offsetY;
if (!this._isViewTrackerRunning) {
if (isActual) {
this._viewabilityTracker.setActualOffset(offset);
}
this.startViewabilityTracker(correction);
}
this._viewabilityTracker.updateOffset(offset, isActual, correction);
}
}; It didn't solve the case that console.log that I provided might provide some useful info: LTR Start of the List :
LTR End of the List :
RTL Start of the List :
RTL End of the List :
Sound like |
I took a diff on layout manager in RTL and LTR modes https://editor.mergely.com/IHHq4Qi9/ (Removed that PR patch as it was not helping thought) |
Gave it another shot without the margin so there would be no estimation involved here are the diff results. https://editor.mergely.com/Dhvh0v7n/
|
Found where Do you have some free time to take a look at this whole issue? I couldn't really get the pieces together sounds a little too complicated for me who have no background about how this library works and nor the other one. Thanks, please let me know if you do or don't want to go through fixing this. |
According to facebook/react-native#19150 (comment)
|
Tested the RLV patch in my app using the latest version of flashlist and confirmed it doesn't fix the problem, which I mentioned in #520 (comment). I got sidetracked on other tasks but am trying to reserve some time to investigate this issue. |
Thank you so much for reporting this back! Been stuck on this whole rtl list thing for more than a week now :( |
Did some more testing and found that flashlist is not even working correctly for iOS RTL still. Will try to put up a stripped down example repo. |
Did you get a chance to proceed on that? If I could do anything useful please let me know. |
Expo sdk 46 supports this so I made a minimal demo with its snack if its helps: https://snack.expo.dev/@stevemoretz/flashlist-rtl-bug |
@Stevemoretz Did you find any solution or workaround? |
I'm precisely facing this problem. Can I help with it in any way ? |
Unfortunately I did not find any workarounds or anything, FlatList from react native still has RTL issues, and FlashList still has the same RTL issues nothing has changed, if you really want to help you could take a look at the information I provided and try to do a pull request on this issue. I couldn't make it work myself, but everything I found out I posted above in this issue. |
any news on this plz |
As in lots of countries, RTL is crucial to develop a proper app, so supporting RTL would be superb. |
are there any updates on this issue? it`s really a shame to not be able to use this library because of problems with RTL :( |
Did little investigation about the problem. Looks like problems lies both in the FlashList autolayout code and the underlying recyclerlistview. So as first step I applied this patch to recyclerlistview https://github.com/Flipkart/recyclerlistview/pull/629/files
|
has anyone found any solution for this RTL issue in FlashList ? |
Hey guys, @Stevemoretz @faizazafar @Kaveh-ap @MarouaniALA you can always force the layout to render component from left to right even when the device settings is RTL using |
There’s no change, the issue persists. |
Hey @naqvitalha @taboulot @mmmoussa @DevineDecrypter @MarouaniALA @faizazafar @Stevemoretz @taboulot @Ozaoujal For those who using const products = [[{id: 1}, {id: 2}], [{id:3}, {id:4}]]
const renderItem = //useCallback(
({ item: items, index }: RenderItem<Product[]>) => {
return (
<Box className='flex-row gap-0 px-4'>
{
items.map((item, index) => {
return (
<Box key={`${item.id}-${item.slug}-${index}`} style={{}}>
<Text style={{}}>{item.name}</Text>
</Box>
)
})
}
</Box>
)
}
<FlashList
ref={flashListRef}
numColumns={1}
contentContainerStyle={tailwind.style("py-4")}
estimatedItemSize={258}
data={products}
renderItem={renderItem}
/> You can adjust the child array length depend on the number of items in the same row |
Current behavior
On RTL Mode, the list is completely weird.
RTL:
SVID_20220801_164855.mp4
LTR:
SVID_20220801_164922.mp4
Expected behavior
Well it should simply behave like LTR but only the direction changes.
To Reproduce
I'm sorry I don't use anything but expo managed workflow so I couldn't get your sample app to work, but here's a simple repro.
Remember you need to restart your app to get the
I18nManager
's effect.Platform:
Environment
I though giving your library try because FlatList's RTL is corrupted on the latest version:
facebook/react-native#34314
Had no idea yours doesn't work too :(
It's a horrible time for having an RTL app right now!
The text was updated successfully, but these errors were encountered: