-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-12-30] [$500] [Search v2.2] Add support for all reportAction types in ChatListItem #51296
Comments
Triggered auto assignment to @stephanieelliott ( |
Job added to Upwork: https://www.upwork.com/jobs/~021848820450401382223 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
No volunteer yet. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@luacmartins, @stephanieelliott, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Still no proposals. Gonna bump the payout on this one. |
Upwork job price has been updated to $500 |
@luacmartins, @stephanieelliott, @abdulrahuman5196 Still overdue 6 days?! Let's take care of this! |
Edited by proposal-police: This proposal was edited at 2024-11-05 07:23:42 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add support for all reportAction types in ChatListItem What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?
chatSelectionListPressableItemWrapper: {
paddingHorizontal: 16,
paddingVertical: 16,
marginHorizontal: 20,
backgroundColor: theme.highlightBG,
borderRadius: 8,
minHeight: variables.optionRowHeight,
},
we need to add reportActionID which we will use later to get the reportAction from Onyx Here's the code: const styles = useThemeStyles();
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${item.reportID}`);
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${item.reportID}`);
const reportAction = Object.values(reportActions ?? {})?.find((reportAction) => {
return reportAction.reportActionID === item.reportActionID;
});
const [parentReportAction] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.parentReportID || -1}`, {
canEvict: false,
selector: (parentReportActions) => getParentReportAction(parentReportActions, report?.parentReportActionID ?? ''),
});
if (!reportAction) {
return null;
}
<BaseListItem
item={item}
pressableStyle={[[styles.chatSelectionListPressableItemWrapper, styles.ph0, styles.pv2, styles.textAlignLeft, item.isSelected && styles.activeComponentBG, item.cursorStyle]]}
wrapperStyle={[styles.userSelectNone]}
containerStyle={styles.mb2}
isFocused={isFocused}
isDisabled={isDisabled}
showTooltip={showTooltip}
canSelectMultiple={canSelectMultiple}
onLongPressRow={onLongPressRow}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
errors={item.errors}
pendingAction={item.pendingAction}
keyForList={item.keyForList}
onFocus={onFocus}
shouldSyncFocus={shouldSyncFocus}
hoverStyle={item.isSelected && styles.activeComponentBG}
>
{() => (
<ReportActionItem
action={reportAction}
report={report}
onPress={() => onSelectRow(item)}
parentReportAction={parentReportAction}
displayAsGroup={false}
wrapperStyle={[styles.pl4, styles.pr4]}
isMostRecentIOUReportAction={false}
shouldDisplayNewMarker={false}
shouldShowSubscriptAvatar={false}
isFirstVisibleReportAction={false}
index={index}
hideThreadReplies={true}
shouldDisplayContextMenu={false}
preventDefaultContextMenu={false}
/>
)}
</BaseListItem> The rest of the changes can be found in this test branch ResultScreen.Recording.2024-11-04.at.23.59.38.movWhat alternative solutions did you explore? (Optional) |
@NJ-2020 thanks for the proposal. I think we need to adjust it a bit, since search data is only available within |
Still looking for proposals |
@luacmartins @allgandalf Thanks The first part of the PRs has been created. No specific test required, just ensure that the report action item functions correctly as usual. |
PR is still under review, conversation is going on there: #52948 |
Part 1 was merged, @wildan-m when should we expect the part 2 ? |
@allgandalf yes. working on it |
@luacmartins In case you've missed my questions in this PR draft. |
Sorry @wildan-m I was pretty busy with a HybridApp fire for the past couple of days. Replied. |
@wildan-m BE PR that adds |
@wildan-m when can the PR be ready for a review ? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-12-30. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@allgandalf sorry, the new es lint rules will change so many files for our case. need more time to create other two PRs If that new rule not need to be applied, I thinks this PR draft already completed |
I feel we should ignore the changed files eslint rule for this issue, and deal with it in a new PR, this issue is already critical |
Please fix other failing tests and we should be ready to go here |
@allgandalf @luacmartins have you encountered this kind of error before? https://github.com/Expensify/App/actions/runs/12478857357/job/34827066582?pr=54228 ● Test suite failed to run
@rnmapbox/maps native code not available. Make sure you have linked the library and rebuild your app. See https://rnmapbox.github.io/docs/install?rebuild=expo#rebuild
1 | import {useFocusEffect, useNavigation} from '@react-navigation/native';
2 | import type {MapState} from '@rnmapbox/maps';
> 3 | import Mapbox, {MarkerView, setAccessToken} from '@rnmapbox/maps';
| ^
4 | import {forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react';
5 | import {View} from 'react-native';
6 | import {useOnyx} from 'react-native-onyx';
The error comes after putting |
@allgandalf @luacmartins if we don't need to handle the lint rule related to default id, then the second PR is ready for review #54228 |
jest.mock('@src/components/ConfirmedRoute.tsx'); The above mock is to resolve jest map error mentioned here #51296 (comment) |
Problem
Right now, the search results for chats only shows
ADDCOMMENT
actions. However, we want to support all reportAction types in search.Solution
Refactor ReportActionItem.tsx to be a pure component and receive all props it needs instead of connecting directly to Onyx, then use
ReportActionItem
in ChatListItem to render other reportAction types.Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @stephanieelliottThe text was updated successfully, but these errors were encountered: