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

chore(toast): update toast UI to use border instead of shadow #5113

Merged
merged 6 commits into from
Mar 18, 2024

Conversation

bakoushin
Copy link
Contributor

@bakoushin bakoushin commented Mar 15, 2024

Description

We decided to refrain from using shadows with toasts because shadows don't give enough contrast with the underlying app surface for toast to stand out.

It is also challenging to replicate designer-proposed shadows consistently in iOS and Android due to platform differences in rendering shadows.

A border with 50% opaque primary color is used instead.

Designs: https://www.figma.com/file/erFfzHvSTm5g1sjK6jWyEH/Working-Design-System-Components?type=design&node-id=1287-1599&mode=design&t=FfkYhPWuxiEi75yJ-0

Context: https://valora-app.slack.com/archives/C0684TXDR3K/p1710432893238009?thread_ts=1708337311.090779&cid=C0684TXDR3K

Examples:

With border With shadow (deprecated)
Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 22 37 2 Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 08 2
Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 23 2 Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 33 2
Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 11 2 Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 50 2
Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 35 2 Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 42 2

Test plan

CI

Related issues

Backwards compatibility

Y

Network scalability

NA

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.52%. Comparing base (2aa8b6c) to head (5b2a397).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5113      +/-   ##
==========================================
- Coverage   85.52%   85.52%   -0.01%     
==========================================
  Files         724      724              
  Lines       29640    29639       -1     
  Branches     5121     5120       -1     
==========================================
- Hits        25351    25350       -1     
  Misses       4054     4054              
  Partials      235      235              
Files Coverage Δ
src/components/InLineNotification.tsx 100.00% <100.00%> (ø)
src/components/Toast.tsx 75.00% <100.00%> (-0.39%) ⬇️
src/styles/styles.ts 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aa8b6c...5b2a397. Read the comment docs.

Copy link
Collaborator

@kathaypacific kathaypacific left a comment

Choose a reason for hiding this comment

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

💅🏼 sadly my eyes prefer the shadows but i guess the border approach is clearer 😥

@bakoushin
Copy link
Contributor Author

bakoushin commented Mar 18, 2024

I had the same feeling when Apple went from skeuomorphism to flat back in the day. But in the end, it went well. Let's wait and see if this one could make it.

@bakoushin bakoushin added this pull request to the merge queue Mar 18, 2024
Merged via the queue into main with commit da6d8cd Mar 18, 2024
16 checks passed
@bakoushin bakoushin deleted the alex/toast-ui-update branch March 18, 2024 09:24
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
…-inc#5113)

### Description

We decided to refrain from using shadows with toasts because shadows
don't give enough contrast with the underlying app surface for toast to
stand out.

It is also challenging to replicate designer-proposed shadows
consistently in iOS and Android due to platform differences in rendering
shadows.

A border with 50% opaque primary color is used instead.

Designs:
https://www.figma.com/file/erFfzHvSTm5g1sjK6jWyEH/Working-Design-System-Components?type=design&node-id=1287-1599&mode=design&t=FfkYhPWuxiEi75yJ-0

Context:
https://valora-app.slack.com/archives/C0684TXDR3K/p1710432893238009?thread_ts=1708337311.090779&cid=C0684TXDR3K

#### Examples:

| With border | With shadow (deprecated) |
|--------|--------|
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 22 37
2](https://github.com/valora-inc/wallet/assets/2737872/0e2bad37-0a51-48f3-ac5e-b17db481ca9e)
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 08
2](https://github.com/valora-inc/wallet/assets/2737872/01268ca4-5130-4b86-a988-9bc866298bf8)
|
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 23
2](https://github.com/valora-inc/wallet/assets/2737872/129773ac-cd91-4063-93a6-77fd7308a61f)
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 33
2](https://github.com/valora-inc/wallet/assets/2737872/9cc48514-e8f6-4136-b4c5-f4ee605ce3c2)
|
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 11
2](https://github.com/valora-inc/wallet/assets/2737872/7e29507f-8851-4fc0-bb1b-d03e0719bc50)
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 50
2](https://github.com/valora-inc/wallet/assets/2737872/5e2c9728-bb6e-46cc-84be-d655171332cb)
|
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 21 35
2](https://github.com/valora-inc/wallet/assets/2737872/83d1a984-8911-46b7-8136-d1a2ffd84425)
| ![Simulator Screenshot - iPhone 15 - 2024-03-15 at 18 24 42
2](https://github.com/valora-inc/wallet/assets/2737872/f93bfdb6-1404-40bf-a4c5-abf47bf97eec)
|

### Test plan

CI

### Related issues

- Related to RET-1004

### Backwards compatibility

Y

### Network scalability

NA
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.

None yet

2 participants