batches: refactor collapsibles
Created by: courier-new
I was going to go file a follow-up issue for the frontend platform team for https://github.com/sourcegraph/sourcegraph/issues/36799, but then as I was writing the ticket, I discovered that we actually maintain two separate implementations of a collapsible component: Collapsible
, which we're using, and Collapse
. I don't know why there's two, but Collapse
is a part of Wildcard and Collapsible
is not. Collapse
also appears to me to have a better implementation, and it doesn't rely on ::after
for the button, which means it doesn't swallow hover events as I saw when investigating https://github.com/sourcegraph/sourcegraph/issues/36799.
So, in this PR, I've gone ahead and refactored our execution UI to use Collapse
instead, which means we get our step state tooltips back!
While updating and testing the components, I fixed some issues with the collapsible header rows overflowing when the branch name is too long. Now it truncates the branch name text in the same way as we do for the step run
command:
I also took this opportunity to refactor to the new Tooltip
component for StepStateIcon
while I was there. And lastly, I fixed a few miscellaneous linter warnings here and there.
Test plan
This component is covered by Storybook stories. I compared side-by-side with storybook.sgdev.org to ensure I wasn't introducing a visual regression.
App preview:
Check out the client app preview documentation to learn more.