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

[blur] web: fix bug with too high intensity, update tint colors #14112

Merged
merged 3 commits into from Aug 19, 2021

Conversation

Simek
Copy link
Collaborator

@Simek Simek commented Aug 19, 2021

Why

During the work on #14110 I have spotted that specifying intensity on the web over 100 will yield a visible result until 150, then the tint color lose the transparency and for greater values yields the same effect.

This is the side effect of the current web tint implementation (which calculates alpha based on intensity).

How

This PR caps the intensity always at 100 which fixes the bug with greater values having effect on the web.

Also within this PR I have updated the tint color values using the official Apple Sketch Library for iOS 14:

There are several types of blurred content, but I have stick to the default one:
Screenshot 2021-08-19 at 12 31 42

Test Plan

I have added a test which checks if intensity has been capped correctly at 100 so the maximum color opacity value and blur radius are set to reference values.

Checklist

  • Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md).
  • This diff will work correctly for expo build (eg: updated @expo/xdl).
  • This diff will work correctly for expo prebuild & EAS Build (eg: updated a module plugin).

@Simek Simek requested a review from tsapeta as a code owner August 19, 2021 10:53
@Simek Simek requested a review from EvanBacon August 19, 2021 10:53
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Aug 19, 2021
Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Aug 19, 2021
@Simek Simek merged commit 36a7348 into expo:master Aug 19, 2021
@Simek Simek deleted the blur-fix-intensity-and-color-on-web branch August 19, 2021 11:55
FelipeACP pushed a commit to FelipeACP/expo that referenced this pull request Sep 18, 2021
…po#14112)

* [blur] web: fix bug with too high `intensity`, update tint colors

* add web test which checks max blur and color opacity values

* Update packages/expo-blur/CHANGELOG.md

Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>

Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants