-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Site Profiler: Add a blur effect for locked metrics #90703
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~414 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
b95aa9d
to
a7f1dc6
Compare
const InsightHeader = styled.div` | ||
font-family: 'SF Pro Text'; | ||
font-size: 16px; | ||
filter: ${ ( props: InsightHeaderProps ) => ( props.locked ? 'blur(2px)' : 'none' ) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the blur
filter works as expected. However, I could easily see the hidden text by toggling one CSS rule. Is there any better way to achieve similar results? Do we want to obfuscate the details in any way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea here is really to use text that doesn't mean much to be blurred (as the sentences I added in useLockedInsights
).
This should also help us to not need to retrieve any information at this step, which will not be available yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we want to obfuscate the text we could generate a temp image from the backend with the blurred text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But at this point, we don't have the data, the blurred text is to be shown during teaser stage.
a7f1dc6
to
e2f6bc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
83167b8
to
5a7b6c7
Compare
Fixes https://github.com/Automattic/dotcom-forge/issues/6676
Proposed Changes
Add a blurry effect for locked metrics. The icon will also change to a locker.
Why are these changes being made?
The list of metrics should show blurred items when on teaser mode.
Testing Instructions
/site-profiler/:url
. Ex:/site-profiler/example.com
Health Scores
section is blurred as the image above.Pre-merge Checklist