Skip to content

Fix company cards bulk actions menu alignment - #97405

Merged
JS00001 merged 8 commits into
Expensify:mainfrom
KJ21-ENG:KJ21-ENG/97394-company-cards-dropdown-alignment
Aug 6, 2026
Merged

JS00001 merged 8 commits into
Expensify:mainfrom
KJ21-ENG:KJ21-ENG/97394-company-cards-dropdown-alignment

Conversation

@KJ21-ENG

@KJ21-ENG KJ21-ENG commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR now combines the related Company Cards follow-ups requested after #94678.

On wide layouts, the company cards bulk-actions popover now receives a caller-specific left/top anchor. It opens into the company cards content area, matching the nearby Search dropdown, without changing the default alignment of other dropdowns.

On narrow layouts, selection mode now uses the focused layout proposed by Danny: the page shows the Select multiple header, selected-count action, Search, Filters, Display, and the selectable table. The feed selector, Settings action, illustration, and unrelated page header content are hidden until selection mode ends. The selected-count action remains visible and disabled at 0 selected, so selection mode does not lose its only action control.

Pressing Back clears selected rows and exits selection mode. This intentionally does not add a feed-change auto-exit effect. The normal narrow-layout flow cannot change feeds while selection mode is active because the feed selector is hidden. If the feed changes indirectly, the feed-scoped row selection resets while selection mode remains active.

Design direction: #97412 (comment)

Fixed Issues

$ #97394
$ #97411
$ #97412
PROPOSAL: #97394 (comment)

Tests

Wide layout and popover alignment

  1. Open a workspace with a company card feed and at least one card.
  2. Go to Workspace settings > Company cards on a wide layout.
  3. Select an assigned card and open the selected-count dropdown.
  4. Verify the menu opens to the right of the selected-count control, remains inside the company cards content area, and does not cover the workspace navigation.
  5. Close the menu, select an unassigned card, and open the selected-count dropdown again.
  6. Verify the one-action menu has the same alignment and Export as CSV remains available.
  7. While a card remains selected, verify the normal workspace header, feed selector, and Settings action remain visible, while the selected-count action replaces Search, Filters, and Display on the wide layout.
  8. Clear the selection and verify Search, Filters, and Display return.

Narrow selection mode

  1. Open the same Company Cards page on a narrow layout.
  2. Enter selection mode.
  3. Verify the page shows Select multiple, a disabled 0 selected action, Search, Filters, Display, and the selectable table.
  4. Verify the feed selector, Settings action, illustration, and normal company cards headline are hidden.
  5. Select one card and verify the action changes to 1 selected and becomes enabled.
  6. Deselect the card and verify 0 selected remains visible and disabled.
  7. Press Back and verify selected rows are cleared, selection mode ends, and the normal company cards header and controls return.
  8. On a wide layout, verify mobile selection mode does not replace the normal page header.
  • Verify that no errors appear in the JS console

Offline tests

  1. Load Company Cards, then go offline.
  2. Enter narrow-layout selection mode.
  3. Select and deselect a card and verify the selected-count action moves between the enabled selected state and disabled 0 selected state.
  4. Press Back and verify selection mode exits without a new console error.

The focused layout and selection cleanup are client-side. Existing card actions retain their existing offline behavior.

QA Steps

Same as Tests and Offline tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Unchecked items remain pending. Checked conditional items with no matching scope, such as CSS, assets, messaging, and form inputs, indicate that the condition was reviewed and does not apply.

Screenshots/Videos

Android: Native
97412-native-android-smooth-transition.mp4

The final commit still needs a physical-device rerun. No Android device is currently connected to the development machine.

Android: mWeb Chrome
Screen.Recording.2026-08-06.at.3.40.46.AM.mov
iOS: Native
Screen.Recording.2026-08-06.at.1.54.50.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-08-06.at.3.15.18.AM.mov
MacOS: Chrome / Safari

Brave (Chromium) on macOS, using the GitHub-hosted PR build for the popover-alignment change:

Company cards bulk-actions menu aligned inside the content area

The final combined head still needs a manual macOS rerun.

@KJ21-ENG
KJ21-ENG marked this pull request as ready for review July 30, 2026 13:55
@KJ21-ENG
KJ21-ENG requested review from a team as code owners July 30, 2026 13:55
@melvin-bot
melvin-bot Bot requested review from ChavdaSachin and removed request for a team July 30, 2026 13:55
@melvin-bot

melvin-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

@ChavdaSachin 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]

@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and removed request for a team July 30, 2026 13:55
@ChavdaSachin

Copy link
Copy Markdown
Contributor

@KJ21-ENG please include solutions for other blockers here.
So we could wrap it up in a single PR.

@KJ21-ENG

KJ21-ENG commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor Author

@KJ21-ENG please include solutions for other blockers here. So we could wrap it up in a single PR.

@ChavdaSachin Can you please take a look at my these comments to calrify that do we realy need to apply fix for them as a follow-up of this PR #94678 ?

From what I can see here is a very clear pattern that a bunch of things I have reused from the Expensify cards module, and it seems that some of the things are already broken there. That got exposed in this PR. I have no issues with fixing them or following up on this PR, but just thought to clarify this thing here. Thanks!

#97406 (comment)

#97411 (comment)

#97412 (comment)

#97407 (comment)

cc: @JS00001 @ChavdaSachin

@JmillsExpensify JmillsExpensify left a comment

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.

LGTM

@codecov

codecov Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
...ble/TableFilterBar/TableDisplaySettingsTrigger.tsx 95.23% <100.00%> (+0.23%) ⬆️
...yCardsTable/WorkspaceCompanyCardsTableControls.tsx 45.76% <100.00%> (+10.67%) ⬆️
...onents/Tables/WorkspaceCompanyCardsTable/index.tsx 66.19% <100.00%> (ø)
...rkspace/companyCards/WorkspaceCompanyCardsPage.tsx 98.14% <100.00%> (+98.14%) ⬆️
... and 18 files with indirect coverage changes

JS00001
JS00001 previously approved these changes Jul 30, 2026
@JS00001

JS00001 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@ChavdaSachin over to you

@ChavdaSachin

ChavdaSachin commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
Screen.Recording.2026-08-05.at.12.59.47.PM.mov
iOS: mWeb Safari
MacOS: Chrome / Safari Screenshot 2026-08-03 at 11 13 30 PM x`

@KJ21-ENG

KJ21-ENG commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@ChavdaSachin @JS00001, PR #97405 now covers #97394, #97407, #97411, and #97412. #97393 is handled separately in #97396.

@JS00001

JS00001 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@ChavdaSachin please review

@ChavdaSachin

Copy link
Copy Markdown
Contributor

@Expensify/design
I noticed the display drop-down and the search bar are visible on the Expensify cards page when selection is enabled, but are hidden on the Company cards page.
Let us know if it looks expected or needs improvement.

Screenshot 2026-08-03 at 11 16 28 PM Screenshot 2026-08-03 at 11 16 37 PM

@shawnborton

Copy link
Copy Markdown
Contributor

Hmm I suppose the Company Cards version feels more like the Spend page, but the Expensify Card version looks more like other parts of the workspace editor.

I'd probably lean on doing something more like the Spend page for now? And then I would love to follow up and move the create buttons on all tables to be to the right of the Display button - again, the same as Spend. Then we can normalize the bulk action button (maybe do the floating bar idea) from there.

@dannymcclain

Copy link
Copy Markdown
Contributor

Agree with all of those thoughts Shawn 👍

@ChavdaSachin ChavdaSachin left a comment

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.

LGTM! ✅

@melvin-bot
melvin-bot Bot requested a review from JS00001 August 5, 2026 07:35
@JS00001 JS00001 closed this Aug 5, 2026
@JS00001 JS00001 reopened this Aug 5, 2026
@JS00001

JS00001 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@KJ21-ENG please complete the checklist

@KJ21-ENG

KJ21-ENG commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Having some native iOS build-related issue, planning for updating the checklist shortly

@KJ21-ENG

KJ21-ENG commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@JS00001 Done, sorry for the bit of the delay.

@JS00001
JS00001 merged commit e240c2c into Expensify:main Aug 6, 2026
42 of 48 checks passed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@IuliiaHerets

Copy link
Copy Markdown

Hi @KJ21-ENG. Can we skip these steps?

image

cc @JS00001 @JmillsExpensify

@KJ21-ENG

Copy link
Copy Markdown
Contributor Author

@IuliiaHerets Done! , honestly, my bad.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.52-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes required.

I reviewed the changes in this PR against the help site articles under docs/articles and no updates are needed.

Why: The changes are purely presentational/interaction refinements to the Company cards page, not changes to any documented workflow:

  • Wide layout: the bulk-actions dropdown now anchors into the company cards content area (menu alignment only).
  • Narrow layout: selection mode now uses a focused layout (Select multiple header, a disabled 0 selected action, Search/Filters/Display, and the selectable table), hiding the feed selector, Settings action, and illustration until selection mode ends.

None of this alters what a card admin does — assigning/unassigning cards, exporting, configuring feed settings, or reconnecting feeds all behave and read the same. I checked the relevant articles (Assign-Company-Cards.md, Configure-Company-Card-Settings.md, and the rest of connect-credit-cards/) and none document the bulk-selection UI, the "Select multiple" mode, or menu placement — so there's nothing to update.

Because no changes are required, I did not create a draft help site PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.52-11 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

9 participants