feat(web): add widget config dialog and layout management controls
All checks were successful
ci/woodpecker/push/web Pipeline was successful
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user