-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 display of undefined on card name after page refresh #52301
fix display of undefined on card name after page refresh #52301
Conversation
@DylanDylann 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] |
@DylanDylann I've updated it. Sorry for missing that. |
@@ -45,7 +45,7 @@ function WorkspaceCompanyCardsSettingsPage({ | |||
const isPersonal = liabilityType === CONST.COMPANY_CARDS.DELETE_TRANSACTIONS.ALLOW; | |||
|
|||
const navigateToChangeFeedName = () => { | |||
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_FEED_NAME.getRoute(policyID)); | |||
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_FEED_NAME.getRoute(policyID, feedName)); |
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.
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_FEED_NAME.getRoute(policyID, feedName)); | |
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_FEED_NAME.getRoute(policyID, selectedFeed)); |
src/libs/Navigation/types.ts
Outdated
@@ -854,7 +854,7 @@ type SettingsNavigatorParamList = { | |||
}; | |||
[SCREENS.WORKSPACE.COMPANY_CARDS_SETTINGS_FEED_NAME]: { | |||
policyID: string; | |||
currentFeedName?: string; | |||
feedName?: string; |
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.
feedName?: string; | |
selectedFeed: string; |
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.
Please update in other places
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.
@DylanDylann We can't use selectedFeed
because it will make things more complex. If you want to use selectedFeed
, we must also send the cardFeeds
object in the parameters.
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.
If we use selectedFeed without passing the cardFeeds object, we encounter an issue like the video below because cardFeeds is retrieved from Onyx.
VIDEO
Screen.Recording.2024-11-11.at.15.30.07.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.
In src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsFeedNamePage.tsx, we can get cardFeed from Onyx, right?
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.
small note: Never give a video without any description and say it is a bug like in the video. When elaborating on a bug please say detailed steps, actual behavior, and expected behavior or at least a description to other people can understand that you want to say
we encounter an issue like the video below because cardFeeds is retrieved from Onyx.
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.
Are you aware of this, and if so, do you have any suggestions for handling it?
It seems I handled it in my ref branch. Did you check it? Or is there any problem?
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.
we won’t need to set additional parameters.
Also fine, if that we need to handle loading indicator if lastSelectedFeed isn't loaded
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.
Got it. Will update. thank you
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 test this case on your branch?
@huult It worked. Is there any problem?
Screen.Recording.2024-11-12.at.12.06.11.mov
@huult Also please update your videos |
Please add one more step to verify the route display the correct selected feed when clicking on Card feed name |
@DylanDylann I added that to step 6. |
Could you try this approach if it works well we don't need to add param anymore |
@DylanDylann We are able to use the loading indicator, which is my alternative solution that I just updated. I also updated the attachment step and code. Can you review it again? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-12.at.14.36.42.movAndroid: mWeb ChromeScreen.Recording.2024-11-12.at.14.34.55.moviOS: NativeScreen.Recording.2024-11-12.at.14.38.11.moviOS: mWeb SafariScreen.Recording.2024-11-12.at.14.37.30.movMacOS: Chrome / SafariScreen.Recording.2024-11-12.at.14.31.27.movMacOS: DesktopScreen.Recording.2024-11-12.at.14.37.05.mov |
✋ 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/carlosmiceli in version: 9.0.61-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.61-3 🚀
|
Details
Fixed Issues
$ #52140
PROPOSAL: #52140 (comment)
Tests
Same QA step
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)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
Screen.Recording.2024-11-12.at.12.34.51.mp4
Android: mWeb Chrome
Screen.Recording.2024-11-12.at.12.35.49.mp4
iOS: Native
Screen.Recording.2024-11-12.at.12.37.54.mp4
iOS: mWeb Safari
Screen.Recording.2024-11-12.at.12.39.05.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-11-12.at.12.29.45.mp4
MacOS: Desktop
Screen.Recording.2024-11-12.at.12.32.00.mp4