-
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
Bank account and Authorized payer buttons displayed instead of Connect bank account #40182
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f9a3198
Bank account and Authorized payer buttons displayed instead of Connec…
ikevin127 042e04a
Merge branch 'main' into fix/39947
ikevin127 61afb5b
fixed infinite loading while offline
ikevin127 0d5b1f2
Merge branch 'main' of https://github.com/Expensify/App into fix/39947
ikevin127 09990eb
Merge branch 'main' of https://github.com/Expensify/App into fix/39947
ikevin127 988e4f8
fixed flow for with BA added
ikevin127 b7c067b
Merge branch 'main' of https://github.com/Expensify/App into fix/39947
ikevin127 31bddf5
adjusted offline mode styles and spacing
ikevin127 f4f6931
fixed type error
ikevin127 84a1c4a
Merge branch 'main' of https://github.com/Expensify/App into fix/39947
ikevin127 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it seems to done quite intentionally even before this PR. that is for the case when there's no optimistic pending action but user is offline.
we can add a check
!policy?.pendingFields?.reimbursementChoice && isOffline
to solve thisThere 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.
Okay, I think we should not have it double-faded so let's definitely solve that
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.
Note
ishpaul777:
I don't think this logic is good since it would break the logic mentioned at (2.) where Connect bank account / Bank account option was and is supposed to be disabled while offline.
shawnborton:
To do this, instead I would use Connect bank account / Bank account option
shouldGreyOutWhenDisabled
to not have the 2nd gray-out fade applied to the option when already applied from "Make or track payments" toggle.Similarly, we have to do the same for the
OfflineWithFeedback
wrapper of Authorized payer option (3.) we add:in order to not double gray-out the Authorized payer if already applied from "Make or track payments" toggle, when Authorized payer is changed while offline. This is how it would look in all scenarios:
^ - Writing it like this is specifically important for the below case, since we don't want to NOT gray out Authorized payer when changed offline (optimistically) in case "Make or track payments" was NOT toggled, by only writing it like:
❌
shouldDisableOpacity={policy?.pendingFields?.reimburser}
since that would NOT gray out the optimistically set Authorized payer, instead we want to gray it out, maintaining the pattern like so:
Please let me know if we're in agreement with the changes mentioned above from a design / code POV.
Once agreed I'll push the changes!
cc @ishpaul777 @shawnborton
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 for detailed investigation @ikevin127, code wise looks good to me 👍