-
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
[Refactor#18748] - Collectible Tag #18804
Conversation
Jenkins BuildsClick to see older builds (19)
|
9ac7397
to
fd60710
Compare
Incorporated changes from following PR #18799 |
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.
Looks good 👍
FYI: Edited the description to close the old PR and the issue.
fd60710
to
7535c74
Compare
46% of end-end tests have passed
Failed tests (25)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (22)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
|
(h/describe "Collectible_tag tests" | ||
(h/test "Renders Default option" | ||
(let [data (get-test-data {})] | ||
(h/render-with-theme-provider [collectible-tag/view data] theme) |
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.
render-with-theme-provider
doesn't need a default theme anymore. If no theme is passed, a default :light
is assume automatically.
[:=> | ||
[:catn | ||
[:props | ||
[:map {:closed true} |
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.
We prefer open maps, because sometimes extra data might be passed down to components.
Malli maps are open by default, so removing {:closed true}
would do.
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 don't fully agree with this, even though this was already merged. I think we should prefer closed maps for component props, unless needed for the "extra data" edge-case (which IMO shouldn't even happen 🥲). We had the conversation on discord a while back, but we didn't finish it and I think we should continue it someplace else, maybe an issue/discussion on GH, since on discord it's difficult to keep track of simultaneous convos.
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.
Yeah let's centralise it somewhere. Discord vote, notion doc or a GitHub discussion. Or anything like this 👌
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.
here it is #18842
[:blur? {:optional true} [:maybe boolean?]] | ||
[:theme :schema.common/theme] | ||
[:collectible-img-src :schema.common/image-source] | ||
[:collectible-name string?] |
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.
:string
is preferred over string?
. Same for boolean?
, should be :boolean
Context: #18696 (comment)
(case size | ||
:size-24 10 | ||
:size-32 12 | ||
nil)) |
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 know you didn't make this change, but is an explicit nil
needed ? Isn't that returned by default ?
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.
You are right!
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.
Ooh no, I'm pretty sure this is not right. Case will crash if no default value is provided so we must explicitly set it afaik
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, @J-Son89. I saw it on google that nil
is default so I though we were safe. But according to the docs:
https://cljs.github.io/api/cljs.core/case
If no default expression is provided and no clause matches, an Error is thrown.
Can I row back that?
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 think you should leave the explicit default. Afaik we've had this issue many times in the codebase 🧯
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.
@shivekkhurana do you also agree?
7535c74
to
c70d7b2
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.
4e7445d
to
333ee60
Compare
48% of end-end tests have passed
Failed tests (24)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (23)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestDeepLinksOneDevice:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
|
aae4b66
to
579b87d
Compare
[Refactor Collectible Tag] Improve component schema and add component_spec
fixes #18797
closes #18799
Summary
Following the merge of the Quo Collectible Tag, it was observed that certain alerts were being triggered due to schema inconsistencies. This PR addresses those issues and incorporates
component_specs
to enhance functionality.Simulator.Screen.Recording.-.iPhone.13.-.2024-02-07.at.14.11.21.mp4
Review Notes
This PR maintains the existing design and functionality.
Platforms
Functionalities
Steps to Test
Status: Ready