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

report: snapshot/timespan sticky header #13617

Closed
wants to merge 6 commits into from
Closed

Conversation

adamraine
Copy link
Member

@adamraine adamraine commented Feb 2, 2022

Individual snapshot/timespan reports were emitting a bunch of errors because of the sticky header. I also added category labels to the header.

Sample

Mocks: Go to UXR prototype on the sidebar

#11313

@adamraine adamraine requested a review from a team as a code owner February 2, 2022 19:54
@adamraine adamraine requested review from connorjclark and removed request for a team February 2, 2022 19:54
@adamraine adamraine changed the title report: new sticky header report: snapshot/timespan sticky header Feb 2, 2022

// Mutate at end to avoid layout thrashing.
this.highlightEl.style.transform = `translate(${offset}px)`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The above comment applied to this line. Is there not layout thrashing with these changes? I guess not because you made CSS changes to replace the manual transform setting?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you confirm w/ the performance panel that scrolling doesn't result in tons of style recalc?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is some small style updates, but those existed before this change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Paul reminded me... before, this highlighter was animated between these states. Now that's lost.

idk if we care tbh

Copy link
Collaborator

Choose a reason for hiding this comment

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

also we noticed that clicking the gauges at the top doesnt always update highlighter correctly, viewport size seems to make it vary

Copy link
Member Author

Choose a reason for hiding this comment

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

The highlight is based on whichever category is in the center of the viewport. For snapshot, performance category can be so small that it will never be in the center.

Honestly, one solution could be to make Accessibility the first category for snapshot reports. Performance isn't important enough to be first for snapshot reports IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants