Skip to content

Simplify play icon shadow#6641

Merged
gaearon merged 2 commits into
mainfrom
fix-shadow
Nov 22, 2024
Merged

Simplify play icon shadow#6641
gaearon merged 2 commits into
mainfrom
fix-shadow

Conversation

@gaearon
Copy link
Copy Markdown
Contributor

@gaearon gaearon commented Nov 22, 2024

This solves a few things:

  • The shadow was almost invisible on light theme because the shadowColor was theme-dependent (which doesn't make sense when overlaying a video).
  • We were getting Raised button causing error: View #... of type RCTView has a shadow set but cannot calculate shadow efficiently which is only solveable by putting a solid background color on the element with the shadow.

Should overall look the same-ish. Here it is against different backgrounds:

Screenshot 2024-11-22 at 19 18 43 Screenshot 2024-11-22 at 19 18 52 Screenshot 2024-11-22 at 19 19 38

@arcalinea arcalinea temporarily deployed to fix-shadow - social-app PR #6641 November 22, 2024 19:24 — with Render Destroyed
@github-actions
Copy link
Copy Markdown
Contributor

Old size New size Diff
8.06 MB 8.06 MB -263 B (-0.00%)

Copy link
Copy Markdown
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

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

hottt

@gaearon gaearon merged commit 7fa47ef into main Nov 22, 2024
@gaearon gaearon deleted the fix-shadow branch November 22, 2024 19:43
Copy link
Copy Markdown
Member

@mozzius mozzius left a comment

Choose a reason for hiding this comment

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

I don't exactly get the motivation but it works fine

@gaearon
Copy link
Copy Markdown
Contributor Author

gaearon commented Nov 22, 2024

I don't exactly get the motivation

See the summary:

  • It did not have the same color in dark and light theme, making it essentially invisible with the light theme
    • We do want it to always be visible so that the play button has a bit of contrast against light videos
  • We were getting a warning from React Native whenever it rendered ("Raised button causing error: View #... of type RCTView has a shadow set but cannot calculate shadow efficiently") which is probably not good

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.

4 participants