Skip to content

feat: column color system v1#5

Merged
Xcesius merged 1 commit intomainfrom
feat/customcolor-v1
Sep 3, 2025
Merged

feat: column color system v1#5
Xcesius merged 1 commit intomainfrom
feat/customcolor-v1

Conversation

@Xcesius
Copy link
Copy Markdown
Owner

@Xcesius Xcesius commented Sep 3, 2025

  • Make header labels readable over colored headers by repainting text on top with high-contrast color and badge-aware layout
  • Add per-column text (foreground) color overrides with context menu controls (black/white/custom/auto)
  • Add global setting: High-contrast text on colored columns; applies to headers and cells when no explicit text color is set
  • Add Settings option: Header minimum width (px); apply on Save and on startup
  • Fix workspace crash: ensure workspace item loads via _open_in_tab so self.tableView is valid before rendering
  • Config: persist new settings (high_contrast_column_text_enabled, header_min_section_size) and column text color overrides (fg)

Also includes minor refactors and safeguards in painting paths.

- Make header labels readable over colored headers by repainting text on top with high-contrast color and badge-aware layout
- Add per-column text (foreground) color overrides with context menu controls (black/white/custom/auto)
- Add global setting: High-contrast text on colored columns; applies to headers and cells when no explicit text color is set
- Add Settings option: Header minimum width (px); apply on Save and on startup
- Fix workspace crash: ensure workspace item loads via _open_in_tab so self.tableView is valid before rendering
- Config: persist new settings (high_contrast_column_text_enabled, header_min_section_size) and column text color overrides (fg)

Also includes minor refactors and safeguards in painting paths.
Copilot AI review requested due to automatic review settings September 3, 2025 18:43
@Xcesius Xcesius merged commit 9941f98 into main Sep 3, 2025
1 check passed
Copy link
Copy Markdown
Contributor

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 introduces a comprehensive column color system for the table view with customizable background colors, text color overrides, and column letter labels. The implementation includes both UI controls for managing colors and the underlying infrastructure to persist and apply these settings across table views.

Key changes:

  • Column color system with per-column background and text color overrides
  • Excel-style column letters (A, B, C) overlay on headers with toggle option
  • Settings UI for managing color preferences, custom palette, and header minimum width

Reviewed Changes

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

Show a summary per file
File Description
ui.py Adds settings UI controls, color management logic, and workspace loading fixes
custom_widgets.py Implements column color rendering in headers and cells, context menu color controls
config_manager.py Adds default configuration for column color features
config.json Example configuration with color overrides and new settings
column_letters.py Utility function to convert column indices to Excel-style letters
tests/test_column_letters.py Test coverage for the column letters conversion function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread custom_widgets.py
# --- Frozen Column View Setup ---
self.frozen_column_view = OverlayTableView(self)
self.frozen_column_view.setItemDelegate(NoHoverDelegate())
self.frozen_column_view.setItemDelegate(NoHoverDelegate(self))
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The NoHoverDelegate constructor now expects a parent parameter, but the original instantiation at line 487 in the init method doesn't pass one. This will cause a TypeError since NoHoverDelegate inherits from QStyledItemDelegate which expects a parent parameter.

Copilot uses AI. Check for mistakes.
Comment thread custom_widgets.py
# --- Frozen Row View Setup ---
self.frozen_row_view = OverlayTableView(self)
self.frozen_row_view.setItemDelegate(NoHoverDelegate())
self.frozen_row_view.setItemDelegate(NoHoverDelegate(self))
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Similar to the previous comment, this NoHoverDelegate instantiation now passes self as a parent parameter, but this creates an inconsistency with other uses in the codebase and may not be the intended API change.

Copilot uses AI. Check for mistakes.
Comment thread ui.py
Comment on lines +2010 to +2011
# This will set current context, assign self.tableView, and display the data
self._open_in_tab(target_path, binding, df)
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The method _open_in_tab is called but may not exist or may not accept these parameters. This could cause an AttributeError at runtime if the method signature doesn't match the expected parameters (target_path, binding, df).

Copilot uses AI. Check for mistakes.
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