-
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 copilot bugs #48517
Fix copilot bugs #48517
Conversation
I know this is a draft but wanted to call out two bugs not yet listed in the list in the PR description: |
added them to the list |
@mkhutornyi 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] |
cc: @dangrous |
@dangrous this was fixed in the PR itself. So I've removed it from the list Screen.Recording.2024-09-09.at.02.20.15.mov |
All bugs here fixed - #48517 (comment) cc @mkhutornyi |
@@ -141,7 +142,7 @@ function AccountSwitcher() { | |||
<View style={[styles.flexRow, styles.gap1]}> | |||
<Text | |||
numberOfLines={1} | |||
style={[styles.textBold, styles.textLarge]} | |||
style={[styles.textBold, styles.textLarge, styles.flexShrink1]} |
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.
Can you please link fixed issue per each change (github comment) so I can have context?
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.
@mkhutornyi you can look at the commits for that - https://github.com/Expensify/App/pull/48517/commits
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.
Confirmed fix #48261 on native
unrelated to copilot actually. and being fixed in another issue |
@@ -141,7 +142,7 @@ function AccountSwitcher() { | |||
<View style={[styles.flexRow, styles.gap1]}> | |||
<Text | |||
numberOfLines={1} | |||
style={[styles.textBold, styles.textLarge]} | |||
style={[styles.textBold, styles.textLarge, styles.flexShrink1]} |
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.
Confirmed fix #48261 on native
|
||
if (!subscriptionPlan && isAppLoading) { | ||
return <FullScreenLoadingIndicator />; | ||
} |
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.
Confirmed fix #48246
fix2.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.
@rushatgabhane I still see not here
page for a brief amount of time, is that expected?
Screen.Recording.2024-09-16.at.9.19.42.PM.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.
I don't think it is worth improving this more. The subscription data is simply not in Onyx, so we have to show not found page
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.
this is the conditon now. the most we can do is to show a loader when the app is loading.
if (!subscriptionPlan && isAppLoading) {
return <FullScreenLoadingIndicator />;
}
if (!subscriptionPlan) {
return <NotFoundPage />;
}
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.
Yeah I think that's fine for now
@@ -193,6 +193,10 @@ function AvatarWithImagePicker({ | |||
setError(null, {}); | |||
}, [isFocused]); | |||
|
|||
useEffect(() => { | |||
setError(null, {}); | |||
}, [source, avatarID]); |
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.
Confirmed fix #48252
fix3.mov
@@ -127,6 +127,7 @@ function AccountSwitcher() { | |||
}} | |||
ref={buttonRef} | |||
interactive={canSwitchAccounts} | |||
pressDimmingValue={canSwitchAccounts ? undefined : 1} |
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.
Confirmed fix #48253
fix4.mov
/> | ||
</MenuItemGroup> | ||
{isEmptyObject(currentUserPersonalDetails) || accountID === -1 || !avatarURL ? ( | ||
<AvatarSkeleton size={CONST.AVATAR_SIZE.XLARGE} /> |
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.
confirmed fix #48259
@@ -372,7 +376,7 @@ function AvatarWithImagePicker({ | |||
accessibilityLabel={translate('avatarWithImagePicker.editImage')} | |||
disabled={isAvatarCropModalOpen || (disabled && !enablePreview)} | |||
disabledStyle={disabledStyle} | |||
style={[styles.pRelative, avatarStyle, type === CONST.ICON_TYPE_AVATAR && styles.alignSelfCenter]} | |||
style={[styles.pRelative, avatarStyle]} |
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.
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.
nice catch!
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.
i think i'll just override the avatar style then
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.
@rushatgabhane please let me know when it's 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.
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.
fixed
@rushatgabhane are we going to be able to add the new copilot bugs into this PR as well? I believe you're assigned to all of them currently. Thanks! |
yes will do |
Happens on |
src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Outdated
Show resolved
Hide resolved
….tsx Co-authored-by: Gandalf <[email protected]>
src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Outdated
Show resolved
Hide resolved
….tsx Co-authored-by: Gandalf <[email protected]>
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.
Summary of all the bugs attached to this PR ♻️ :
Fixed:
- [Ready for payment] Account switcher - No spacing between account switcher icon and the status icon #48261
- Avatar - Invalid avatar format error does not disappear after switching account #48252
- Profile - Tapping on "Account name", shows interaction, but no redirection #48253
- Profile - Avatar edit modal can be opened while app is loading #48259
- [$250] Avatar - Avatar position moves after error appears (web), incorrect error position (native) #48244
- Copilot - Selected access level is not highlighted #48965
- Copilot - No message is shown when trying to add the owner as copilot #48967
- [$250] Copilot - "Learn more" link is out of place #48972
Partially Fixed:
Comments from @rushatgabhane :
I don't think it is worth improving this more. The subscription data is simply not in Onyx, so we have to show not found page
I agree with this conclusion! There isn't a way that we know of to get the subscription data from Onyx
This bug is more of a BE
bug, @dangrous you can refer to @rushatgabhane 's comments here.
But the above 2 shouldn't block this PR, this PR looks great and fixes a lot of bugs, had fun reviewing this one 🚀 all yours @dangrous
@dangrous can you delete the checklist from @mkhutornyi here, that is why the checklist workflow is not passing |
Running through this, it's all looking good so far! Commenting here when I find bugs so you might get a couple messages. I noticed that we don't differentiate between errors on the new validate code form. I tried adding a copilot from an unvalidated account, and got a Although now that I'm writing it I'm realizing it might be something we should fix on the backend? Like if the verification code is correct (for all of these new flows), should that count to validate the account? cc @NikkiWines since you wrote the new code on the backend. |
For #48246 I think we might want a fallback for if the delegator account doesn't have a subscription but the delegate does, or vice versa - that is, if you're on the subscription page and swap accounts to a user who doesn't have it. Maybe not found is fine here. |
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.
Fallback icon works for now for #48966, I will look into the back end fix.
Other than those commented bugs, I think we're almost there! Let me know what you think about those, and I agree that we can skip the ones @allgandalf called out
|
||
if (!subscriptionPlan && isAppLoading) { | ||
return <FullScreenLoadingIndicator />; | ||
} |
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.
Yeah I think that's fine for now
you're right. we should fix on backend. We have to return onyx data and then frontend can show that. |
Ready to merge this if you agree with #48517 (comment) - should we leave as is? Or would it be better to navigate from subscription page back to profile page or something? |
we don't have this pattern to fallback to another route. so i think we should do nothing here 👍 |
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.
okay great! BE changes needed as noted to fix the remaining bugs but this gets 99% of them and looks great!
✋ 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/dangrous in version: 9.0.38-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.38-4 🚀
|
Details
Fixed Issues
$ #48261
#48246
#48252
#48253
#48259
#48244
New issues @mkhutornyi -
#48965
#48966
#48967
#48972
PROPOSAL:
Tests
Pre-req: be on copilot beta
Long name
Subscription page
Avatar error
Interactivity
Avatar skeleton
Selected access level
Fallback avatar
Add yourself as copilot
Learn more link
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-09-08.at.21.49.11.mov
Screen.Recording.2024-09-08.at.21.56.05.mov
Screen.Recording.2024-09-08.at.22.32.04.mov
Screen.Recording.2024-09-08.at.22.54.11.mov
#48965 -
#48966 -
#48967 -
#48972 -
MacOS: Desktop