-
Notifications
You must be signed in to change notification settings - Fork 984
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
Account selection: Use bottom sheet component #18919
Conversation
:customization-color color | ||
:on-complete #(join-community-and-navigate-back id)}]]])) | ||
(let [{id :community-id} (rf/sub [:get-screen-params]) | ||
show-addresses-for-permissions (fn [] |
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.
FYI: This is a performance optimization pattern we can apply more often. The community ID or most IDs for that matter will never change, so we can extract the community ID to a let
binding on the mount phase. Along with that, we can then extract anonymous functions that are re-created on every render that need to close over the community ID, therefore allowing Reagent to detect that the arguments passed to hiccup components are the same when it compares args for the current and new render.
(reagent/with-let [atom-data (reagent/atom data)] | ||
[rn/view {:style style/container} | ||
[rn/view {:style (merge (style/container label) container-style)} |
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.
FYI: style/container
is a function, so this is currently a bug. I just made this component identical in behavior to its cousin settings.category.settings.view
.
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
set-sheet-height #(reset! sheet-height (get-layout-height %)) | ||
set-item-height #(reset! item-height (get-layout-height %))] |
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.
Nice, More performant to have state updates defined outside render fn.
Jenkins BuildsClick to see older builds (38)
|
@@ -5,81 +5,92 @@ | |||
[react-native.gesture :as gesture] | |||
[status-im.common.password-authentication.view :as password-authentication] | |||
[status-im.contexts.communities.actions.accounts-selection.style :as style] | |||
[status-im.contexts.communities.actions.addresses-for-permissions.view :as addresses-for-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.
btw, I'm trying to comment this as close to the ns as possible.
Is this accounts selection really communities specific??
Will there be other areas in the application where we want to select the specific accounts??
For example purchasing ens names might have some feature similar to this needed?
cc @clauxx
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.
@J-Son89, I think this question could be redirected to a designer or to the PO if you want to be really certain.
My current understanding and what I remember from interactions with designers is that the account selection is very specific to communities and the UI is built for this use case. So even if we have a similar account selection feature like you mentioned, they would probably redesign some important parts. For example, in the account selection screen, the elements displayed are all tied to the concept of token permissions, which is stored at the community level.
79% of end-end tests have passed
Failed tests (9)Click to expandClass TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (38)Click to expandClass TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
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
Unable to test iOS PR build due to this issue: #18898 RPReplay_Final1708496317.MP4 |
Is this a newly created community? |
@yqrashawn created last week. |
can you share the community link here, I tried OCR but the page is broken |
ff05192
to
033a0fb
Compare
Hi @ilmotta , thanks for the fixes! ISSUE 1: The
|
@qoqobolo, I just noticed the following minor UI regression that's happening because the section "Eligible to join as X" appears and disappears while the check sent to status-go is happening, and because now we use a bottom sheet, which adjusts its height to the content. This can be fixed in a separate issue to speed up our process to merge this one because we have quite a few people touching the same files and rebasing has been painful. Would that be fine for you? jumpy.webm |
I would prefer if we can fix in a follow-up because it's already in develop. Do we have an issue for that already? I can surely get it done this week.
I'm gonna have a look and fix this problem in this PR :) Good finding!
I believe I just fixed this one after rebasing a pushing a few minutes ago. Maybe to avoid interrupting you too much, once I fix the bar color bug you could do another review pass to see if everything is fixed (except the bottom space issue). |
Everything sounds great, thanks @ilmotta!
We don't have it logged yet. I will create an issue and assign you.
Yes, totally. Just to make sure: you mean this "jumping" of the bottom sheet when its height is changing, right? I'll create an issue for this as well. |
0b53bb8
to
fe89fda
Compare
8% of end-end tests have passed
Failed tests (43)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestDeepLinksOneDevice:
Class TestCommunityMultipleDeviceMerged:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePR:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (4)Click to expandClass TestCommunityOneDeviceMerged:
|
Ignore these results, we have another global issue... |
fe89fda
to
7bcbcb7
Compare
@qoqobolo, do you think it will be feasible to test this PR manually again until tomorrow? Maybe it's prudent to skip e2e results this time? I'm asking this because someone merged a PR recently that forced me to do a manual rebase. Also because @ajayesivan already has cooked one other PR and he's just waiting for this one to be merged to avoid further code conflicts. No pressure really, just checking my own expectations. |
@ilmotta unfortunately, we cannot merge this particular PR without making sure that it does not break the tests, so we need fresh results. I'm really sorry about bad luck of this PR :(
Yes, that's what I was going to do today. And the good news that the issue with peers is already fixed, so I can both check the PR manually and rerun e2e. |
UPD: I can't test it even manually because Waku is broken again. |
25% of end-end tests have passed
Failed tests (35)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (12)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
|
@qoqobolo got it. I'll shut up! Let's not of course break the test suite. Thanks for the updates! |
88% of end-end tests have passed
Failed tests (5)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (42)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestActivityMultipleDevicePRTwo:
Class TestDeepLinksOneDevice:
|
Thanks for waiting @ilmotta ! Unfortunately, Issue 3 is back, both for leaving the community from the community overview screen and from the communities home screen: The same thing also happens for the bottom sheet with a list of users who put a reaction. To reproduce this:
And the third place where I currently can see this is an image preview on long-press in the chat:
|
7bcbcb7
to
8f43811
Compare
@qoqobolo, I tried yet another solution, even simpler. This one I fully tested in all cases and there's no bug. Let's see now! I noticed a bug while testing, and it exists in Notice how the selected item appears only when the bottom sheet is going to be closed. new.bug.in.develop.webm |
yes sorry it should be fixed soon |
No worries at all, thank you @flexsurfer |
80% of end-end tests have passed
Failed tests (1)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Passed tests (4)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
|
Can't believe it but it seems this PR is ready to be merged 😱😳 |
b9590ce
to
04e1d57
Compare
Fixes #18617
Fixes #18619
Summary
Use bottom sheet component as designed in Figma.
Additionally
settings.category.reorder.view/view
.Review notes
The challenge for this PR was to make the scrollable content work inside a bottom sheet, while supporting the designs for a fixed (always visible) header and footer. Using
:flex 1
(as is today) in the bottom sheetcontent
wrapper doesn't work. We need to tell the bottom sheetcontent
to have a max height.Demo
As expected, the bottom sheet component auto adjusts to its content. Also, notice when the "Cancel" button is pressed, there's an animation (which on Android &
develop
doesn't currently happen to me).feature-correct.webm
Platforms
Steps to test
Besides the two bugs being fixed by this PR, it's recommended to check how other bottom sheets are being displayed. I checked (on Android) usages of other bottom sheets and couldn't find any regression. Special care for iOS should be taken because I can't test in it.
status: ready