-
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
[No QA][Search v1] TransactionListItem and SearchTableHeader #41102
[No QA][Search v1] TransactionListItem and SearchTableHeader #41102
Conversation
src/types/onyx/SearchResults.ts
Outdated
from: {displayName: string; avatarURL: string}; | ||
to: {displayName: string; avatarURL: 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.
Just noting that this changed in the doc. We're now passing accountID
(from) and managerID
(to), so we'll have to get this information from the personalDetailsList
returned in the snapshot_<hash>.data.personalDetailsList
Onyx key
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.
Looking good! Left a small suggestion so far. The API should be deployed to production today, so we might have real data to work with soon.
function shouldShowMerchantColumn(transactions: Transaction[]) { | ||
return transactions.some((transaction) => isExpenseReport(allReports?.[transaction.reportID] ?? {})); | ||
} | ||
|
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 might be better suited for the SearchUtils file
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.
and its currently unused so I will ask @WojtekBoman if when we want to start using it and is it needed?
numberOfLines={1} | ||
style={[styles.flex1, styles.flexGrow1, styles.textStrong]} | ||
> | ||
{personalDetails[item.managerID]?.displayName} |
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.
From
should be item.accountID
{personalDetails[item.managerID]?.displayName} | |
{personalDetails[item.accountID]?.displayName} |
numberOfLines={1} | ||
style={[styles.flex1, styles.flexGrow1, styles.textStrong]} | ||
> | ||
{personalDetails[item.accountID]?.displayName} |
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.
To
is the managerID
{personalDetails[item.accountID]?.displayName} | |
{personalDetails[item.managerID]?.displayName} |
src/components/Search.tsx
Outdated
ListItem={ListItem} | ||
sections={[{data: mockData, isDisabled: false}]} | ||
onSelectRow={(item) => { | ||
openReport(item.reportID); |
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.
openReport(item.reportID); | |
openReport(item.transactionThreadReportID); |
Fixed 3 small comments from @luacmartins |
@luacmartins I think there might be some confusion on our end in how the api is supposed to work and return data (or perhaps I misunderstand how Onyx is consuming the data)
|
e8161c7
to
596c997
Compare
|
@dukenv0307 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] |
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.
SWM is going ooo due to bank holidays in Poland for the rest of the week and given how this is part of a May 1st release and this functionality is still not available to users, I'm gonna merge the PR as is and will continue working on it myself, so we can keep pushing it during the rest of the week.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ 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/luacmartins in version: 1.4.69-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.69-2 🚀
|
<View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsStretch]}> | ||
<TextWithTooltip | ||
shouldShowTooltip={showTooltip} | ||
text={item?.tag ?? ''} |
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.
A colon :
in a tag name will be escaped to \:
. We need to unescape them before showing the tag name. This is fixed in #43392
Details
Fixed Issues
$ #39876
$ #39877
$ #39880
PROPOSAL:
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop