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.html
andunified.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.