App: [HOLD for payment 2024-03-13] Incorrect spacing and border radius on receipt thumbnail


DESIGN UPDATES


So this is what I’m thinking we should do for the preview cards. As an outline, here is what we have (Figma file so you can inspect): CleanShot 2024-01-05 at 11 05 44@2x

I’m thinking of this preview component as two parts:

  • upper receipt area
  • lower information area

CleanShot 2024-01-05 at 11 09 43@2x

When a receipt is present, I have it so that the upper receipt area and the lower info area overlap by -4px, which basically accounts for that inner border stroke (4px) of the receipt area not adding to the height of the lower info area. CleanShot 2024-01-05 at 11 06 45@2x

The upper receipt area has a border radius of 16px: CleanShot 2024-01-05 at 11 11 13@2x

And that means the inner receipt area there has a border radius of 12px (16px minus the 4px border): CleanShot 2024-01-05 at 11 11 49@2x

For the bottom info area, the whole thing has a padding of 16px (vertically and horizontally): CleanShot 2024-01-05 at 11 12 16@2x

The eyebrow part (XXXX owes:) should use our label font size, with a line height of 16px. It’s in our text supporting color. CleanShot 2024-01-05 at 11 12 47@2x

The amount is good as it is, which is our h2 size. The merchant/description line below should use our normal text size and use our text supporting color. It should have a line height of 20px.

In terms of spacing, I’m thinking it goes:

  • Eyebrow/top line
  • 8px gap
  • Amount
  • 4px gap
  • Merchant/description
  • 16px gap
  • Button

CleanShot 2024-01-05 at 11 19 54@2x


ORIGINAL ISSUE


If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.22-4 Reproducible in staging?: y Reproducible in production?: y 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: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1704274831152639

Action Performed:

Create a receipt request in a workspace

Expected Result:

The receipt image in the request preview should have a border radius that is exactly 4px less than the outer border radius of the request preview card

Actual Result:

It looks like the receipt has the same border radius as the outer preview card.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Screen Shot 2024-01-04 at 1 56 02 PM

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0175c678ba62df22b2
  • Upwork Job ID: 1743007697809223680
  • Last Price Increase: 2024-01-04
Issue OwnerCurrent Issue Owner: @grgia

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 46 (33 by maintainers)

Most upvoted comments

Sweet, thanks for clearing that up! Also cc @dubielzyk-expensify since you are working on the preview component, this logic should help guide the designs!

@shawnborton fantastic write up! I should be able to get to this one this week

sorry I thought I accepted offer. Just did now

No regression. This is design inconsistency fix. I don’t think regression test is needed here.

Updating PR now

PR in progress!

We’ve basically been calling it the “Preview” component (cc @Expensify/design). But it might better be called the “Expense & Report Preview” component since it is used for both expenses AND reports.

The way I see it is basically this:

  • Expense & Preview component
    • Receipt Thumbnail area (only show if thumbnails present)
      • If report: show multiple thumbnails and pagination
      • If expense: only show one thumbnail
    • Eye brow line
      • If report: show “X owes:”
      • If expense: show expense type (Cash, Card, etc)
    • Amount
      • Both report & expense: if paid, show checkmark
      • If split preview, show avatar group “floating” to the right side of this line
    • Merchant/description line
      • If report: I’m not sure what the logic is for the naming here, but sometimes we do something like “4 requests” or “1 request, 1 scanning.” @trjExpensify might know the logic here
      • If expense: Show merchant if one exists, if not, show description
      • If split preview, show price per person “floating” to the right side of this line

And I think that basically covers it?

@dannymcclain totally! I put the Figma link at the very beginning of my comment here

So this is what I’m thinking we should do for the preview cards. As an outline, here is what we have (Figma file so you can inspect): CleanShot 2024-01-05 at 11 05 44@2x

I’m thinking of this preview component as two parts:

  • upper receipt area
  • lower information area

CleanShot 2024-01-05 at 11 09 43@2x

When a receipt is present, I have it so that the upper receipt area and the lower info area overlap by -4px, which basically accounts for that inner border stroke (4px) of the receipt area not adding to the height of the lower info area. CleanShot 2024-01-05 at 11 06 45@2x

The upper receipt area has a border radius of 16px: CleanShot 2024-01-05 at 11 11 13@2x

And that means the inner receipt area there has a border radius of 12px (16px minus the 4px border): CleanShot 2024-01-05 at 11 11 49@2x

For the bottom info area, the whole thing has a padding of 16px (vertically and horizontally): CleanShot 2024-01-05 at 11 12 16@2x

The eyebrow part (XXXX owes:) should use our label font size, with a line height of 16px. It’s in our text supporting color. CleanShot 2024-01-05 at 11 12 47@2x

The amount is good as it is, which is our h2 size. The merchant/description line below should use our normal text size and use our text supporting color. It should have a line height of 20px.

In terms of spacing, I’m thinking it goes:

  • Eyebrow/top line
  • 8px gap
  • Amount
  • 4px gap
  • Merchant/description
  • 16px gap
  • Button

CleanShot 2024-01-05 at 11 19 54@2x

Let me know how all of that sounds! cc @Expensify/design for eyes too.