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

feat(apm): Virtual horizontal scrollbar for span view #22504

Merged
merged 12 commits into from
Dec 8, 2020

Conversation

dashed
Copy link
Member

@dashed dashed commented Dec 7, 2020

The two-pane span view doesn't provide sufficient real estate to allow users to read span descriptions that can be very long, or spans that pyramid aggressively to the right. This PR adds a horizontal scroll to address some of these UX issues.

Continuation from #20084


Horizontal scrollbars:

Kapture 2020-12-07 at 14 21 59

Measurements are moved to the minimap:

Kapture 2020-12-07 at 14 23 54

Copy link
Member

@wmak wmak left a comment

Choose a reason for hiding this comment

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

LGTM, but should we show the divider, so its a bit clearer that the scroll is only for the left side? eg.
image

};

registerEventListeners = (spanbar: HTMLDivElement) => {
spanbar.onscroll = this.handleScroll.bind(this, spanbar);
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be throttled or debounced to prevent jank? Should this be using attachEventListener() instead of the DOM1 interface?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already throttled since requestAnimationFrame is used within this.handleScroll. Referenced here https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event

I didn't use attachEventListener(), as that'll increase the complexity of having to track references of the attached event listeners. DOM0 event handlers can still be useful despite its age.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants