You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Fabric] IOS - Log in - App flickers when open it #16799
This issue seems to be the result of two separate issues, first being Bootsplash library not working on Fabric, so it does not disappear only after the content is ready, which has been fixed with 36a6ff5 (#13767). Second was the jumping caused by the avatar image rendering only after the onyx state is resolved. While it was loading, null is rendered by onyx, and the style of the whole element depends on the style of AvatarWithIndicator component. Since it changes from null to a view with height: 40, the whole header gets bigger height and the content below jumps a bit.
We believe it should not be like that. The placeholder for the image should be visible from the beginning since it does not use any of the onyx data. We moved the part that uses onyx to the separate Indicator component and it works just fine then: 8a3b24f (#13767). wdyt @mountiny@roryabraham@AndrewGable ?
As a side note, this was not visible on the old arch, but we are not sure why. Maybe because the rerenders are batched more often then and the state with null instead of content does not render, or maybe we just did not spot such case and it is an issue there too.
This is a bit of a separate conversation, but I've recently been thinking we should change Onyx to remove that behavior and just make subscribers responsible for handling when the data is not present. The only trick is that it's not easy to tell the difference between "data not read yet" and "data not present", but I'm not sure if that really matters.
This would also enable us to make a useOnyx hook, which we can't necessarily do without breaking this behavior of rendering null while data is being loaded.
Activity
MelvinBot commentedon Mar 31, 2023
Triggered auto assignment to @tjferriss (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.MelvinBot commentedon Mar 31, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)j-piasecki commentedon Apr 6, 2023
Hi! I'll be working on this issue.
WoLewicki commentedon Apr 6, 2023
Hi! I'll be working on this issue.
WoLewicki commentedon Apr 27, 2023
This issue seems to be the result of two separate issues, first being
Bootsplashlibrary not working on Fabric, so it does not disappear only after the content is ready, which has been fixed with36a6ff5(#13767). Second was the jumping caused by the avatar image rendering only after the onyx state is resolved. While it was loading,nullis rendered by onyx, and the style of the whole element depends on the style ofAvatarWithIndicatorcomponent. Since it changes fromnullto a view withheight: 40, the whole header gets bigger height and the content below jumps a bit.We believe it should not be like that. The placeholder for the image should be visible from the beginning since it does not use any of the onyx data. We moved the part that uses onyx to the separate
Indicatorcomponent and it works just fine then:8a3b24f(#13767). wdyt @mountiny @roryabraham @AndrewGable ?As a side note, this was not visible on the old arch, but we are not sure why. Maybe because the rerenders are batched more often then and the state with
nullinstead of content does not render, or maybe we just did not spot such case and it is an issue there too.mountiny commentedon Apr 27, 2023
I think that sounds as a good solution and also great investigation @WoLewicki
roryabraham commentedon Apr 27, 2023
Yeah, that sounds like a good solution.
This is a bit of a separate conversation, but I've recently been thinking we should change Onyx to remove that behavior and just make subscribers responsible for handling when the data is not present. The only trick is that it's not easy to tell the difference between "data not read yet" and "data not present", but I'm not sure if that really matters.
This would also enable us to make a
useOnyxhook, which we can't necessarily do without breaking this behavior of renderingnullwhile data is being loaded.j-piasecki commentedon Jun 20, 2023
No longer flickering when building the app from the current (WoLewicki@e12c1cf)
andrew-fabricbranch:ios-startup.mov
melvin-bot commentedon Sep 4, 2023
@j-piasecki, @WoLewicki, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.