Fix search bar not hiding when member count drops below 12 offline#91513
Fix search bar not hiding when member count drops below 12 offline#91513MelvinBot wants to merge 3 commits into
Conversation
…line Use memberCount (which excludes pending-delete members) instead of data.length for shouldShowSearchBar, and clear the search input when the effective count crosses below the threshold. Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
|
@MelvinBot merge main, complete the checklist and test steps, and mark screenshots as done since they’ll be added in the reviewer checklist |
|
@MelvinBot Ready for review |
…neVisibility Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com> # Conflicts: # src/pages/workspace/WorkspaceMembersPage.tsx
|
Done! Here's what I did:
|
|
The This is a transient GitHub Actions / Blacksmith runner authentication failure. Re-running the failed job should resolve it. |
|
Marked as ready for review! ✅ |
|
@abzokhattab 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] |
|
The failing Error: The Action: Re-run the failed check — it should pass on retry. |
Codecov Report❌ Patch coverage is
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@MelvinBot fix the failing pipeline |
|
The This happened on all 3 retry attempts. No spellcheck actually ran. I re-triggered the failed job — it should pass on the next run. |
|
remerge to main @MelvinBot |
…neVisibility Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
|
Merged main — no conflicts this time. Branch is up to date. |
|
@madmax330 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] |
Explanation of Change
shouldShowSearchBarwas usingdata.lengthto decide whether to show the search bar, butdataincludes members withpendingAction: DELETEwhile offline (they render with a strikethrough). This meant the count never dropped below 12 offline, so the search bar stayed visible.This PR switches
shouldShowSearchBarto usememberCount, which already excludes pending-delete members and is the same count shown in the header. It also adds auseEffectthat clears the search input when the effective member count crosses below the threshold, mirroring the existing auto-clear logic inuseSearchResultsbut keyed off the correct count.Fixed Issues
$ #91433
PROPOSAL: #91433 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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
Screenshots will be added in the reviewer checklist.
Android: Native
Screenshots will be added during review.
Android: mWeb Chrome
Screenshots will be added during review.
iOS: Native
Screenshots will be added during review.
iOS: mWeb Safari
Screenshots will be added during review.
MacOS: Chrome / Safari
Screenshots will be added during review.