Use i18n for board component strings, show controls in edit mode, require website before editing
Some checks are pending
Node.js CI / build (push) Waiting to run

- Replace raw strings with useMessages hook in BoardColumn and BoardComponentSelect
- Show WebsiteControls on edit screen so users can test filters
- Disable board body editing until a website is selected
- Scope website select to team websites when editing a team board

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mike Cao 2026-02-09 02:46:30 -08:00
parent 87bde9da1f
commit 2c7ab2b734
6 changed files with 23 additions and 22 deletions

View file

@ -9,7 +9,7 @@ import {
TooltipTrigger,
} from '@umami/react-zen';
import { useState } from 'react';
import { useBoard } from '@/components/hooks';
import { useBoard, useMessages } from '@/components/hooks';
import { Pencil, Plus, X } from '@/components/icons';
import type { BoardComponentConfig } from '@/lib/types';
import { BoardComponentRenderer } from './BoardComponentRenderer';
@ -32,6 +32,7 @@ export function BoardColumn({
}) {
const [showSelect, setShowSelect] = useState(false);
const { board } = useBoard();
const { t, labels } = useMessages();
const websiteId = board?.parameters?.websiteId;
const handleSelect = (config: BoardComponentConfig) => {
@ -91,7 +92,7 @@ export function BoardColumn({
)}
<Modal isOpen={showSelect} onOpenChange={setShowSelect}>
<Dialog
title="Add component"
title={t(labels.selectComponent)}
style={{
width: '750px',
maxWidth: 'calc(100vw - 40px)',