Skip to content

batches: refactor insights go code checker banner

Administrator requested to merge kr/insights-banner-cleanup into main

Created by: courier-new

Note: This PR is temporarily based on #35338 to prevent merge conflicts. After that is merged, I will rebase and update this one.

This PR is a light refactor on the code insights integration for go code checkers to reduce duplicate logic and decouple the logic from the extremely heavy SSBC page components by putting it in a hook instead. It also improves the consistency of variable names, adds more code comments, and introduces a story for the banner component. None of the logic about how the banner is displayed is changed. I completed this in conjunction with https://github.com/sourcegraph/sourcegraph/issues/33395, but separated it out into its own branch since it's not particularly related to that ticket.

Test plan

None of the logic about how the banner is displayed is changed. The banner itself now has storybook coverage. I enabled the experimental flag and verified the presence of the banner on both the create and edit pages locally:

Screen Shot 2022-05-11 at 7 52 07 PM Screen Shot 2022-05-11 at 7 51 52 PM

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading