Change: Use echarts tooltip instead of custom component
Change pattern proposal: Use built-in echarts tooltips instead of custom component
Old Pattern
We use a custom component for echarts charts
New Pattern
Use the built-in echarts tooltip formatter method
Advantages of switching patterns
- UX: current tooltip shows all the time, rather than just when hovering an element. Found in gitlab-org/gitlab-ui#311 (closed)
- Performance: Basically the same between our current way and debouncing - gitlab-org/gitlab-ui#191 (comment 213721061)
- Simplicity. No custom component to manage, we just use tooltips as documented by echart
Disadvantages of switching patterns
- Means returning HTML string rather than vue component. XSS wouls need watching We don't deal with this directly though
- Can we style tooltip to look the same? Unsure if we can render the triangle without echarts changes
What is the impact on our existing codebase?
None. This is an implementation detail of gitlab-ui