-
Notifications
You must be signed in to change notification settings - Fork 87
Experimental Workload: Responsive Design #453
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
base: main
Are you sure you want to change the base?
Conversation
1da5897
to
34a545e
Compare
Adding reviewers for visibility, feel free to take a look :) |
It seems to me that the test doesn't really take the advantage of responsive design since iframe's size is always same. Maybe we should add steps to resize iframe so that responsive design comes into play? |
Currently, we are resizing the the iframe with id |
Oh, I see. We're resizing the inner iframe. I guess that works. |
Gentle ping 😄 |
I still see rather short run times for individual steps (close to 1.6ms in chrome canary) which might introduce a bit too much noise in the long run.
ScrollToChatAndSendMessage and (and especially it's sub-items) will show some aliasing from timer resolution which is ~ 0.1ms on chrome. |
To bump up the step durations, I am thinking of
currently no proposed changes for |
I'll add a fix for that. The webpage was designed to be viewed in 800x600, as that's how it will appear within the benchmark.
Yes, that is expected. Do we prefer a different behavior?
Yes, they are just placeholders. We intended the video elements to be there but did not plan for them to play any actual videos. |
I guess it makes sense for the tests, since it shifts elements on the page. That said, it's not something you'd see on the web (hopefully). I'd expected a modal or something like that instead.
Thanks for clarifying. |
@issackjohn - maybe rebase / merge main, to get the updated test runner in there. That should ensure the checks don't fail. |
Let's aim for > 5ms for each measured subtest (I'd still aim for roughly 10ms if possible). Does this sound reasonable? |
Sounds good. |
Sounds reasonable to me, I'll add some more actions. |
cd96d0b
to
3413c3d
Compare
Just double checked on Chrome, Firefox, Safari and the noise levels are in-sync with the rest of the workloads. |
Thanks! Looking forward to addressing anymore feedback from folks. |
057e604
to
e7887e9
Compare
✅ Deploy Preview for webkit-speedometer-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e7887e9
to
698c725
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.
Ths looks pretty good to me!
I see that when running npm run dev
the dist files get overridden. Do you know if we can make it so the dev files are written in a different location, to minimize risks of errors in the future?
Otherwise my main issue is that the width setting in ReduceWidthIn5Steps
and IncreaseWidthIn5Steps
don't seem to be captured properly, at least in Firefox on my current machine (which is a bit slow). IMO this needs to be fixed, but this can be done in a follow-up.
Then I have a few more minor comments here and there. I haven't looked very closely at the tailwind code because I'm not familiar with it.
Also I wonder if we could include matchMedia
somewhere.
Thanks!
Please add new changes in a separate commit.
const breakpoint = breakpoints.find((bp) => width >= bp.minWidth); | ||
this.visibleButtons = breakpoint ? this.buttons.slice(0, breakpoint.buttons) : this.buttons.slice(0, 2); |
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'm curious, why it's not done with CSS or window.matchMedia?
Is it just to exercize ResizeObserver?
Can we please have a comment to explain that? (also in the other file where it's used)
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.
That's correct, to exercise ResizeObserver. done.
|
||
widths.forEach((width) => { | ||
iframeElement.setWidth(`${width}px`); | ||
page.layout(); |
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 the layout doesn't work, possibly because the resize observer is async?
I think you should try doing several steps instead of just one, so that the async part is properly captured.
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.
698c725
to
2a3113e
Compare
|
||
@layer utilities { | ||
.content-auto { | ||
content-visibility: auto; |
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.
Is content-visibility
widely supported across browsers and used on popular sites?
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 understanding is that it is newly baseline as of September 2024. https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility. I see conflicting information here though, it may also be limited availability?
It is also used on 4.65% of page loads on chrome according to https://chromestatus.com/metrics/css/timeline/popularity/662
* Write dev files to different location. * Using root code style. * Remove unused Prettier and ESLint configuration files from responsive design directory * Update scrollIntoView method to accept options parameter for better control * change scroll behavior to instant * Refactor Responsive-Design tests to use async functions * Rename output directory from dev-dist to build-dev in configuration files * Re-install resize observer
Sounds good. I can look into incorporating matchMedia as a follow-up and see where it might make sense to add. |
This pull request introduces a new experimental responsive design workload, featuring a single-page cooking website built with Lit and Tailwind CSS.
The hosted version can be found here.
Quick link to dev mode with workload selected.
Please look at the README in
experimental/responsive-design
for more information about the code and how it is organized.Not included in this PR: