Update GitLab domFunctions to use new interop
Created by: souldzin
- Step 1: Setup fake web worker for jest
- Step 2: Fix Sourcegraph with MR diffs
- Upstream PR: Update GitLab domFunctions to use new interop
Description
This upstream PR is the final step to fixing an issue with GitLab/Sourcegraph integration for MR diffs.
What's the issue?
GitLab has semi-recently changes it's HTML structure which quite broke the ability for Sourcegraph to parse what's going on.
What was the fix?
In this MR we are introducing much friendlier interoperability attributes. This PR updates domFunctions to use those attributes. It falls back to the legacy behavior so that the extension can work for older versions of self-hosted GitLab instances.
Screenshots
Here's some screenshots demoing that this fixes the MR diff integration:
Legacy <table> layout:
| inline | parallel (left) | parallel (right) |
|---|---|---|
![]() |
![]() |
![]() |
New CSS grid layout:
| inline (old) | inline (new) | inline (no change) | parallel (left) | parallel (right) |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
TODO
-
Update the split.htmlandunified.htmlsnapshot once the GitLab MR is merged and deployed. This PR's tests will fail because the new HTML fixtures do not yet include the interoperability attributes. This test failure actually "catches" the bug.
Merge request reports
Activity
Created by: souldzin
Thanks for checking this out @tjkandala! Since this GitLab MR has been merged and deployed, I just finished this TODO in the PR description

- Update the split.html and unified.html snapshot once the GitLab MR is merged and deployed. This PR's tests will fail because the new HTML fixtures do not yet include the interoperability attributes. This test failure actually "catches" the bug.
I would expect the PR checks to have all passed now?

@tjkandala I think this is ready to merge, but please let me know if there's anything I need to do. Thank you!

side note: I also updated the description with some screenshots of testing this integration locally across old/new versions of GitLab.
Created by: tjkandala
Hey @souldzin, thanks for the screenshots! I triggered a build and it looks like the following checks are failing:
-
yarn -s run eslintinclient/browser(seems like a variable name length issue) -
yarn testinclient/browser(a couple snapshots are missing, generating them locally should fix the issue)
After those are resolved, this should be good to merge!
-









