-
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
Performance Profiler: Add preview box to timeline screenshots #95515
base: trunk
Are you sure you want to change the base?
Conversation
Link to live branch is being generated... |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~255 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. |
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 can see some issues that we might want to dive in:
- We might want to add a background to the
X
button for cases where it mixes with the background. Something like a black background with some opacity. - On the logged in version the modal is centralized on the screen but I think it should be centralized on the Performance Profiler section, so bringing the sidebar width into the calculation might help.
- The resolution is compromised we see it on the modal (worse on bigger screens), so if we don't receive a different source for the images, it might help to add some image treatment to amplify it without losing (much) readability.
Thanks for your comments @WBerredo, I would be interested in knowing if all comments are a blocker for this task or if any of them can be accomplished with a follow-up task. This is my view:
That's a good catch. This can be simple to add as part of this task. I will investigate options. I'm pinging @matt-west for any tips.
This is the same approach used for the screenshots displayed in the
I am not sure if the extra CPU work required for this is worthy for a potentially minimally used feature here. But I would create a follow-up for further investigation/discussion. What do you think? |
You are right, sorry for not making clear what is a blocker or not.
Agreed, I wouldn't merge without this change but it should be very easy to accomplish too.
Yeah, I'm not very sure about this topic either, and Matt is definitely a better person to define this :)
I agree it can be a follow-up task but I would also defer to @matt-west the decision if its worth to pursue or not. All in all, I would just use the first one as a blocker. |
@WBerredo I have tried different solutions, like just increasing the contrast in the Please find an explanation from claude hereHere's how this CSS-only solution works:We create two pseudo-elements (::before and ::after) that will serve as our adaptive background. These are the results in different white and black images with carts or other icons:
|
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.
Eventually, I have implemented a solution that adds a two different icon backgrounds depending on the image background.
🤯 This is even better than I anticipated. TIL and IMHO it deserves a P2.
LGTM! 🚢
PS: I added a cursor pointer to the thumbnail as I have forgot to mention the first time.
Sorry for the slow response.
Agreed, the modal should be centred based on the full-width of the window.
If we can’t get better resolution images from Google, I don’t think we should try to upscale them on our end. PageSpeed Insights doesn’t allow you to expand the images in their timeline. While this would be a nice feature to have, I don’t think we should add it if the screenshots will always look this pixelated. It doesn’t add any value beyond how they are currently displayed in the timeline.
@epeicher This is a really cool solution! Nice work. Can you please use the |
Hi @matt-west , I have been having a look at the We can always extend the Are you happy with this approach?
|
Yep, that works. Thanks @epeicher |
Resolves https://github.com/Automattic/dotcom-forge/issues/9192
Proposed Changes
Why are these changes being made?
Testing Instructions
/speed-test
tool with a valid URLperformance-profiler/logged-in
)Pre-merge Checklist