You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-31] [$250] Billable - Billable toggle should have a locked icon in split details view #43756
Version Number: 1.4.83-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/4631196 Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Billable option is set to default to billable on Old Dot
Go to staging.new.expensify.com
Go to workspace chat
Split a manual expense with billable toggled enabled
Click on the split preview
Click on the toggle
Expected Result:
Billable toggle should appear with a locked icon if billable toggle cannot be edited after splitting the bill
Actual Result:
The billable toggle does not have a locked icon, is clickable but not responsive
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
We can also modify Switch component to accept a new prop disabledStyle and pass it to PressableWithFeedback. This should be done incase we want to show the regular cursor instead of disabled one.
We should also check for other components using Switch which may have similar issue.
We might also want to update the text color based on the isReadOnly prop.
What alternative solutions did you explore? (Optional)
changed the title [-]Billable - Billable toggle should have a locked icon in split details view[/-][+][$250] Billable - Billable toggle should have a locked icon in split details view[/+]on Jun 14, 2024
Please re-state the problem that we are trying to solve in this issue.
Billable toggle should have a locked icon in split details view
What is the root cause of that problem?
SplitBillDetailsPage is using the MoneyRequestConfirmationList Component. However, the disabled property hasn't been included in the MoneyRequestConfirmationList Component. And since SplitBillDetailsPage doesn't provide the onToggleBillable function to MoneyRequestConfirmationList, it doesn't trigger any action when clicking toggle button
To clarify, the lock icon is displayed when either the disabled prop is true or the showLockIcon prop is true. The showLockIcon prop should only be used when we want to display the lock icon without disabling the toggle, as in this particular use case
Ghi.Man.hinh.2024-06-15.luc.01.54.49.mov
Another consideration is that we've recently introduced the ToggleSettingOptionRow Component. We could also consider migrating these places to use the new component
The current way seems fine to me. However, if we aim for consistency, there shouldn't be any issues. I've just tested it locally, and it's functioning smoothly.
[@ishpaul777] The PR that introduced the bug has been identified. Link to the PR: #27172
[@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/27172/files#r1679832517
[@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No need
[@ishpaul777] Determine if we should create a regression test for this bug. - Not required
[@ishpaul777] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/a
changed the title [-][HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Billable - Billable toggle should have a locked icon in split details view[/-][+][HOLD for payment 2024-07-22] [$250] Billable - Billable toggle should have a locked icon in split details view[/+]on Jul 17, 2024
changed the title [-][HOLD for payment 2024-07-22] [$250] Billable - Billable toggle should have a locked icon in split details view[/-][+][HOLD for payment 2024-07-31] [$250] Billable - Billable toggle should have a locked icon in split details view[/+]on Jul 24, 2024
Activity
melvin-bot commentedon Jun 14, 2024
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Jun 14, 2024
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Krishna2323 commentedon Jun 14, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
We haven't added the
showLockIcon&disabledprop.App/src/components/MoneyRequestConfirmationList.tsx
Lines 1073 to 1080 in 2e85794
What changes do you think we should make in order to solve the problem?
Add
showLockIcon&disabledprop.We can also modify
Switchcomponent to accept a new propdisabledStyleand pass it toPressableWithFeedback. This should be done incase we want to show the regular cursor instead of disabled one.We should also check for other components using
Switchwhich may have similar issue.We might also want to update the text color based on the isReadOnly prop.
What alternative solutions did you explore? (Optional)
We can use
ToggleSettingOptionRow.Result
billable_lock_icon.mp4
Krishna2323 commentedon Jun 14, 2024
Proposal Updated
[-]Billable - Billable toggle should have a locked icon in split details view[/-][+][$250] Billable - Billable toggle should have a locked icon in split details view[/+]melvin-bot commentedon Jun 14, 2024
Job added to Upwork: https://www.upwork.com/jobs/~015cebf7a04f37f63d
melvin-bot commentedon Jun 14, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)cretadn22 commentedon Jun 14, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Billable toggle should have a locked icon in split details view
What is the root cause of that problem?
SplitBillDetailsPage is using the MoneyRequestConfirmationList Component. However, the disabled property hasn't been included in the MoneyRequestConfirmationList Component. And since SplitBillDetailsPage doesn't provide the onToggleBillable function to MoneyRequestConfirmationList, it doesn't trigger any action when clicking toggle button
App/src/components/MoneyRequestConfirmationList.tsx
Lines 1075 to 1079 in bdb9789
What changes do you think we should make in order to solve the problem?
Simply adding disabled={isReadOnly} to the MoneyRequestConfirmationList Component
App/src/components/MoneyRequestConfirmationList.tsx
Lines 1075 to 1079 in bdb9789
To clarify, the lock icon is displayed when either the disabled prop is true or the showLockIcon prop is true. The showLockIcon prop should only be used when we want to display the lock icon without disabling the toggle, as in this particular use case
Ghi.Man.hinh.2024-06-15.luc.01.54.49.mov
Another consideration is that we've recently introduced the ToggleSettingOptionRow Component. We could also consider migrating these places to use the new component
App/src/components/MoneyRequestConfirmationList.tsx
Lines 1075 to 1079 in bdb9789
App/src/components/ReportActionItem/MoneyRequestView.tsx
Lines 561 to 566 in bdb9789
The current way seems fine to me. However, if we aim for consistency, there shouldn't be any issues. I've just tested it locally, and it's functioning smoothly.
Krishna2323 commentedon Jun 15, 2024
Proposal Updated
31 remaining items
puneetlath commentedon Jul 16, 2024
@ishpaul777 please complete the checklist ASAP. I'd like to close this issue out.
ishpaul777 commentedon Jul 16, 2024
[@ishpaul777] The PR that introduced the bug has been identified. Link to the PR: #27172
[@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/27172/files#r1679832517
[@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No need
[@ishpaul777] Determine if we should create a regression test for this bug. - Not required
[@ishpaul777] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/a
ishpaul777 commentedon Jul 16, 2024
@puneetlath Please hold my payment until 7/22 i'll bump once i am ready to accept payment, we can move this to weekly for now
[-][HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Billable - Billable toggle should have a locked icon in split details view[/-][+][HOLD for payment 2024-07-22] [$250] Billable - Billable toggle should have a locked icon in split details view[/+]ishpaul777 commentedon Jul 24, 2024
Sadly i'd still have to keep my payment on hold (Expected End of this month) i'll ping once i am ready to accept. Thanks for you patience.
ishpaul777 commentedon Jul 24, 2024
update above ^ melvin
[-][HOLD for payment 2024-07-22] [$250] Billable - Billable toggle should have a locked icon in split details view[/-][+][HOLD for payment 2024-07-31] [$250] Billable - Billable toggle should have a locked icon in split details view[/+]ishpaul777 commentedon Aug 14, 2024
Thanks for holding the payment 🙇 , please release payment whenever you get the chance @puneetlath
puneetlath commentedon Aug 14, 2024
Paid!