Skip to content

Commit 2a439ca

Browse files
committed
progress
1 parent 9cc21fe commit 2a439ca

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

web_src/js/behaviours/overflow-menu.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const update = throttle(100, (menu) => {
1717

1818
if (buttonItems.length && !menu.querySelector('.overflow-menu-button')) {
1919
const btn = document.createElement('button');
20-
btn.classList.add('overflow-menu-button', 'btn', 'tw-px-4');
20+
btn.classList.add('overflow-menu-button', 'btn', 'tw-px-2');
2121
btn.innerHTML = svg('octicon-kebab-horizontal');
2222

2323
const itemsMenu = document.createElement('div');
24-
itemsMenu.classList.add('overflow-menu-tippy', 'ui', 'vertical', 'menu');
24+
itemsMenu.classList.add('overflow-menu-tippy', 'ui', 'secondary', 'vertical', 'menu');
2525
for (const item of buttonItems) {
2626
itemsMenu.append(item);
2727
}
@@ -43,9 +43,12 @@ export function initOverflowMenu() {
4343
for (const el of document.querySelectorAll('.overflow-menu')) {
4444
update(el);
4545
(new ResizeObserver((entries) => {
46-
for (const entry of entries) {
47-
update(entry.target);
48-
}
46+
// raf seems to avoid 'ResizeObserver loop completed with undelivered notifications' error
47+
requestAnimationFrame(() => {
48+
for (const entry of entries) {
49+
update(entry.target);
50+
}
51+
});
4952
})).observe(el);
5053
}
5154
}

web_src/js/bootstrap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function processWindowErrorEvent(e) {
3333
const assetBaseUrl = String(new URL(__webpack_public_path__, window.location.origin));
3434

3535
// error is likely from browser extension or inline script. Do not show these in production builds.
36-
if (!err.stack?.includes(assetBaseUrl) && window.config?.runModeIsProd) return;
36+
if (err?.stack && !err.stack?.includes(assetBaseUrl) && window.config?.runModeIsProd) return;
3737

3838
let message;
3939
if (e.type === 'unhandledrejection') {
@@ -49,6 +49,7 @@ function processWindowErrorEvent(e) {
4949
}
5050

5151
showGlobalErrorMessage(`${message} Open browser console to see more details.`);
52+
console.error(err ?? e);
5253
}
5354

5455
function initGlobalErrorHandler() {

0 commit comments

Comments
 (0)