Closed mockersf closed 4 years ago
Maybe this could fit into a slightly broader 'smart tooltip' epic together with #3813
Since #4206 was reverted, this issue persists.
I noticed today, that updateTooltip
is exposed by StepTree
but only called in Build
(to handle the hover and clock tick cases):
https://github.com/concourse/concourse/blob/master/web/elm/src/Build/Build.elm#L329
https://github.com/concourse/concourse/blob/master/web/elm/src/Build/Build.elm#L425
I think we should refactor things so that the .hoverCounter
field lives closer to StepTree
, where it is accessed. Hopefully then we can make use of the Tooltip.handleCallback
a little more seamlessly.
We got to the point where hovering a first-occurrence icon would trigger a GetViewportOf
effect, but it took us a while to understand why a corresponding GotViewport
callback was not being received. In some sense the culprit was that the function toHtmlID
was causing an empty string to be passed to Browser.Dom.getViewportOf
, and also that the first-occurrence icon did not have an ID to be passed. Ideally there would be some way to extract this cross-cutting concern without the need for exhaustive unit tests (i.e. there should be some kind of parametrized type for tooltippable things so that there is no need to separately assert that every tooltippable element has the correct id).
Frankly, it might not be possible to achieve this goal without extracting a more transparent type that will act as an alternative to Html
, which could be a pretty broad-ranging change. Let's still keep this desire in mind, but avoid wandering down any garden paths.
The plan right now is to move the tooltip outside the scrollable-body
container, so that it is not affected by overflow attributes. @matthewpereira wisely observed that this approach might impact accessibility in some way, and I'm just writing it down here in case I forget.
Bug Report
When the first line of a build in the view is a new resource, the tooltip goes under the topbar. Same for tooltip with durations
Steps to Reproduce
Go to a build with a new version of a resources that is used as the first step of a job. Mouse over the yellow arrow
Expected Results
I can read the tooltip
Actual Results
The tooltip is hidden under the topbar
Additional Context
It looks like it's a CSS problem with the overflow behaviour that has changed with the addition of the sidebar, but I'm not sure how to fix it
Version Info