Repository navigation
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…cted-column # Conflicts: # src/CONST/index.ts # src/components/Search/SearchTableHeader.tsx # src/components/Search/SortableTableHeader.tsx # src/components/TransactionItemRow/TransactionItemRowWide.tsx # src/libs/SearchUIUtils.ts # src/styles/utils/index.ts # tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap
|
@ikevin127 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| /> | ||
| </View> | ||
| ), | ||
| [CONST.SEARCH.TABLE_COLUMNS.DECLINED]: ( |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
This new DECLINED cell renders a Yes/No value with <View style={[getSearchColumnStyles(column)]}><Text selectable dataSet={COPYABLE_TEXT_DATA_SET}>{value ? translate('common.yes') : translate('common.no')}</Text></View>, which is the exact structure already implemented by the renderYesNoCell helper in TransactionItemRowWide.tsx (lines 183-195). Duplicating this across the two row components means a future change to the Yes/No cell (styling, copy, clipboard behavior) has to be made in two places and can drift.
Extract the Yes/No cell into a shared component (e.g. SearchList/ListItem/YesNoCell.tsx) and use it from both rows:
[CONST.SEARCH.TABLE_COLUMNS.DECLINED]: (
<YesNoCell
columnName={CONST.SEARCH.TABLE_COLUMNS.DECLINED}
value={!!item.declined}
/>
),and have TransactionItemRowWide.tsx's renderYesNoCell delegate to the same component.
Reviewed at: 73c2826 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
Moved the Yes/No cell into a shared YesNoCell component that both rows use, in 6131f51.
Explanation of Change
Adds an optional Rejected column to Spend > Expenses and Spend > Reports, next to the
declined:filter from #103309. It shows Yes or No like Billable, can be sorted by, and is included in Export > Current view with the same "Rejected" label as the filter.The column key is
declined. When it is shown or sorted by, the backend returns a booleandeclinedon each expense and expense report, and the export adds adeclinedcolumn. That backend change is https://github.com/Expensify/Auth/pull/25720, which is deployed.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/685831
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari