Skip to content

feat(structure): remove dynamic toggle labels from table editor checkboxes (#8148) - #11150

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
lxk955:feat/8148-structure-editor-checkbox-labels
Oct 7, 2026
Merged

t8y2 merged 2 commits into
t8y2:mainfrom
lxk955:feat/8148-structure-editor-checkbox-labels

Conversation

@lxk955

@lxk955 lxk955 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #8148

When editing table structures and indexes, checkboxes for nullable (fields tab), unique (indexes tab), and concurrent (indexes tab) had dynamic text labels (是 / 否 via t("structureEditor.yes") : t("structureEditor.no")) that morphed between "Yes" and "No" upon toggling. In a tabular grid where the column header already specifies the attribute ("Nullable", "Unique", "Concurrent"), flipping text labels beside the checkboxes is counterintuitive and visually inconsistent with other columns such as Primary Key.

Changes

  • In TableStructureEditor.vue:
    • Removed dynamic <span>{{ ... ? yes : no }}</span> labels from the nullable column in the columns table, centering its cell and header to match the Primary Key column.
    • Removed dynamic <span>{{ ... ? yes : no }}</span> labels from the unique and concurrent columns in the indexes table, centering their cells and headers.
    • Added appropriate aria-labels to the checkbox inputs for accessibility.
  • In TableStructureEditor.metadataRevalidation.spec.ts:
    • Added a regression unit test verifying that the checkboxes do not render dynamic yes/no text spans upon toggling.

Verification

  • Tested with pnpm test apps/desktop/src/components/structure/__tests__/TableStructureEditor.metadataRevalidation.spec.ts (all 42 tests passed).
  • Tested concurrent transition, column selection copy, and primary key test suites (all passed).

@github-actions github-actions Bot added area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets labels Oct 7, 2026

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

维护者补丁(bce848256,基于 c23d5f4):为列表格的 primaryKey 复选框补上 :aria-label="t('structureEditor.primaryKey')",与本 PR 为 nullable 复选框建立的「裸复选框 + aria-label」模式保持一致(该 key 全部 12 个语言文件均已存在)。

核验:TableStructureEditor.metadataRevalidation.spec.ts(42 用例)、columnSelectionCopy / concurrentTransition spec(9 用例)全部通过,oxfmt 格式检查通过。其余审阅结论不变,CI 跑完后即可合并。

@t8y2
t8y2 merged commit 7e324bd into t8y2:main Oct 7, 2026
26 checks passed
@t8y2

t8y2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 7e324bd, will be released in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 包括但不限于索引设置的唯一列勾选调整

2 participants