Skip to content

Conversation

@jrobinso
Copy link
Contributor

@jrobinso jrobinso commented Dec 9, 2025

No description provided.

Copy link

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 configuration system to support grouped "track hub" style menu configuration from JSON files. The primary change is renaming the "sections" terminology to "groups" throughout the codebase to better align with track hub conventions, along with adding a sample JSON configuration file demonstrating the new grouped structure.

Key Changes

  • Renamed "sections" to "groups" across all track configuration code for consistency with track hub terminology
  • Added backwards compatibility in prepRegistryConfig to handle registries with or without explicit groups
  • Created a new sample JSON configuration file (mm10_sample.json) demonstrating grouped track organization

Reviewed changes

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

File Description
resources/tracks/mm10_sample.json New sample track configuration demonstrating grouped track hub format with genes and regulation categories
js/widgets/trackWidgets.js Refactored annotateTracks parameter and references from "sections" to "groups"; updated prepRegistryConfig to support grouped format with fallback
js/widgets/trackSelectionModal.js Renamed function parameter and all internal references from "sections" to "groups"; updated recursive rendering logic
js/widgets/trackSelectionListModal.js Renamed function parameter and flattening logic from "sections" to "groups" for consistency

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

"label": "Genes and Gene Predictions",
"tracks": [
{
"id": "HLTOGAannotvHg38v1",
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The track ID "HLTOGAannotvHg38v1" has inconsistent casing compared to the URL which contains "HLTOGAannotVsHg38v1" (note the capital "V" in "Vs"). Consider using consistent casing, such as "HLTOGAannotVsHg38v1" to match the URL filename.

Suggested change
"id": "HLTOGAannotvHg38v1",
"id": "HLTOGAannotVsHg38v1",

Copilot uses AI. Check for mistakes.
Comment on lines 30 to 36
<div class="bg-light text-center py-2 d-flex justify-content-between align-items-center" role="button" data-bs-toggle="collapse" data-bs-target="#collapseSection${index}" aria-expanded="true" aria-controls="collapseSection${index}">
<span style="font-size: 1.2rem;">${section.label}</span>
<span style="font-size: 1.2rem;">${group.label}</span>
<span id="collapseIcon${index}" class="bi bi-dash"></span>
</div>` : ''}
${level === 0 ?
`<div class="collapse show mt-3" id="collapseSection${index}">` :
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

[nitpick] For consistency with the refactoring from "sections" to "groups", consider renaming the HTML element IDs from collapseSection${index} to collapseGroup${index} to match the new terminology throughout the codebase.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jrobinso jrobinso merged commit 4074229 into master Dec 9, 2025
2 checks passed
@jrobinso jrobinso deleted the hubstyle_track_json branch December 9, 2025 19:28
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