-
Notifications
You must be signed in to change notification settings - Fork 204
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
[CIS-1213] Fix custom Components
being not retrievable
#1519
Conversation
Components
being not retrievableComponents
being not retrievable
937b91b
to
99936ea
Compare
Codecov Report
@@ Coverage Diff @@
## main #1519 +/- ##
==========================================
- Coverage 74.36% 74.32% -0.04%
==========================================
Files 231 231
Lines 10781 10796 +15
==========================================
+ Hits 8017 8024 +7
- Misses 2764 2772 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
It seems that some components still have problems 🤔 |
99936ea
to
118e43f
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG?
Components
being not retrievableComponents
being not retrievable
118e43f
to
09a1022
Compare
09a1022
to
f823686
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@evsaev I still find it weird, why this happens. Customers are not complaining they can't customize these components. Also, we have these components customized in our sample apps. Why is this happening only on the tests? |
Customers do not face with this issues because they inject components via Components.default and it works well. If they tried to use custom components in specific view sub-tree they would see it is broken. In most of snapshot tests UI components are sand-boxed so the ChannelListVC was actually the only place where the responder chain is long enough. |
f823686
to
8832680
Compare
Ahhhh now it all makes sense 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
* Fix `willMove(to parent)` called twice * Fix responder chain being cutoff for child controllers * Fix responder chain being cutoff for message cell * Update CHANGELOG.md
🔗 Issue
CIS-1213
🎯 Goal
Fix responder chain being cutoff when
ComposerVC/ChatMessageListVC
controllers lifecycle is running which leads to the subviews of wrong types being instantiated.Fix the lifecycle of
ChatMessageContentView
being triggered before a message cell is part of view hierarchy.🛠 Implementation
The base view controller was updated to fallback to parent view controller if the responder chain backed by view hierarchy has not yet been established.
🧪 Testing
The PR contains unit tests added that check the responder chain is not cutoff at the moment when child controllers instantiate their subviews. The unit test that at the moment makes CI red is fixed by the changes done in
ChatMessageCell/ChatMessageContentView
.🎨 Changes
☑️ Checklist