-
Notifications
You must be signed in to change notification settings - Fork 987
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
[Fix] Crash on onboarding due to nil value #16884
Conversation
Signed-off-by: Mohamed Javid <[email protected]>
88% of end-end tests have passed
Failed tests (5)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (36)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
|
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 @smohamedjavid. Just left a comment that's not a blocker at all.
[:show-bottom-sheet | ||
{:content getting-started-doc | ||
:shell? true}])}]}]]) | ||
:right-section-buttons (cond-> [{:type :grey |
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.
The more future proof solution is to change right-section-buttons
to deal with nils (just filter them out), since it's quite common to use when
to build up vectors. For example, re-frame even mentions this as one of the features of its :fx
effect.
if any element of :fx is nil, it will be ignored. This allows effects to be conditionally included via a when (an example is given above)
Although cond->
is just fine, the better fix imo is to make page-nav
more resilient.
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.
if any element of :fx is nil, it will be ignored. This allows effects to be conditionally included via a when (an > example is given above)
This is really helpful. Thanks for sharing!
I agree @ilmotta. We should this filter in all the component which receives a vector to prevent these types of crashes.
I faced this same issue when I was refactoring the action-drawer component, I added a filter to prevent it.
(let [filtered-actions (filter some? actions)] |
the better fix imo is to make page-nav more resilient
I will add the filter in a separate PR 👍
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.
@ulisesmac is looking into that component I believe :)
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.
Yes, I will improve our page-nav component 👍
@smohamedjavid thanx for the fix Tested e2e, universal pr builds (on android and ios), nightly build (on ios). Was not able to test nighty build on android and release builds on ios and android, because builds are failing for some reason when trying to build manually in jenkins. But it is not PR problem I guess. Let's merge this PR. |
fixes #16883
Summary
This PR fixes the crash on the
New to status
screen to due usage ofwhen
inside the vector which producesnil
value.Platforms
Steps to test
New to status
screenstatus: ready