Skip to content

Conversation

@jrobinso
Copy link
Contributor

No description provided.

Copy link
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 pull request refactors the track border drawing mechanism in IGV, moving from individual track-level border rendering to a centralized approach managed by the DataPanelPainter. The changes consolidate border preferences and implement a new configurable border drawing system.

Changes:

  • Introduced new centralized preference settings for track borders (TRACK.DRAW_BORDERS and TRACK.BORDER_COLOR)
  • Removed individual border drawing logic from multiple track renderers (FeatureTrack, CoverageTrack, XYPlotRenderer, IGVFeatureRenderer)
  • Implemented centralized border rendering in DataPanelPainter with improved graphics clipping

Reviewed changes

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

Show a summary per file
File Description
src/main/java/org/igv/ui/panel/DataPanelPainter.java Implements centralized border drawing logic with configurable preferences and improved graphics clipping
src/main/java/org/igv/ui/panel/DataPanel.java Removes old border drawing code and commented out component border
src/main/java/org/igv/prefs/Constants.java Adds new track border constants and reorganizes border-related preferences
src/main/java/org/igv/prefs/IGVPreferences.java Adds preference migration logic from old border preferences and removes default constructor
src/main/resources/preferences.tab Updates preference definitions to reflect new border settings
src/main/java/org/igv/track/FeatureTrack.java Removes track-specific border drawing methods and static drawBorder field
src/main/java/org/igv/track/DataTrack.java Adds dark mode support for zoom-in text color
src/main/java/org/igv/track/SequenceTrack.java Adds gap spacing for translated sequences
src/main/java/org/igv/sam/CoverageTrack.java Removes border drawing and adds dark mode text color support
src/main/java/org/igv/sam/AlignmentRenderer.java Adds dark mode support for group divider color
src/main/java/org/igv/renderer/XYPlotRenderer.java Removes border drawing logic and fixes yLineGraphics reference
src/main/java/org/igv/renderer/SequenceRenderer.java Adds gap constant and applies it to translated sequence positioning
src/main/java/org/igv/renderer/IGVFeatureRenderer.java Removes drawBoundary field and related rendering code
src/main/java/org/igv/renderer/GenotypeRenderer.java Removes drawBoundary initialization
src/main/java/org/igv/renderer/DynSeqRenderer.java Removes unused import
src/test/java/org/igv/sam/AlignmentTileLoaderTest.java Updates test to use new IGVPreferences constructor
test/sessions/schatz_skbr3_pacbio_sampled.xml Updates test session file with new viewport and track configuration

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

this.parent = parent;
this.defaults = defaults;
this.userPreferences = userPreferences == null ? new HashMap<>() : userPreferences;
migrateUserPreferences();
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The migration is called in the constructor, which means it runs every time an IGVPreferences instance is created. Consider whether this should only run once globally or if migration state should be tracked to avoid repeated execution.

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

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


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


private void init() {
setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 200, 200)));
// setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 200, 200)));
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

Commented-out code should be removed rather than left in the codebase. If this border functionality might be needed in the future, it should be documented in a commit message or issue tracker, not left as commented code.

Suggested change
// setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 200, 200)));

Copilot uses AI. Check for mistakes.
Comment on lines 39 to 42
public static final Color GROUP_GAP_COLOR = Globals.isDarkMode() ? Color.darkGray : UIConstants.LIGHT_GREY;
private static Logger log = LogManager.getLogger(AttributePanel.class);


Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The constant GROUP_GAP_COLOR is defined but never used in the visible diff. If this constant is intended to replace uses of UIConstants.LIGHT_GREY in this file, ensure all references are updated. The code at line 112 still uses GROUP_BORDER_COLOR instead.

Suggested change
public static final Color GROUP_GAP_COLOR = Globals.isDarkMode() ? Color.darkGray : UIConstants.LIGHT_GREY;
private static Logger log = LogManager.getLogger(AttributePanel.class);
private static Logger log = LogManager.getLogger(AttributePanel.class);

Copilot uses AI. Check for mistakes.
jrobinso and others added 3 commits January 15, 2026 14:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jrobinso jrobinso merged commit aa9b368 into main Jan 15, 2026
2 checks passed
@jrobinso jrobinso deleted the borders branch January 15, 2026 22:55
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