Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracks added via GUI in non-admin JBrowse Web don't get categorized in session tracks #1991

Closed
garrettjstevens opened this issue May 19, 2021 · 3 comments · Fixed by #2001
Closed
Labels
bug Something isn't working

Comments

@garrettjstevens
Copy link
Collaborator

If you add a track with the add track widget, it doesn't end up in the "Session tracks" section of the track selector, even though it is a session track.

Shown below, I added a track (called "Track added via widget") in JBrowse Web non-admin mode, and it shows up in the top-level "Tracks" category instead of "Session tracks." If I copy the track, it does properly end up in the "Session tracks" category.

image

@garrettjstevens garrettjstevens added the bug Something isn't working label May 19, 2021
@cmdcolin
Copy link
Collaborator

good catch...this has existed for awhile

this patch should be a fix for it

diff --git a/plugins/data-management/src/AddTrackWidget/components/AddTrackWidget.tsx b/p>
index bf7b9b99c..491b72699 100644
--- a/plugins/data-management/src/AddTrackWidget/components/AddTrackWidget.tsx
+++ b/plugins/data-management/src/AddTrackWidget/components/AddTrackWidget.tsx
@@ -61,7 +61,7 @@ function AddTrackWidget({ model }: { model: AddTrackModel }) {

     const trackId = `${trackName
       .toLowerCase()
-      .replace(/ /g, '_')}-${Date.now()}`
+      .replace(/ /g, '_')}-${Date.now()}-sessionTrack`

It's kind of a silly hidden-metadata-method to define session tracks inside the trackId itself

@garrettjstevens
Copy link
Collaborator Author

Will that matter on desktop, where the widget adds the tracks to the root config?

@cmdcolin
Copy link
Collaborator

it could be conditional on adminMode to fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants