fix: change of width of tabBarIndicator due to change of leftPadding #11713
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The issue manifests itself only on the android phones (as far as I know).
When we try to add paddingLeft and width: 'auto' to contentConteinerStyle in TabBar, we get a
certain problem: our TabBarIndicator's width goes completely out of whack. This problem is due to
a more general problem in react-native, which can't properly process large values of scaleX
transforms when position of the block is either 'relative' or 'absolute' and 'left' is defined
on android. There are two main ways to solve this problem: the first one is to wail
'till the folks in react-native community solve the underlying issue, and the second
(and way more attractive in my personal opinion) solution is to make width of the tabBarElement
on android larger so that we don't have to deal with scaleX's in triple digits. This results
with a tad bit more complicated maths in TabBarIndicator, particularly when it comes to calculating
translations after the scaling, but notihng too complicated.
Test plan
28 should do)
out of whack:
document_5397965453672856642.mp4
going to be completely within the acceptable levels of whack