-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: turn off selection mode if all active options are deleted #48547
Conversation
@dominictb, The result in the video is that it didn't exit selection mode. |
const hasActiveOption = some(
flatMap(sections, (section) => section.data),
(option) => !option.isDisabled,
);
const prevHasActiveOption = usePrevious(hasActiveOption);
useEffect(() => {
if (props.shouldAutoTurnOffWhenHasNoActiveOption && !hasActiveOption && prevHasActiveOption) {
turnOffMobileSelectionMode();
}
}, [hasActiveOption, prevHasActiveOption]); to a new hook, instead of adding it to this here as I did previously. It will fix the bug you mentioned:
OfflineScreen.Recording.2024-09-06.at.14.44.59.movOnlineScreen.Recording.2024-09-06.at.14.46.03.mov |
Hi, @Julesssss, How about fixing tags and report fields page at the same time? If needed, maybe we could slightly increase the bounty? BTW, I'm also testing the display of multi-level tags, hoping to provide some insights for further changes. :) The actual result in the OP mentioned it:
|
Sounds good to me. I'm unfamiliar with multi-level tagging, perhaps we can create a separate issue for that one once we are done here. |
@ntdiary are you happy for the bounty to be bumped by 50% for the Tags and Report fields page? |
@Julesssss, I'm really happy for the bounty. But after investigating, I think we can fix the category page and report fields page in this PR. As for tags and multi-level tags, since they are conditionally distinguished in the App/src/pages/workspace/tags/WorkspaceTagsPage.tsx Lines 90 to 92 in fda4e1b
|
Hi, @dominictb, when you have time, can you please also apply the fix to report fields page and add test steps? After that, I'll fill the checklist. :) |
…/47057-off-selection
…b/epsf-app into fix/47057-off-selection
@ntdiary Applied fix, added test steps and retested: Screen.Recording.2024-09-15.at.00.15.44.mov |
Reviewer Checklist
Screenshots/VideosAndroid: Native48547-android-native.mp4Android: mWeb Chrome48547-android-web.mp4iOS: Native48547-ios-native.mp4iOS: mWeb Safari48547-ios-web.mp4MacOS: Chrome / Safari48547-web.mp4MacOS: Desktop48547-desktop.mp4 |
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.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.0.38-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.38-4 🚀
|
Details
Fixed Issues
$ #47057
PROPOSAL: #47057 (comment)
Tests
Verify that: Selection mode will exit after deleting all the categories.
Verify that: Selection mode will exit after deleting all the report fields.
Offline tests
Verify that: Selection mode will exit after deleting all the categories.
Verify that: Selection mode will exit after deleting all the report fields.
QA Steps
Verify that: Selection mode will exit after deleting all the categories.
Verify that: Selection mode will exit after deleting all the report fields.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
compressed_android.webm.mp4
Android: mWeb Chrome
compressed_aweb.webm.mp4
iOS: Native
compressed_ios.mp4.mp4
Screen.Recording.2024-09-15.at.00.15.44.mov
iOS: mWeb Safari
compressed_iosweb.mp4.mp4
MacOS: Chrome / Safari
compressed_desktop.mov.mp4
MacOS: Desktop
compressed_desktop.mov.mp4