Skip to content

feat(grid): add boolean cell checkbox toggle - #5100

Open
difagume wants to merge 3 commits into
t8y2:mainfrom
difagume:feat/boolean-cell-checkbox
Open

feat(grid): add boolean cell checkbox toggle#5100
difagume wants to merge 3 commits into
t8y2:mainfrom
difagume:feat/boolean-cell-checkbox

Conversation

@difagume

@difagume difagume commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

Boolean-typed columns (boolean / bool / bit / bit(1)) in the data grid now render as a clickable checkbox instead of raw text.

  • Click the checkbox in the canvas grid to cycle the value: true -> false -> null (nullable columns) -> back to true.
  • The same toggle is available in the DOM grid cells.
  • Keyboard entry and double-click text editing are suppressed for boolean columns in favor of the toggle interaction.
  • A new dataGridBooleanColumn helper centralizes type detection, value normalization, and tri-state cycling logic.

Change Type

  • New feature
  • Bug fix
  • Performance optimization
  • Code refactoring
  • Documentation update
  • CI / Build

Frontend Change

  • This PR changes the frontend; a screenshot / recording is attached below.

Demo

check-boolean.webm

Files Changed

File Change
apps/desktop/src/lib/dataGrid/dataGridBooleanColumn.ts New helper: boolean column detection, value normalization, and tri-state cycle logic
apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts Render themed checkbox for boolean cells, centered null text, strike-through for deleted rows
apps/desktop/src/components/grid/DataGrid.vue Wire canvas and DOM click handlers to toggle boolean values; skip text editing for boolean columns
apps/desktop/src/composables/useDataGridEditor.ts Add cycleBooleanCellValue and allow explicit boolean values through the edit pipeline
packages/app-tests/dataGridBooleanColumn.test.ts Unit tests for type detection, normalization, and both nullable / non-nullable cycle orders

Verification

  • make check passed
  • make cargo-check-fast passed
  • Relevant tests passed

Verification details:

  • pnpm exec vitest run packages/app-tests/dataGridBooleanColumn.test.ts packages/app-tests/canvasDataGridRenderer.test.ts - 13 tests passed
  • pnpm typecheck - passed

Related Issue

No related issue.

@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 Jul 31, 2026
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.

1 participant