Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/5133/update borders #5147

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Fix/5133/update borders #5147

merged 1 commit into from
Apr 5, 2024

Conversation

pete-watters
Copy link
Contributor

@pete-watters pete-watters commented Mar 29, 2024

Try out Leather build 5dffaf7Extension build, Test report, Storybook, Chromatic

This PR:

  • adds borders to the <Page component so all pages have the required border
  • refactors some other cards to deprecate <InfoCardFooter and standardise UI
  • adds a fix for the BG location of the send ordinal flow dialog

@pete-watters pete-watters linked an issue Mar 29, 2024 that may be closed by this pull request
@pete-watters pete-watters force-pushed the fix/5133/update-borders branch 2 times, most recently from 7beb029 to 105e8c4 Compare April 2, 2024 12:02
@pete-watters pete-watters marked this pull request as ready for review April 2, 2024 12:03
@pete-watters pete-watters marked this pull request as draft April 2, 2024 12:05
@pete-watters pete-watters force-pushed the fix/5133/update-borders branch 2 times, most recently from acfe284 to cac129c Compare April 3, 2024 07:36
@pete-watters pete-watters requested review from fbwoolf, alter-eggo and kyranjamie and removed request for fbwoolf April 3, 2024 07:40
@pete-watters pete-watters marked this pull request as ready for review April 3, 2024 07:40
@pete-watters pete-watters force-pushed the fix/5133/update-borders branch from cac129c to e7c2085 Compare April 3, 2024 07:41
</Footer>
}
>
<CardContent p={0}>
Copy link
Contributor

Choose a reason for hiding this comment

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

"space.00"?

Copy link
Contributor

@fbwoolf fbwoolf left a comment

Choose a reason for hiding this comment

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

Might be worth revisiting the card stories? I'm not sure what the footer variant="card" means?

@pete-watters
Copy link
Contributor Author

Might be worth revisiting the card stories? I'm not sure what the footer variant="card" means?

You're right, I will update the stories and add better documentation to make it clearer.

Footer variant='card' is used when the <Footer needs to be used inside of a Card.

   <Card
      ...
        footer={
          <Footer variant="card">
            <Button
              Continue
            </Button>
          </Footer>
        }
      >

In those cases it needs to be positioned differently based on the browser width:

export function Footer({ children, variant = 'page', flexDirection = 'column' }: FooterProps) {
  return (
    <styled.footer
     ....
      maxWidth={variant === 'card' ? 'pageWidth' : '100%'}
      position={variant === 'card' ? ' absolute' : 'fixed'}
      ...
      bg={variant === 'page' ? 'ink.background-primary' : undefined}
      borderTop={variant === 'page' ? ' default' : 'none'}
    >
    ...
    </styled.footer>
  );
}

The only other footer variant is page which it defaults to. I can update it so that page is set explicitly elsewhere?

The concept is that sometimes we have a <Page container with a footer and other times we have a <Card which is sometimes nested in a page.

Here is an example of what it's doing on the Swap page:

Area.mp4

@pete-watters pete-watters force-pushed the fix/5133/update-borders branch 4 times, most recently from c10e9d0 to b64cae8 Compare April 5, 2024 13:20
@pete-watters pete-watters force-pushed the fix/5133/update-borders branch from b64cae8 to 5dffaf7 Compare April 5, 2024 13:20
@pete-watters
Copy link
Contributor Author

@fbwoolf - I had to switch from working on this to fixing another bug I had introduced.

I was going to update storybook in here but decided to take that into a different branch and merge this first. The storybook update branch is - fix/5133/update-container-storybook, which I pushed it just in case. I'll clean up all the stories for containers and make it easier to understand how I have set things up.

@pete-watters pete-watters added this pull request to the merge queue Apr 5, 2024
Merged via the queue into dev with commit b6864cd Apr 5, 2024
28 checks passed
@pete-watters pete-watters deleted the fix/5133/update-borders branch April 5, 2024 13:35
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.

Ensure all narrow content views in fullpage views have border
2 participants