Page MenuHomePhabricator

[cashtab] Mobile style fixes
ClosedPublic

Authored by johnkuney on Sat, Apr 26, 12:27.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCfd87bb794a07: [cashtab] Mobile style fixes
Summary

Fixing some display issues on smaller screens on the transaction rows

Test Plan

Preview the site and check transactions, especially token info and messages, look good on small screens

after

before_.png (1×1 px, 224 KB)

before

after_.png (1×1 px, 211 KB)

Things to note:
Losing the tx icon and token image/icon at very small screens to allow other content to fit nicer
margins and padding tightened up

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-mobile-tx-row-style-fixes
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33139
Build 65761: Build Diffcashtab-tests
Build 65760: arc lint + arc unit

Event Timeline

johnkuney edited the test plan for this revision. (Show Details)
bytesofman added a subscriber: bytesofman.
bytesofman added inline comments.
cashtab/src/components/Home/Tx/styled.ts
264–266 ↗(On Diff #53709)

I don't think we can just lose these -- the issue is a cashtab msg can include, say, a txid or an ecash address, and without break-all this just bonks the whole display

303 ↗(On Diff #53709)

is 500px where we start to see issues?

would be nice to not lose the icons, they do distinguish between a wide range of tx types.

can we just make them smaller?

This revision now requires changes to proceed.Sat, Apr 26, 13:41
johnkuney edited the test plan for this revision. (Show Details)

use stadard breakpoint, get icons back and line breaks back. Make icons much smaller and stack where needed

bytesofman added inline comments.
cashtab/src/components/Home/Tx/styled.ts
231 ↗(On Diff #53711)

can we really lose this?

none of these break-alls appeared spontaneously; it's always something that is added bc there is some hideous css bug where a long string overflows the whole screen

This revision now requires changes to proceed.Sun, Apr 27, 13:21

airdrops not flexing well

image.png (636×864 px, 155 KB)

image.png (768×864 px, 303 KB)

even on desktop:

image.png (276×1 px, 40 KB)

we should not need a whole new line just for the ticker

This revision now requires changes to proceed.Sun, Apr 27, 22:23

without break-all (current diff)

image.png (295×316 px, 19 KB)

with break-all

image.png (295×316 px, 20 KB)

with break-all is pretty awful. but we need break-all bc token names can be very long, which would mess everything up.

  • get rid of break-all for the columns that do not take "could be anything" user input
  • for the column with token name, cut it off with ellipsis instead of breaking
This revision now requires changes to proceed.Mon, Apr 28, 21:38

match styles with no token airdrop case

need to comprehensively handle the token name / ticker break-all issue

This revision now requires changes to proceed.Mon, Apr 28, 21:44

dont word break on less than 10 length name or tickers, but do always word break in the amount column since it could be a big number

bytesofman added inline comments.
cashtab/src/components/Home/Tx/index.tsx
728 ↗(On Diff #53740)

++ linking break-all to the length of the "problem" string

image.png (179×311 px, 9 KB)

need to implement here (i.e. the right-most column in this screenshot) so we aren't cutting off shorter tickers when there is plenty of room to break normally

This revision now requires changes to proceed.Tue, Apr 29, 13:28

dont word break last column on short names

alt approach would be to have a function prepareWrappedString that takes a string and maxChars as params, and returns the string truncated to maxChars

e.g. prepareWrappedString(tokenTickerThatIsTooLong, 10) = "tokenTi..." (keeps it to 10 chars max including the ellipsis)

bytesofman added inline comments.
cashtab/src/components/Home/Tx/styled.ts
327 ↗(On Diff #53740)

we can't just "not word break" here, bc the token name / ticker could be very long and require word break

This revision now requires changes to proceed.Tue, Apr 29, 15:08

alt approach would be to have a function prepareWrappedString that takes a string and maxChars as params, and returns the string truncated to maxChars

e.g. prepareWrappedString(tokenTickerThatIsTooLong, 10) = "tokenTi..." (keeps it to 10 chars max including the ellipsis)

Sure thats a good idea, but maybe out of scope for this diff. Can add it next. Main goal here is to patch the mobile issues that were reported

johnkuney requested review of this revision.EditedTue, Apr 29, 15:31

Re: the changes requested. It still has the word break applied if the name is long
That rule was added to always word break that column in case of a long number amount

This revision is now accepted and ready to land.Tue, Apr 29, 16:23
This revision was landed with ongoing or failed builds.Tue, Apr 29, 16:47
This revision was automatically updated to reflect the committed changes.