Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… in tests Update ViewConfigPanel tests to account for toolbar, navigation, records, and appearance sections now being defaultCollapsed: true. Add fireEvent.click() calls to expand these sections before accessing child elements. Also update the 'collapses and expands Appearance section' test to reflect the new default collapsed state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ntrol, section icons, subsections, and improved spacing - Add 'summary' ControlType with summaryText and onSummaryClick support - Add icon and subsections support to ConfigSection - Update SectionHeader to render icons alongside titles - Add summary field renderer with gear button in ConfigFieldRenderer - Increase section spacing (space-y-0.5 → space-y-1, separator my-1 → my-3) - Add subsection rendering in ConfigPanelRenderer - Set defaultCollapsed: true for toolbar, navigation, records, appearance sections - Update ViewConfigPanel and ObjectView tests to expand collapsed sections - Add tests for summary control, section icons, subsections, spacing Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…mmary gear, and subsections Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 仔细评估是否已经完成了任务中要求的所有开发 |
…y chip (#7) - ConfigRow: add label maxWidth (45%), text truncation with title tooltip for both label and value - Toolbar section: add summary chip showing "X of Y enabled" at top of expanded section - Add toolbarEnabledCount i18n key to all 10 locales - Update view-config-schema tests for new _toolbarSummary field Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Evaluated all 8 requirements from the issue checklist. Items #4 (ConfigRow layout — label maxWidth, text ellipsis with overflow tooltip) and #7 (toolbar toggles merged into summary chip — "X of Y enabled") were missing. Both are now implemented in commit Updated status — all 8 items complete:
|
There was a problem hiding this comment.
Pull request overview
This PR upgrades the console config panel UX toward an Airtable-style progressive disclosure model by adding new schema capabilities (summary rows, icons, nested subsections) and updating the renderer/layout and related tests.
Changes:
- Extend config-panel schema to support a new
summarycontrol type plus sectioniconandsubsections. - Update config panel UI primitives/renderers (SectionHeader, ConfigRow, ConfigPanelRenderer, ConfigFieldRenderer) to render icons, summary rows, nested subsections, and adjusted spacing.
- Add default-collapsed behavior for several View config sections and introduce a toolbar “X of Y enabled” summary chip, updating tests and i18n keys.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/i18n/src/locales/ar.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/de.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/en.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/es.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/fr.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/ja.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/ko.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/pt.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/ru.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/i18n/src/locales/zh.ts | Adds toolbarEnabledCount translation key for toolbar summary chip |
| packages/components/src/types/config-panel.ts | Extends schema types with summary control + section icons + subsections |
| packages/components/src/custom/section-header.tsx | Adds optional section icon rendering |
| packages/components/src/custom/config-row.tsx | Constrains/truncates label/value with tooltip titles |
| packages/components/src/custom/config-panel-renderer.tsx | Adjusts section spacing and renders nested subsections |
| packages/components/src/custom/config-field-renderer.tsx | Implements summary control rendering with gear icon |
| packages/components/src/tests/config-primitives.test.tsx | Adds SectionHeader icon test coverage |
| packages/components/src/tests/config-panel-renderer.test.tsx | Adds tests for icons/subsections/summary/spacing |
| apps/console/src/utils/view-config-schema.tsx | Enables default-collapsed sections + toolbar enabled-count chip |
| apps/console/src/tests/view-config-schema.test.tsx | Updates expected toolbar field order (includes _toolbarSummary) |
| apps/console/src/tests/ViewConfigPanel.test.tsx | Updates tests to expand now-collapsed sections before assertions |
| apps/console/src/tests/ObjectView.test.tsx | Updates tests to expand now-collapsed sections before interactions |
| generalHint: 'Titre, description et type de la vue', | ||
| toolbar: 'Barre d\'outils', | ||
| toolbarHint: 'Recherche, filtre, tri, regroupement et bascule de densité', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the French locale. Please translate it for fr (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} sur {{total}} activés', |
| generalHint: 'Título, descripción y tipo de la vista', | ||
| toolbar: 'Barra de herramientas', | ||
| toolbarHint: 'Búsqueda, filtro, orden, agrupación y alternancia de densidad', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Spanish locale. Please translate it for es (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} de {{total}} habilitados', |
| {section.subsections?.map((sub) => { | ||
| if (sub.visibleWhen && !sub.visibleWhen(draft)) return null; | ||
| const subCollapsed = isCollapsed(sub.key, sub.defaultCollapsed); | ||
| return ( | ||
| <div key={sub.key} data-testid={`config-subsection-${sub.key}`} className="ml-1" role="group" aria-label={sub.title}> |
There was a problem hiding this comment.
ConfigSection.subsections is typed as recursive (ConfigSection[]), but the renderer only renders one level of subsections. Either render subsections recursively (so deeper nesting works), or constrain the type/API to a single nesting level to avoid a schema that can't be fully rendered.
| generalHint: '视图标题、描述和类型', | ||
| toolbar: '工具栏', | ||
| toolbarHint: '搜索、筛选、排序、分组和密度切换', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Chinese locale. Please provide a proper zh translation (and keep placeholder variables intact), or fall back to an English-only key in en via i18next fallback rather than shipping an untranslated string in zh.
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} / {{total}} 已启用', |
| generalHint: 'Название, описание и тип представления', | ||
| toolbar: 'Панель инструментов', | ||
| toolbarHint: 'Поиск, фильтр, сортировка, группировка и переключение плотности', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Russian locale. Please translate this string for ru (preserving {{count}} / {{total}}), instead of shipping an untranslated English phrase.
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} из {{total}} включено', |
| generalHint: 'Título, descrição e tipo da visualização', | ||
| toolbar: 'Barra de ferramentas', | ||
| toolbarHint: 'Pesquisa, filtro, ordenação, agrupamento e alternância de densidade', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Portuguese locale. Please translate it for pt (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} de {{total}} ativados', |
| generalHint: '보기 제목, 설명 및 유형', | ||
| toolbar: '도구 모음', | ||
| toolbarHint: '검색, 필터, 정렬, 그룹화 및 밀도 전환', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Korean locale. Please translate it for ko (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{total}}개 중 {{count}}개 활성화됨', |
| generalHint: 'Ansichtstitel, Beschreibung und Typ', | ||
| toolbar: 'Symbolleiste', | ||
| toolbarHint: 'Suche, Filter, Sortierung, Gruppierung und Dichteumschaltung', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the German locale. Please translate it for de (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} von {{total}} aktiviert', |
| generalHint: 'عنوان العرض والوصف والنوع', | ||
| toolbar: 'شريط الأدوات', | ||
| toolbarHint: 'البحث والتصفية والفرز والتجميع ومفاتيح الكثافة', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Arabic locale. Please translate it for ar (preserving {{count}} / {{total}}) so it reads naturally in RTL instead of showing an English phrase.
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{count}} من {{total}} مفعّلة', |
| generalHint: 'ビューのタイトル、説明、タイプ', | ||
| toolbar: 'ツールバー', | ||
| toolbarHint: '検索、フィルター、ソート、グループ、密度の切り替え', | ||
| toolbarEnabledCount: '{{count}} of {{total}} enabled', |
There was a problem hiding this comment.
toolbarEnabledCount is still in English in the Japanese locale. Please translate it for ja (preserving {{count}} / {{total}}).
| toolbarEnabledCount: '{{count}} of {{total}} enabled', | |
| toolbarEnabledCount: '{{total}} 件中 {{count}} 件が有効', |
Config panel was a flat wall of controls with no visual hierarchy. This adds progressive disclosure (collapse-by-default), a new
summarycontrol type, section icons, nested subsections, improved spacing, ConfigRow layout optimization, and a toolbar summary chip — bringing the panel closer to Airtable's layered settings UX.Schema types (
config-panel.ts)ControlType: 'summary'— renders label + summary text + gear icon, clickable to open sub-editorsConfigFieldgainssummaryText?: stringandonSummaryClick?: () => voidConfigSectiongainsicon?: ReactNodeandsubsections?: ConfigSection[]Components
SectionHeader— renders optional icon before title (aria-hidden)ConfigFieldRenderer— newsummarycase with<Settings>gear iconConfigPanelRenderer— section spacingspace-y-0.5→space-y-1, separatormy-1→my-3; renders nestedsubsectionswithrole="group"ConfigRow— label constrained tomax-w-[45%]withtruncateandtitletooltip for overflow; value constrained tomax-w-[55%]with same treatmentProgressive disclosure (
view-config-schema.tsx)defaultCollapsed: trueadded to toolbar, navigation, records, appearance sectionsToolbar summary chip
_toolbarSummarychip at the top showing "X of Y enabled" when expanded, giving at-a-glance status of toolbar togglestoolbarEnabledCounti18n key added to all 10 localesTests
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.