-
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
Communities - Channel list should not be shown for token-gated communities #17901
Conversation
Jenkins BuildsClick to see older builds (20)
|
674241e
to
24b2ced
Compare
24b2ced
to
e4c8da2
Compare
(when (or (and token-permissions joined) | ||
(not token-permissions)) | ||
[channel-list-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.
Indentation looks a bit weird here. I guess a format will fix it.
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.
tks, I will take a look also a good opportunity to fix again my auto format!
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.
fixed =)
23ba6e3
to
9b9c2ac
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 👍🏻
:community-color color | ||
:on-first-channel-height-changed on-first-channel-height-changed} | ||
(add-handlers-to-categorized-chats id chats-by-category joined)]]))) | ||
(when (or (and token-permissions joined) |
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.
Even if this code works, since token-permissions
is a sequence, it's more robust and idiomatic to use seq
to check something is there.
(and (seq token-permissions) joined)
See from example below that if a collection is empty, it is truthy. If you check using just (and token-permissions ...)
you are checking the value is either not nil or not false, but an empty sequence is truthy.
(or [] :default-value) ; => []
We do the same thing here
(if (seq token-permissions) |
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.
Make sense, thanks!
9b9c2ac
to
24b382a
Compare
:on-first-channel-height-changed on-first-channel-height-changed} | ||
(add-handlers-to-categorized-chats id chats-by-category joined)]]))) | ||
(when (or (and (seq token-permissions) joined) | ||
(not (seq token-permissions))) |
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.
(not (seq
can be replaced by empty?
https://github.com/clojure/clojure/blob/clojure-1.11.1/src/clj/clojure/core.clj#L6246
24b382a
to
f73d07f
Compare
78% of end-end tests have passed
Failed tests (7)Click to expandClass TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (3)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (35)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
82% of end-end tests have passed
Failed tests (5)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Expected to fail tests (3)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (37)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
Thanks for your amazing work! Devices:
Please, cherry-pick your fix to release branch too, thank you! |
Thank you so much, team! |
f73d07f
to
d2d008a
Compare
This commit hides the categorized channel list for token-gated communities overview.
This commit hides the categorized channel list for token-gated communities overview.
fix: #17836
Figma design:
https://www.figma.com/file/h9wo4GipgZURbqqr1vShFN/Communities-for-Mobile?type=design&node-id=14009-569565&mode=design&t=CYSZhcyPISfU2ds1-0
Demo
Simulator.Screen.Recording.-.iPhone.11.Pro.-.2023-11-14.at.15.04.33.mp4
Summary
This approach only displays the channels if the conditions are satisfied.
Platforms
status: ready