-
Notifications
You must be signed in to change notification settings - Fork 985
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
Add :wallet/accounts-with-customization-color
subscription
#18302
Conversation
Jenkins BuildsClick to see older builds (4)
|
:<- [:wallet/accounts] | ||
(fn [accounts] | ||
(mapv (fn [{:keys [color] :as account}] | ||
(assoc account :customization-color color)) |
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.
This subscription just duplicates the value of :customization-color
in each account
map. I don't see much value in this processing taking place as a subscription. Why can't the view use the :color
key directly?
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.
DS components are designed to accept the :customization-color
prop, if we are not doing this transformation here, we will have to map it before passing the data to the components each time. For example, here when using the quo/category
component.
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.
I see, thanks.
:wallet/accounts-with-customization-color | ||
:<- [:wallet/accounts] | ||
(fn [accounts] | ||
(mapv (fn [{:keys [color] :as account}] |
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.
Using lazy sequences can be beneficial if other computations will (could be in the future) performed on the result of this subscription. mapv
will eagerly process everything, which is likely fine because accounts
is a small data set.
Things can get confusing and inefficient if we mix them, so it's more common in Clojure that devs use the lazy ones and only use eager alternatives if really needed.
3c013c9
to
6b35cc2
Compare
67% of end-end tests have passed
Failed tests (9)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Expected to fail tests (7)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Passed tests (32)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
|
6b35cc2
to
2f3e4d2
Compare
fixes #18198
status: ready