Skip to content

Update the policy taxes table to the new style#94208

Open
luacmartins wants to merge 4 commits into
mainfrom
cmartins-taxTable
Open

Update the policy taxes table to the new style#94208
luacmartins wants to merge 4 commits into
mainfrom
cmartins-taxTable

Conversation

@luacmartins

@luacmartins luacmartins commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Migrate the policy taxes page to the shared Table component.

Fixed Issues

$ #86208

Tests

  1. Open a workspace Taxes page with tax rates configured
  2. Confirm name, rate value/default label, and enabled switch render
  3. Tap a row → tax edit page opens
  4. Select multiple rates and confirm bulk delete/enable/disable still work
  5. With 12+ rates, confirm search and sorting work
  6. Confirm Add rate, Settings, and accounting import banner still work
  • Verify that no errors appear in the JS console
Screen.Recording.2026-06-22.at.3.28.54.PM.mov
Screenshot 2026-06-22 at 3 26 37 PM

Offline tests

N/A

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

Extract taxes table row and table wrapper using the shared Table component pattern.
Replace SelectionListWithModal with the shared Table component while preserving bulk actions, search, and row interactions.
@luacmartins luacmartins requested review from a team as code owners June 22, 2026 18:38
@melvin-bot melvin-bot Bot requested review from Krishna2323, joekaufmanexpensify and situchan and removed request for a team June 22, 2026 18:38
@melvin-bot

melvin-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

@Krishna2323 @situchan One of you needs to 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]

@melvin-bot melvin-bot Bot removed the request for review from a team June 22, 2026 18:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 683227a349

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
src/CONST/index.ts 93.84% <ø> (ø)
src/components/Table/TableRow.tsx 78.78% <0.00%> (-2.47%) ⬇️
src/components/Table/middlewares/selection.ts 53.22% <0.00%> (-1.78%) ⬇️
...les/WorkspaceTaxesTable/WorkspaceTaxesTableRow.tsx 0.00% <0.00%> (ø)
src/pages/workspace/taxes/WorkspaceTaxesPage.tsx 0.00% <0.00%> (ø)
...rc/components/Tables/WorkspaceTaxesTable/index.tsx 0.00% <0.00%> (ø)
... and 36 files with indirect coverage changes

@luacmartins luacmartins marked this pull request as draft June 22, 2026 19:30
@luacmartins

Copy link
Copy Markdown
Contributor Author

This is not ready for review yet

Skip mobile row-tap selection when item.disabled is true, matching checkbox behavior and preserving the default tax rate guard.
@luacmartins luacmartins marked this pull request as ready for review June 22, 2026 21:29
@luacmartins

Copy link
Copy Markdown
Contributor Author

Ready for review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e4629165c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/components/Tables/WorkspaceTaxesTable/WorkspaceTaxesTableRow.tsx Outdated
@Krishna2323

Krishna2323 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
  • When items are removed from the list optimistically, the last item does not show the bottom border radius.
image
  • Search input focus is lost when using the toggle
input_focus_lost.mp4
  • Select cursor is shown instead of disabled cursor when no items can be selected
cursor_select_shown.mp4

return Object.entries(policy.taxRates?.taxes ?? {}).map(([key, value]) => {
const canEditTaxRate = canWriteTaxes && policy && canEditTaxRatePolicyUtils(policy, key);
const canEditTaxRate = canWriteTaxes && canEditTaxRatePolicyUtils(policy, key);
const isDeleting = value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just filter out the pending-delete items in online mode, similar to how the Categories page does it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants