Fix system resources widget overflow and initial chart flicker
The chart card and its outer widget shell both had overflow:visible, letting chart lines bleed past their rounded borders into neighboring widgets. Compact-mode charts also stretched to fill the widget's full resized height instead of staying compact like other widgets. Additionally, the history used to build the chart needs 2+ points to render a line - it started empty and only got its first real point on the next poll (up to 30s later), so the chart would flash between a single-value fallback and the actual graph. Both the initial render and the first state update now seed with the current value duplicated, so a flat line renders immediately with no flicker.
This commit is contained in:
1 parent
f0eddda573
commit
26d12d9fad
3 files changed
+20
-16
No files matched your search
@@ -11,7 +11,6 @@ import type { BoardItemAdvancedOptions } from "@homarr/validation/shared";
|
||||
import classes from "./widget-card-shell.module.css";
|
||||
|
||||
const getOverflow = (kind: WidgetKind, hasCustomCssClasses: boolean): CSSProperties => {
|
||||
if (kind === "systemResources") return { overflowX: "visible", overflowY: "visible" };
|
||||
if (kind === "iframe" || kind === "assistant") return { overflowX: "hidden", overflowY: "hidden" };
|
||||
if (hasCustomCssClasses) return {};
|
||||
return { overflowX: "hidden", overflowY: "auto" };
|
||||
|
||||
Reference in new issue
Block a user