fix: narrow PR to verified bug fixes

This commit is contained in:
ajnart committed 2026-08-22 10:52:15 +02:00
1 parent 3f9941f9c7
commit 268c864801
8 files changed
+50 -123

No files matched your search

@@ -48,9 +48,9 @@ export const WidgetContextMenu = ({ item, definition, widgetStateRef, children }
const settings = useSettings();
if (!session || !settings.enableRightClickOnWidgets) return <>{children}</>;
// App widgets are links — let the browser's native context menu (open in new tab, copy link)
// show in view mode. In edit mode keep the Homarr menu so items can still be edited/removed.
if (item.kind === "app" && !isEditMode) return <>{children}</>;
const isLinkWidget = item.kind === "app" || item.kind === "bookmarks";
// Keep the Homarr menu in edit mode so these widgets can still be edited or removed.
if (isLinkWidget && !isEditMode) return <>{children}</>;
return (
<WidgetContextMenuInner item={item} definition={definition} widgetStateRef={widgetStateRef} settings={settings}>
@@ -301,6 +301,8 @@ interface UseCssVariableConfiguration {
isDynamic: boolean;
}
const minimumResizeWidthDelta = 20;
/**
* This hook is used to configure the css variables for the gridstack
* Those css variables are used to define the size of the gridstack items
@@ -329,13 +331,13 @@ const useCssVariableConfiguration = ({
const currentHeight = wrapperRef.current.clientHeight;
const prevSize = prevSizeRef.current;
// Only skip recalculation when the width change is insignificant (< 20px)
// Only skip recalculation when the width change is insignificant
// and, for dynamic sections, the height is unchanged. This prevents infinite
// feedback loops when the vertical scrollbar appears/disappears, causing
// clientWidth to oscillate by ~15px, while still reacting to height changes.
if (
prevSize !== null &&
Math.abs(currentWidth - prevSize.width) < 20 &&
Math.abs(currentWidth - prevSize.width) < minimumResizeWidthDelta &&
(!isDynamic || currentHeight === prevSize.height)
) {
return;