interface icon indicating copy to clipboard operation
interface copied to clipboard

fix: broken CurrencyInputDropdown for mobile devices

Open Jdecristi opened this issue 2 years ago • 6 comments

Description

Fixes #7286

Screen capture

Before After
Screenshot 2023-09-08 at 4 00 54 PM Screenshot 2023-09-08 at 4 18 49 PM

Test plan

  1. Go to https://app.uniswap.org/#/pools
  2. Click on "+ New Position"

Jdecristi avatar Sep 08 '23 20:09 Jdecristi

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2023 9:54pm

vercel[bot] avatar Sep 08 '23 20:09 vercel[bot]

Codecov Report

Merging #7287 (d39df8f) into main (b9db195) will increase coverage by 40.27%. The diff coverage is n/a.

Flag Coverage Δ
cloud-tests 82.75% <ø> (ø)
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Sep 13 '23 21:09 codecov[bot]

@JFrankfurt @natew is this an issue? What is the fix for code coverage decreases?

Jdecristi avatar Sep 13 '23 22:09 Jdecristi

Since it's a single character copy change you don't need to worry about it. Technically you could probably address that with a unit test that asserts text content or does a snapshot test on the component fragment.

JFrankfurt avatar Sep 13 '23 22:09 JFrankfurt

@JFrankfurt @natew I wrote a test checking for Select Token. This should satisfy code coverage requirements.

Jdecristi avatar Sep 15 '23 23:09 Jdecristi

I suggest you use media queries to reduce the font-size for mobile devices; otherwise, the current font-size will still appear broken text on smaller screen devices like the iPhone SE.

you can change the StyledTokenName code like this:

const StyledTokenName = styled.span<{ active?: boolean }>`
  ${({ active }) => (active ? '  margin: 0 0.25rem 0 0.25rem;' : '  margin: 0 0.25rem 0 0.25rem;')}
  font-size: 20px;

  @media only screen and (max-width: ${BREAKPOINTS.md}px)
    font-size: 16px;
  }
`

linxuanweb avatar Sep 19 '23 11:09 linxuanweb