Fix Rapid Diffs options menu overlapping with another diff file header
What does this MR do and why?
This MR fixes Rapid Diffs file menu options overlapping with the next diff file.
This happened because each diff file has a sticky header which creates a new stacking context.
Our dropdown is rendered inside the header, which means we can not escape this stacking context and increase z-index.
To solve that we need to check if a header has a currently open menu and increase z-index.
The same way we do this for existing diffs.
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
How to set up and validate locally
- Enable
rapid_diffsfeature flag - Open any merge request with at least 2 files
- Select 'Changes' tab
- Add
?rapid_diffs=trueto the URL, follow it - Collapse the first file
- Open menu on the collapsed file
- Observe dropdown being on top of another file, not covered by anything

