-
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
feat: disable categories/tags/distance rates when feature is disabled #43637
Conversation
Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
@getusha what is your ETA for testing this? thanks! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-20.at.11.33.20.at.night.movAndroid: mWeb ChromeScreen.Recording.2024-06-18.at.1.24.04.in.the.afternoon.moviOS: NativeScreen.Recording.2024-06-20.at.11.16.59.at.night.moviOS: mWeb SafariScreen.Recording.2024-06-18.at.12.59.36.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-06-18.at.12.53.38.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-06-21.at.2.14.58.in.the.afternoon.mov |
@dominictb could we update the QA steps to something like this? does the following make sense?
|
@getusha done! |
// find the rate to be enabled after disabling the distance rate feature | ||
// first check the default rate | ||
let rateEntryToBeEnabled = rateEntries.find((rate) => rate[1]?.name === 'Default Rate'); | ||
// if the default rate is not enabled/doesn't exist, we'll switch to the first enabled rate |
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.
@dominictb noticed one case,
- Create 3 distance rates
- Disable the first one and leave the others enabled
- Go offline
- Disable and enable the feature
- You'll notice the 2nd rate will remain enabled while the first one is disabled
- Go online
- The change will be reverted and only the first one will be re-enabled
I think we need to make sure that we re-enable the first distance rate, even if it was previously disabled.
Screen.Recording.2024-06-18.at.1.35.24.in.the.afternoon.mov
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.
@getusha lemme check and update. Give me some time, thanks!
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.
web-8MB.mp4
Fixed
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 & tests well. thanks
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.
Thanks!
|
||
const rateEntries = Object.entries(customUnit?.rates ?? {}); | ||
// find the rate to be enabled after disabling the distance rate feature |
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.
NAB
const rateEntries = Object.entries(customUnit?.rates ?? {}); | |
// find the rate to be enabled after disabling the distance rate feature | |
const rateEntries = Object.entries(customUnit?.rates ?? {}); | |
// find the rate to be enabled after disabling the distance rate feature |
✋ 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/mountiny in version: 9.0.2-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
feat: disable categories/tags/distance rates when feature is disabled
Fixed Issues
$ #39463
PROPOSAL: #39463 (comment)
Tests
Offline tests
QA Steps
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
iOS: mWeb Safari
compressed_iosweb.mp4.mp4
MacOS: Chrome / Safari
compressed_web.mov.mp4
MacOS: Desktop
compressed_web.mov.mp4