Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ function addToolbarButton(toolbar) {
return;
}

// Check if the toolbar is inside a table row (e.g., in diff views)
const tableRow = toolbar.closest('tr');
if (tableRow) {
debugLog('Found toolbar inside table row, adding class');
tableRow.classList.add('ghg-has-toolbar');
}

// Find the toolbar group to add our button to
const isNewToolbar = toolbar.getAttribute('aria-label') === 'Formatting tools';
let toolbarGroup;
Expand Down
19 changes: 19 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@
overflow: visible !important;
}

/*
* Fixes the GIF menu not overflowing the toolbar
* Allows the GIF dropdown to be visible outside the toolbar container
*/
.ghg-has-giphy-field
[class*="Toolbar-module__toolbar"][class*="prc-ActionBar-Nav"] {
overflow: visible !important;
}

/*
* Fixes the GIF menu appearing below the code diff
* When the toolbar is inside a table row (e.g., in PR diff views),
* this ensures the GIF dropdown appears above other content
*/
.ghg-has-toolbar {
position: relative;
z-index: 5;
}

/*
* Override for GitHub's toolbar alignment bug
*
Expand Down