Skip to content

Update fee card designs to show savings and MM fee#9629

Merged
danjm merged 7 commits intodevelopfrom
update-fee-card-designs
Nov 13, 2020
Merged

Update fee card designs to show savings and MM fee#9629
danjm merged 7 commits intodevelopfrom
update-fee-card-designs

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Oct 19, 2020

Updates the fee card on the view quote screen to match the latest designs.

Edit: screenshots can be seen in this comment #9629 (comment)

This is blocked by #9611

The UI implemented in this PR can stand on its own, but to fully match latest designs, it needs to be combined with #9612

One final missing piece for latest designs is the info tooltip next to savings, which will be implemented in a forthcoming PR

@danjm danjm requested a review from a team as a code owner October 19, 2020 12:20
@danjm danjm requested a review from whymarrh October 19, 2020 12:20
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@danjm danjm force-pushed the update-fee-card-designs branch from f6ed32e to d1c40db Compare October 19, 2020 12:32
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [d1c40db]
Page Load Metrics (434 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30111542512
domContentLoaded30672343211555
load30772443411555
domInteractive30672243211555

@danjm danjm force-pushed the update-fee-card-designs branch from d1c40db to 0a02cbf Compare October 19, 2020 13:06
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0a02cbf]
Page Load Metrics (772 ± 140 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaintNaNNaNNaNNaNNaN
domContentLoaded3891357769292140
load3911359772292140
domInteractive3881357769292140

@darkwing
Copy link
Copy Markdown
Contributor

This looks awesome! Quick question -- do we want to synchronize these two percentages? 1% is a bit more than 0.875:

PercentageDifference

@danjm danjm force-pushed the update-fee-card-designs branch from 0a02cbf to 0a1755d Compare October 20, 2020 16:29
@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Oct 20, 2020

@brad-decker This has been rebased and your comments have been addressed

brad-decker
brad-decker previously approved these changes Oct 20, 2020
Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

Changes LGTM. I would point out that there is a larger problem in our codebase as a whole about the proper use of HTML tags to match the intent. It wasn't introduced in this PR and progress has been made on some lines of change requests during the review. However, a concerted effort to fix these sort of issues is going to be needed in the future (not specific to swaps or recent work).

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0a1755d]
Page Load Metrics (409 ± 48 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint298239147
domContentLoaded2915844079948
load2925864099948
domInteractive2905844079948

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Oct 20, 2020

I want to block merging of this on #9662, so that we can properly QA the displayed savings amount. Once that is merged, this will be rebased. I don't think further code changes will be needed.

@danjm danjm force-pushed the update-fee-card-designs branch from 0a1755d to 36f268d Compare October 22, 2020 08:32
@danjm danjm changed the base branch from develop to alternative-savings-fix October 22, 2020 08:34
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [36f268d]
Page Load Metrics (554 ± 89 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaintNaNNaNNaNNaNNaN
domContentLoaded30898655118488
load30999155418589
domInteractive30898655118488

@brad-decker
Copy link
Copy Markdown
Contributor

brad-decker commented Oct 22, 2020

as I was reviewing/QA'ing #9666 I noticed that there is a mismatch in the sign on the number:

image

the saving's amount is '-1.63' but in the tooltip it shows '+1.63'... this is

Nope... nope... that's a tilde. That's almost unrecognizable as a tilde

Edit:

in the screenshot, I was able to see it because it's super big compared to what I see on the extension popup on my laptop monitor. @jakehaugen thoughts? I don't think this blocks anything but it threw my old ass eyes for a loop 😆

@jakehaugen
Copy link
Copy Markdown

in the screenshot, I was able to see it because it's super big compared to what I see on the extension popup on my laptop monitor. @jakehaugen thoughts? I don't think this blocks anything but it threw my old ass eyes for a loop 😆

Yes, this is an issue with the font we are using. In the mocks I use a different font for the tilde -- Euclid Flex vs. Euclid Circular B. Huge pain. But, I thought we had it solved elsewhere?

@brad-decker
Copy link
Copy Markdown
Contributor

@jakehaugen possibly, i just ran into it when testing. @danjm might have more insight.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [bf1ca7f]
Page Load Metrics (449 ± 49 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34122582612
domContentLoaded33584544710350
load33684644910349
domInteractive33584444710350

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Oct 26, 2020

The tilde has been fixed
Screenshot from 2020-10-26 11-47-54

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Oct 26, 2020

This was updated to include desired messaging from @jakehaugen when there are no savings:

Screenshot from 2020-10-26 15-00-38

Base automatically changed from alternative-savings-fix to develop November 9, 2020 17:09
@danjm danjm dismissed brad-decker’s stale review November 9, 2020 17:09

The base branch was changed.

@danjm danjm force-pushed the update-fee-card-designs branch from b14a14b to bcd3c93 Compare November 9, 2020 17:13
@danjm danjm marked this pull request as ready for review November 9, 2020 17:23
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [bcd3c93]
Page Load Metrics (440 ± 64 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint318840157
domContentLoaded25467843813364
load25668044013264
domInteractive25467843813364

@darkwing
Copy link
Copy Markdown
Contributor

darkwing commented Nov 9, 2020

The only big issue is seeing the "Terms of Service" link cut off on desktop, which I think is something we should fix -- we shouldn't risk users missing it:

TermsBlocked

At present, .swaps__container is height: 620px;; could we change that to min-height when in full page mode?

I'm a big concerned about the way we're using space here:

Box

Maybe we could use a sideways arrow (" -> ") to better use the space?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we initialize savingsText to '', we can void the last else and possibly the if (!inDevelopment) block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 0c0dffdef

@danjm danjm removed the request for review from whymarrh November 9, 2020 17:51
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might be helpful to add a comment here as to why we're using !important, not sure if we have a standard for doing that with important usage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 5d6c28567

@jakehaugen
Copy link
Copy Markdown

The only big issue is seeing the "Terms of Service" link cut off on desktop, which I think is something we should fix -- we shouldn't risk users missing it:

TermsBlocked

At present, .swaps__container is height: 620px;; could we change that to min-height when in full page mode?

I'm a big concerned about the way we're using space here:

Box

Maybe we could use a sideways arrow (" -> ") to better use the space?

Will soon be proposing that the Terms of Service link be moved to the first page. There are a few other tweaks in the works along with this. May require a different PR?

Copy link
Copy Markdown
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

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

Added a few suggestions here.

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Nov 9, 2020

@darkwing The terms of service issue was addressed in 7ac38c3b5

Now looks like:

Screenshot from 2020-11-09 15-57-59

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [5d6c285]
Page Load Metrics (432 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint317838105
domContentLoaded24869743114268
load24969943214268
domInteractive24869743014268

darkwing
darkwing previously approved these changes Nov 10, 2020
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

inDevelopment and tokenConversionRate are checked in both else-ifs, so I think that could be tightened up, but I don't want to block on it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave this where it is for now, as we will be removing this variable in the not to distant future

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could we make use of the wrapperClassName/containerClassName prop on the InfoTooltip component instead of manually creating the extra div here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

some day I will do this without you having to ask me about it on a PR 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in a7d49f2

css touch up

More semantic html and remove unnecessary container wrapper

Update message for case when there are no savings, in new swaps fee card designs

Improve display of tilde in savings designs
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1f43058]
Page Load Metrics (364 ± 38 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint297939147
domContentLoaded2605843627838
load2615853647938
domInteractive2605843627838

@danjm danjm merged commit d9924ca into develop Nov 13, 2020
@danjm danjm deleted the update-fee-card-designs branch November 13, 2020 17:12
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants