Repository navigation
#37605 Do not show "member not found" when loading member list - #37731
Conversation
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@aimane-chnaif all yours |
| </View> | ||
| )} | ||
| {!!headerMessage && ( | ||
| {!!headerMessage && !showLoadingPlaceholder && ( |
There was a problem hiding this comment.
This changes affects all pages where SelectionList is used. This is not safe change.
I suggest to hide header message only when loading skeleton shows.
| {!!headerMessage && !showLoadingPlaceholder && ( | |
| {!!headerMessage && !(flattenedSections.allOptions.length === 0 && showLoadingPlaceholder) && ( |
Or define shouldShowSkeletonView variable and update to !!headerMessage && !shouldShowSkeletonView
There was a problem hiding this comment.
@aimane-chnaif You may be right this is not the place for this change but your proposed change does not fix the root issue we want to address with this PR - the message is visible while loading members for some short period. I think I need to find completely different approach to fix this - I'll try to fix it today then.
There was a problem hiding this comment.
@aimane-chnaif I've changed the approach by introducing new prop in the BaseSelectionList component called notFoundMessage - this way we can threat this special message separately and show it only after loading process is finished (if there is no items loaded). Other messages could show up even while loading, as it was before.
What do you think?
There was a problem hiding this comment.
How about fixing this in WorkspaceMembersPage only, instead of introducing new prop in this base component?
There was a problem hiding this comment.
@aimane-chnaif I've tried and the message is shown for some milliseconds no matter what condition I use - I think because the beginning state of the list is loading, only fixing it in this component fixes the issue...
| </View> | ||
| )} | ||
| {!!headerMessage && renderTopMessage(headerMessage)} | ||
| {!!notFoundMessage && !showLoadingPlaceholder && !sections.some((item) => item.data.length > 0) && renderTopMessage(notFoundMessage)} |
There was a problem hiding this comment.
!sections.some((item) => item.data.length > 0) - is this condition different from flattenedSections.allOptions.length === 0 which was used to show skeleton view?
There was a problem hiding this comment.
@aimane-chnaif no difference from what I see - I can use it instead if you like
| {!!headerMessage && renderTopMessage(headerMessage)} | ||
| {!!notFoundMessage && !showLoadingPlaceholder && flattenedSections.allOptions.length === 0 && renderTopMessage(notFoundMessage)} |
There was a problem hiding this comment.
I am not sure about the case when 2 messages show at the same time.
But swap these rows so not found message should be above header message.
Or hide header message when not found message shows.
|
Sorry for back and forth but I personally like what I suggested before - #37731 (comment) Please check this: |
|
We should not show not found message when we don't know yet how many members |
|
@aimane-chnaif no worries - this issue is kind of tricky... I've checked what you proposed in this comment in a first place and the Not found message was glitching while the loader was visible, so this is not our solution... |
ok |
|
@aimane-chnaif I think the best would be to just introduce some |
When So |
|
Actually, I found interesting thing. |
yes unless we wanna update logic to
|
|
@aimane-chnaif I think I've fixed it - you are right with this condition but I've used it incorrectly (silly mistake). The condition is an equivalent of |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.50-5 🚀
|


Details
This PR fixes the issue with showing the header message of the Selection List before the list is loaded.
Fixed Issues
$ #37605
PROPOSAL: n/a
Tests
Offline tests
Same as above.
QA Steps
Same as above.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-03-05.at.12.16.37.mov
Android: mWeb Chrome
Screen.Recording.2024-03-05.at.12.17.23.mov
iOS: Native
Screen.Recording.2024-03-05.at.12.04.38.mov
iOS: mWeb Safari
Screen.Recording.2024-03-05.at.12.06.06.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-05.at.11.54.35.mov
MacOS: Desktop
Screen.Recording.2024-03-05.at.11.56.19.mov