feat(web): add widget config dialog and layout management controls
All checks were successful
ci/woodpecker/push/web Pipeline was successful

Add per-widget configuration dialog (WidgetConfigDialog) with settings
infrastructure ready for future configSchema-based forms. Add layout
management controls: reset to default, edit/done toggle, and widget
gear icon for configuration. Wire onEditWidget through WidgetGrid to
BaseWidget.

Implements TW-WDG-004 and TW-WDG-005.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 19:07:07 -06:00
parent f93fa60fff
commit c74d15ee3d
4 changed files with 253 additions and 21 deletions

View File

@@ -22,6 +22,7 @@ export interface WidgetGridProps {
layout: WidgetPlacement[];
onLayoutChange: (layout: WidgetPlacement[]) => void;
onRemoveWidget?: (widgetId: string) => void;
onEditWidget?: (widgetId: string) => void;
isEditing?: boolean;
className?: string;
}
@@ -30,6 +31,7 @@ export function WidgetGrid({
layout,
onLayoutChange,
onRemoveWidget,
onEditWidget,
isEditing = false,
className,
}: WidgetGridProps): React.JSX.Element {
@@ -183,6 +185,12 @@ export function WidgetGrid({
id={item.i}
title={widgetDef.displayName}
description={widgetDef.description}
{...(isEditing &&
onEditWidget && {
onEdit: (): void => {
onEditWidget(item.i);
},
})}
{...(isEditing &&
onRemoveWidget && {
onRemove: (): void => {