Skip to content

Feat/crosshair guides#1

Merged
Xcesius merged 10 commits intomainfrom
feat/crosshair-guides
Aug 20, 2025
Merged

Feat/crosshair guides#1
Xcesius merged 10 commits intomainfrom
feat/crosshair-guides

Conversation

@Xcesius
Copy link
Copy Markdown
Owner

@Xcesius Xcesius commented Aug 20, 2025

No description provided.

Xcesius added 10 commits August 20, 2025 13:17
…column lines for the active cell\n- Highlight active headers; sync with frozen views\n- Settings dialog: toggle enable and set thickness\n- Persist in config (crosshair_enabled, crosshair_thickness)\n\nNo external deps; default enabled with 1px thickness.
…- Add /AGENTS.md and /*.txt rules\n- Preserve docs/*.md and tests fixtures by only ignoring root-level files
…\n\n- Ensure *.zip, *.bak, *.exe are ignored (already covered)\n- Ignore whole extracted_data/ and diff_reports/ directories\n- Keep docs and tests fixtures intact
…tal line in frozen column view for active row\n- Draw vertical line in frozen row view for active column\n- Ensures crosshair spans to first field when frozen
…ng + event filter on main and frozen viewports\n- Use hover pos for crosshair lines and header highlights\n- Fall back to selection when not hovering
…headers\n\n- New setting crosshair_hover_enabled with Settings dialog checkbox\n- Respect setting in event filter; fall back to selection-only\n- Draw crosshair lines into horizontal/vertical headers and frozen top header
…\n\n- Introduce OverlayTableView for frozen panes to paint crosshair after normal paint\n- Remove ad-hoc painting from main view; use callbacks for reliability
…ttings\n\n- Remove stub ConfigManager in custom_widgets; import from config_manager\n- Ensures header/selection behaviors respect saved config values
- Add node_modules/ to .gitignore to prevent future tracking
- Remove all node_modules files from Git repository
- Files will remain locally but won't be tracked by Git anymore
Copilot AI review requested due to automatic review settings August 20, 2025 12:55
@Xcesius Xcesius merged commit 8212ef6 into main Aug 20, 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 adds crosshair guides functionality to provide visual row/column highlighting in the table view. The feature helps users track their position in large datasets by drawing crosshair lines through the current cell and highlighting the corresponding headers.

Key changes include:

  • Crosshair guides with configurable thickness and hover behavior
  • Enhanced context menu with bulk row/column insertion and conditional math operations
  • Improved drag-and-drop support for opening .txt files

Reviewed Changes

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

File Description
ui.py Adds crosshair settings UI, drag-and-drop file opening, bulk insertion methods, and conditional math handling
custom_widgets.py Implements crosshair visual rendering, hover tracking, overlay painting system, and enhanced context menus
config_manager.py Adds default configuration values for crosshair guides and undo stack settings

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

Comment thread ui.py
self.config_manager.set_setting("crosshair_hover_enabled", self.crosshair_hover_checkbox.isChecked())
try:
thickness = int(self.crosshair_thickness_input.text())
except Exception:
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Using bare except Exception: is too broad and can mask unexpected errors. Consider catching specific exceptions like ValueError for invalid integer conversion.

Suggested change
except Exception:
except (ValueError, TypeError):

Copilot uses AI. Check for mistakes.
Comment thread ui.py
def _insert_n_columns(self, col_position: int, count: int):
for i in range(count):
# Auto-name columns; user can rename later
from PyQt6.QtWidgets import QInputDialog
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Import statement should be at the top of the file rather than inside the method. The QInputDialog import is also unused in this method.

Suggested change
from PyQt6.QtWidgets import QInputDialog

Copilot uses AI. Check for mistakes.
Comment thread ui.py
import pandas as pd
columns = list(self.data_frame.columns)
columns.insert(col_position + i, column_name)
new_data = {}
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Import statement should be at the top of the file rather than inside the method. Pandas is already imported at the top of the file as pd.

Suggested change
new_data = {}
columns = list(self.data_frame.columns)
columns.insert(col_position + i, column_name)
new_data = {}

Copilot uses AI. Check for mistakes.
Comment thread custom_widgets.py
# Minimal debug output to help trace selection -> payload mapping
try:
from config_manager import ConfigManager as _Cfg
if _Cfg().get_setting("debug_mode_enabled", False):
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Import statement should be at the top of the file rather than inside the method. ConfigManager is already imported at the top as AppConfigManager.

Suggested change
if _Cfg().get_setting("debug_mode_enabled", False):
if AppConfigManager().get_setting("debug_mode_enabled", False):

Copilot uses AI. Check for mistakes.
@Xcesius Xcesius deleted the feat/crosshair-guides branch August 23, 2025 19:12
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