Skip to content

feat: Add editable right sidebar with multi-row support#20

Merged
datlechin merged 5 commits into
mainfrom
feat/editable-right-sidebar
Jan 15, 2026
Merged

feat: Add editable right sidebar with multi-row support#20
datlechin merged 5 commits into
mainfrom
feat/editable-right-sidebar

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Implements editable right sidebar functionality matching TablePlus behavior.

Features

  • Editable fields with native macOS styling
  • Multi-row editing support
  • SQL function support (NOW(), CURRENT_TIMESTAMP, etc.)
  • Immediate save on Cmd+S
  • NULL/DEFAULT value handling

Files Changed

  • New: MultiRowEditState.swift, EditableFieldView.swift
  • Modified: RightSidebarView.swift, MainContentView.swift, MainContentCoordinator.swift

- Implement editable fields in right sidebar for table rows
- Add multi-row editing with 'Multiple values' support
- Support SQL functions (NOW(), CURRENT_TIMESTAMP, etc.)
- Add native macOS form styling with TextField and Menu
- Include immediate save on Cmd+S
- Handle NULL, DEFAULT, and SQL function values
- Preserve edit state during data refresh to prevent UI flashing

New files:
- MultiRowEditState.swift for edit state management
- EditableFieldView.swift for reusable field components

Modified files:
- RightSidebarView.swift with editable/readonly modes
- MainContentView.swift with save handlers and SQL generation
- MainContentCoordinator.swift with transaction support
- MainContentView+Bindings.swift with sidebar state helpers
Copilot AI review requested due to automatic review settings January 15, 2026 09:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements an editable right sidebar for row editing, matching TablePlus behavior. The sidebar allows users to edit fields with native macOS styling, supports multi-row editing, SQL functions, NULL/DEFAULT values, and immediate save via Cmd+S.

Changes:

  • Adds multi-row edit state management with field-level tracking
  • Introduces editable field components with native macOS styling and menu support
  • Updates sidebar view to switch between read-only and editable modes based on context

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
MultiRowEditState.swift New state management class for tracking pending edits across multiple selected rows
EditableFieldView.swift New reusable editable field component with native macOS styling and SQL function support
RightSidebarView.swift Modified to support editable and read-only modes, integrating with the new edit state
MainContentView.swift Added sidebar edit state management, save handlers, and SQL generation for updates
MainContentCoordinator.swift Added transaction-based execution method for sidebar changes
MainContentView+Bindings.swift Added helper properties for sidebar editability state

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TablePro/Views/RightSidebar/RightSidebarView.swift Outdated
Comment thread TablePro/Views/RightSidebar/RightSidebarView.swift Outdated
Comment thread TablePro/Views/Main/MainContentCoordinator.swift Outdated
Comment thread TablePro/Views/MainContentView.swift Outdated
Comment thread TablePro/Views/RightSidebar/EditableFieldView.swift
datlechin and others added 4 commits January 15, 2026 17:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants