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

misc(treemap): highlight treemap node on mouse hover table row #12483

Merged
merged 2 commits into from
May 17, 2021

Conversation

connorjclark
Copy link
Collaborator

ref #11254

@connorjclark connorjclark requested a review from a team as a code owner May 14, 2021 22:15
@connorjclark connorjclark requested review from adamraine and removed request for a team May 14, 2021 22:15
@google-cla google-cla bot added the cla: yes label May 14, 2021
@connorjclark connorjclark mentioned this pull request May 14, 2021
24 tasks
lighthouse-treemap/app/src/main.js Outdated Show resolved Hide resolved
lighthouse-treemap/app/src/main.js Outdated Show resolved Hide resolved
@@ -78,6 +78,8 @@ class TreemapViewer {
this.viewModes;
/** @type {RenderState=} */
this.previousRenderState;
/** @type {WeakMap<HTMLElement, LH.Treemap.Node>} */
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why a WeakMap if it's recreated with every new version of the table? To me it still signals something special is going on so be careful while reading, but it's probably actually a good default to use when you don't need to iterate and perf isn't a big concern...

Copy link
Collaborator Author

@connorjclark connorjclark May 17, 2021

Choose a reason for hiding this comment

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

In addition to different bundle selector values re-creating the table, scrolling also recreates rows. They are all lazily rendered. So it's good that scrolling doesn't eventually result in OOM (after n months or whatever) :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also agree it's just a good default

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.

4 participants