Skip to content

Commit 0b76744

Browse files
authored
Merge pull request #778 from objectstack-ai/copilot/add-branding-editor-component
2 parents 8930ce7 + ef3fc03 commit 0b76744

File tree

15 files changed

+1102
-3
lines changed

15 files changed

+1102
-3
lines changed

ROADMAP.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,13 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
480480
- [x] Disabled state support
481481

482482
**i18n:**
483-
- [x] `appDesigner` section with 119 keys added to all 10 locales (en, zh, ja, de, fr, es, ar, ru, pt, ko)
483+
- [x] `appDesigner` section with 133 keys added to all 10 locales (en, zh, ja, de, fr, es, ar, ru, pt, ko)
484484
- [x] `useDesignerTranslation` safe wrapper hook with English fallback (no I18nProvider required)
485485
- [x] AppCreationWizard fully i18n-integrated (all labels, buttons, step names, validation messages)
486486
- [x] NavigationDesigner fully i18n-integrated (type badges, quick-add labels, aria-labels, preview, icon editing, visibility, export/import)
487487
- [x] DashboardEditor fully i18n-integrated (toolbar labels, preview text)
488488
- [x] PageCanvasEditor fully i18n-integrated (toolbar labels, mode tabs, preview text)
489+
- [x] BrandingEditor fully i18n-integrated (14 new keys: editor title, export/import, preview, palette, font, light/dark, mobile preview, sample text)
489490

490491
**UX Enhancements:**
491492
- [x] Cancel confirmation dialog with unsaved-changes detection
@@ -500,10 +501,27 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
500501
- [x] 22 DashboardEditor tests (rendering, add/remove widgets, property panel, read-only, undo/redo, export/import, preview mode, widget layout)
501502
- [x] 23 PageCanvasEditor tests (rendering, add/remove components, property panel, read-only, mode tabs, undo/redo, export/import, preview mode)
502503
- [x] 12 ObjectViewConfigurator tests (rendering, view type switch, column visibility, toggles, read-only)
503-
- [x] **Total: 206 tests across 9 files, all passing**
504+
- [x] 29 BrandingEditor tests (rendering, editing, light/dark preview, read-only, undo/redo, export/import, keyboard shortcuts, preview content)
505+
- [x] **Total: 235 tests across 10 files, all passing**
504506

505507
**ComponentRegistry:**
506-
- [x] Registered: `app-creation-wizard`, `navigation-designer`, `dashboard-editor`, `page-canvas-editor`, `object-view-configurator`
508+
- [x] Registered: `app-creation-wizard`, `navigation-designer`, `dashboard-editor`, `page-canvas-editor`, `object-view-configurator`, `branding-editor`
509+
510+
**Branding Editor:**
511+
- [x] Logo URL input with live preview (light/dark logo placeholders)
512+
- [x] Visual color picker with native `<input type="color">` and text hex input
513+
- [x] 16-color preset palette swatches (Blue, Indigo, Violet, Purple, Pink, Red, Orange, Amber, Yellow, Green, Teal, Cyan, Sky, Slate, Dark, Navy)
514+
- [x] Favicon URL input with preview
515+
- [x] Font family selector (9 common web fonts + system default)
516+
- [x] Light/Dark mode preview toggle
517+
- [x] Real-time preview panel (desktop + mobile)
518+
- [x] Undo/Redo via `useUndoRedo` hook (Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y keyboard shortcuts)
519+
- [x] JSON Schema export/import (Download/Upload toolbar buttons with `onExport`/`onImport` callbacks)
520+
- [x] Read-only mode support (disables all inputs, palette clicks, undo/redo, import)
521+
- [x] Mobile responsive layout (flex-col on mobile, sm:flex-row on desktop)
522+
- [x] i18n integration via `useDesignerTranslation` (14 new translation keys in all 10 locales)
523+
- [x] Outputs to `BrandingConfig` type (AppSchema.branding protocol)
524+
- [x] 29 unit tests (rendering, editing, light/dark preview, read-only, undo/redo, export/import, keyboard shortcuts, preview content)
507525

508526
**Console Integration:**
509527
- [x] `CreateAppPage` — renders `AppCreationWizard` with `useMetadata()` objects, `onComplete`/`onCancel`/`onSaveDraft` callbacks

packages/i18n/src/locales/ar.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,18 @@ const ar = {
254254
modeDashboard: 'لوحة المعلومات',
255255
undo: 'تراجع',
256256
redo: 'إعادة',
257+
brandingEditor: 'محرر العلامة التجارية',
258+
brandingExport: 'تصدير JSON',
259+
brandingImport: 'استيراد JSON',
260+
brandingPreview: 'معاينة',
261+
brandingSampleButton: 'زر نموذجي',
262+
brandingSampleText: 'هكذا سيبدو موضوع علامتك التجارية.',
263+
colorPalette: 'لوحة الألوان',
264+
fontFamily: 'الخط',
265+
fontDefault: 'افتراضي (النظام)',
266+
modeLight: 'فاتح',
267+
modeDark: 'داكن',
268+
mobilePreview: 'معاينة الجوال',
257269
},
258270
console: {
259271
title: 'وحدة تحكم ObjectStack',

packages/i18n/src/locales/de.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const de = {
253253
modeDashboard: 'Dashboard',
254254
undo: 'Rückgängig',
255255
redo: 'Wiederholen',
256+
brandingEditor: 'Branding-Editor',
257+
brandingExport: 'JSON exportieren',
258+
brandingImport: 'JSON importieren',
259+
brandingPreview: 'Vorschau',
260+
brandingSampleButton: 'Beispiel-Schaltfläche',
261+
brandingSampleText: 'So wird Ihr Markenthema aussehen.',
262+
colorPalette: 'Farbpalette',
263+
fontFamily: 'Schriftart',
264+
fontDefault: 'Standard (System)',
265+
modeLight: 'Hell',
266+
modeDark: 'Dunkel',
267+
mobilePreview: 'Mobile Vorschau',
256268
},
257269
console: {
258270
title: 'ObjectStack Konsole',

packages/i18n/src/locales/en.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const en = {
253253
modeDashboard: 'Dashboard',
254254
undo: 'Undo',
255255
redo: 'Redo',
256+
brandingEditor: 'Branding Editor',
257+
brandingExport: 'Export JSON',
258+
brandingImport: 'Import JSON',
259+
brandingPreview: 'Preview',
260+
brandingSampleButton: 'Sample Button',
261+
brandingSampleText: 'This is how your brand theme will look.',
262+
colorPalette: 'Color Palette',
263+
fontFamily: 'Font Family',
264+
fontDefault: 'Default (System)',
265+
modeLight: 'Light',
266+
modeDark: 'Dark',
267+
mobilePreview: 'Mobile Preview',
256268
},
257269
console: {
258270
title: 'ObjectStack Console',

packages/i18n/src/locales/es.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const es = {
253253
modeDashboard: 'Panel',
254254
undo: 'Deshacer',
255255
redo: 'Rehacer',
256+
brandingEditor: 'Editor de marca',
257+
brandingExport: 'Exportar JSON',
258+
brandingImport: 'Importar JSON',
259+
brandingPreview: 'Vista previa',
260+
brandingSampleButton: 'Botón de ejemplo',
261+
brandingSampleText: 'Así se verá el tema de su marca.',
262+
colorPalette: 'Paleta de colores',
263+
fontFamily: 'Fuente',
264+
fontDefault: 'Predeterminada (Sistema)',
265+
modeLight: 'Claro',
266+
modeDark: 'Oscuro',
267+
mobilePreview: 'Vista previa móvil',
256268
},
257269
console: {
258270
title: 'Consola ObjectStack',

packages/i18n/src/locales/fr.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const fr = {
253253
modeDashboard: 'Tableau de bord',
254254
undo: 'Annuler',
255255
redo: 'Rétablir',
256+
brandingEditor: 'Éditeur de marque',
257+
brandingExport: 'Exporter JSON',
258+
brandingImport: 'Importer JSON',
259+
brandingPreview: 'Aperçu',
260+
brandingSampleButton: 'Bouton exemple',
261+
brandingSampleText: 'Voici à quoi ressemblera votre thème de marque.',
262+
colorPalette: 'Palette de couleurs',
263+
fontFamily: 'Police',
264+
fontDefault: 'Par défaut (Système)',
265+
modeLight: 'Clair',
266+
modeDark: 'Sombre',
267+
mobilePreview: 'Aperçu mobile',
256268
},
257269
console: {
258270
title: 'Console ObjectStack',

packages/i18n/src/locales/ja.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const ja = {
253253
modeDashboard: 'ダッシュボード',
254254
undo: '元に戻す',
255255
redo: 'やり直し',
256+
brandingEditor: 'ブランドエディター',
257+
brandingExport: 'JSON エクスポート',
258+
brandingImport: 'JSON インポート',
259+
brandingPreview: 'プレビュー',
260+
brandingSampleButton: 'サンプルボタン',
261+
brandingSampleText: 'ブランドテーマの表示イメージです。',
262+
colorPalette: 'カラーパレット',
263+
fontFamily: 'フォント',
264+
fontDefault: 'デフォルト(システム)',
265+
modeLight: 'ライト',
266+
modeDark: 'ダーク',
267+
mobilePreview: 'モバイルプレビュー',
256268
},
257269
console: {
258270
title: 'ObjectStack コンソール',

packages/i18n/src/locales/ko.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const ko = {
253253
modeDashboard: '대시보드',
254254
undo: '실행 취소',
255255
redo: '다시 실행',
256+
brandingEditor: '브랜딩 편집기',
257+
brandingExport: 'JSON 내보내기',
258+
brandingImport: 'JSON 가져오기',
259+
brandingPreview: '미리보기',
260+
brandingSampleButton: '샘플 버튼',
261+
brandingSampleText: '브랜드 테마가 이렇게 보입니다.',
262+
colorPalette: '색상 팔레트',
263+
fontFamily: '글꼴',
264+
fontDefault: '기본 (시스템)',
265+
modeLight: '라이트',
266+
modeDark: '다크',
267+
mobilePreview: '모바일 미리보기',
256268
},
257269
console: {
258270
title: 'ObjectStack 콘솔',

packages/i18n/src/locales/pt.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const pt = {
253253
modeDashboard: 'Painel',
254254
undo: 'Desfazer',
255255
redo: 'Refazer',
256+
brandingEditor: 'Editor de marca',
257+
brandingExport: 'Exportar JSON',
258+
brandingImport: 'Importar JSON',
259+
brandingPreview: 'Pré-visualização',
260+
brandingSampleButton: 'Botão de exemplo',
261+
brandingSampleText: 'É assim que o tema da sua marca vai ficar.',
262+
colorPalette: 'Paleta de cores',
263+
fontFamily: 'Fonte',
264+
fontDefault: 'Padrão (Sistema)',
265+
modeLight: 'Claro',
266+
modeDark: 'Escuro',
267+
mobilePreview: 'Pré-visualização móvel',
256268
},
257269
console: {
258270
title: 'Console ObjectStack',

packages/i18n/src/locales/ru.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,18 @@ const ru = {
253253
modeDashboard: 'Панель',
254254
undo: 'Отменить',
255255
redo: 'Повторить',
256+
brandingEditor: 'Редактор бренда',
257+
brandingExport: 'Экспорт JSON',
258+
brandingImport: 'Импорт JSON',
259+
brandingPreview: 'Предпросмотр',
260+
brandingSampleButton: 'Пример кнопки',
261+
brandingSampleText: 'Так будет выглядеть тема вашего бренда.',
262+
colorPalette: 'Палитра цветов',
263+
fontFamily: 'Шрифт',
264+
fontDefault: 'По умолчанию (Системный)',
265+
modeLight: 'Светлая',
266+
modeDark: 'Тёмная',
267+
mobilePreview: 'Мобильный предпросмотр',
256268
},
257269
console: {
258270
title: 'Консоль ObjectStack',

0 commit comments

Comments
 (0)