You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Table headers are misaligned when external mouse is connected #41693
Version Number: Reproducible in staging?: Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Slack conversation:
Action Performed:
Coming from this comment, table headers are misaligned with the table content when an external mouse is connected:
[large screens only] Connect an external mouse to your computer
Navigate to the Search page Profile > Troubleshoot > New search page
Note that the table header and table content are misaligned
Note: this also happens in other views, e.g. Workspace categories, tags, etc
Expected Result:
Table header should be aligned with content
Actual Result:
Table header is not aligned with content
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
On browsers, hte items list from SelectionList will add an extra element to the right, the scroll bar. This is not part of the browser, it's added only to the list and not the header.
So this will move the elements list a bit to the left, and this will cause unconsistency between the header (no scroll bar) and the list (new scroll bar on the right)
As you see on the image, the red zone, the scroll bar, will decrease the space for the blue item list, and because w are using flex1 to fill the space, the position will not be the same as on the header.
What changes do you think we should make in order to solve the problem?
changed the title [-]Table headers are misaligned when external mouse is connected[/-][+][$250] Table headers are misaligned when external mouse is connected[/+]on May 7, 2024
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon May 6, 2024
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.bernhardoj commentedon May 7, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The list header is misaligned when a scrollbar is added to the list.
What is the root cause of that problem?
The header isn't part of the list component, so when the list width is reduced because of the scrollbar, the header becomes misaligned.
What changes do you think we should make in order to solve the problem?
Wrap the header with a view and set the max width to the list width or 100%.
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 570 to 597 in 84118d8
<View style={{maxWidth: listWidth || '100%'}}We get the listWidth (state) from the section list onLayout.
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 385 to 387 in 84118d8
dragnoir commentedon May 7, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Table headers are misaligned when external mouse is connected
What is the root cause of that problem?
The Search page use a component for the header => SearchTableHeader
and another for the content.
App/src/components/Search.tsx
Lines 63 to 64 in 935efd9
On browsers, hte items list from
SelectionListwill add an extra element to the right, the scroll bar. This is not part of the browser, it's added only to the list and not the header.So this will move the elements list a bit to the left, and this will cause unconsistency between the header (no scroll bar) and the list (new scroll bar on the right)
As you see on the image, the red zone, the scroll bar, will decrease the space for the blue item list, and because w are using flex1 to fill the space, the position will not be the same as on the header.
What changes do you think we should make in order to solve the problem?
Add ScrollView as a container for the Search page
POC:
With no mouse:

With mouse
What alternative solutions did you explore? (Optional)
We can also remove the scroll bar with
showScrollIndicator={false}<SelectionList customListHeader={<SearchTableHeader shouldShowMerchant={shouldShowMerchant} />} ListItem={ListItem} sections={[{data, isDisabled: false}]} onSelectRow={(item) => { openReport(item.transactionThreadReportID); }} shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()} listHeaderWrapperStyle={[styles.ph9, styles.pv3, styles.pb5]} containerStyle={[styles.pv0]} + showScrollIndicator={false} /> + </ScrollView>melvin-bot commentedon May 7, 2024
Current assignee @CortneyOfstad is eligible for the Bug assigner, not assigning anyone new.
[-]Table headers are misaligned when external mouse is connected[/-][+][$250] Table headers are misaligned when external mouse is connected[/+]melvin-bot commentedon May 7, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01352e7296a9a4fe1c
12 remaining items
CortneyOfstad commentedon May 15, 2024
PR was deployed to staging 8 hours ago 🎉
CortneyOfstad commentedon May 20, 2024
We're in a merge freeze until Wednesday so being pushed to production will take some time 👍
CortneyOfstad commentedon May 22, 2024
Merge freeze is planned to end today 🤞
luacmartins commentedon May 22, 2024
Here's the latest on the merge freeze. I don't think it'll end today.
ahmedGaber93 commentedon May 31, 2024
@CortneyOfstad this issue is ready for payment. It deployed to production 23-5-2024 #41986 (comment)
melvin-bot commentedon Jun 3, 2024
This issue has not been updated in over 15 days. @CortneyOfstad, @dragnoir, @luacmartins, @ahmedGaber93 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
CortneyOfstad commentedon Jun 10, 2024
Sorry about that @ahmedGaber93! I'm not sure why the
awaiting paymentlabel was not automatically applied, but getting this sorted now!CortneyOfstad commentedon Jun 10, 2024
@ahmedGaber93 you have been paid, so you are all set!
@dragnoir — I sent you an offer in Upwork! Please let me know once you accept and I'll get that paid ASAP. Thanks!
CortneyOfstad commentedon Jun 10, 2024
Payment Summary
@ahmedGaber93 — paid $250 via Upwork
@dragnoir — paid $250 via Upwork