Repository navigation
Keep server image order within a template in the carousel - #1744
Merged
Merged
Conversation
VFBquery now puts a template's own indexed domain image first, so the client-side id sort within a template would undo it. Keep the template ranking and fall back to the original position for ties. Refs VirtualFlyBrain/VFB2#500
This was referenced Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of VirtualFlyBrain/VFB2#500.
What changed:
orderCarouselElements()keeps the template ranking (loaded template, then JRC2018U, JRC2018VNCU, L1EM, L3CNS, then the rest by descending template id) but no longer re-sorts by image id within a template. Ties fall back to the original position. The unusedcarouselImageIdOf()is removed.Why: VFBquery now orders each template's images with the template's own indexed domain image first (VirtualFlyBrain/VFBquery#119). The client-side id sort would put it back at the end.
How to test: on a dev deployment with the VFBquery change, open
?id=FBbt_00003748with JRC2018U loaded. The first Available Image should beVFB_00102107(ME on JRC2018Unisex adult brain). Template grouping is unchanged: the loaded template comes first, and the hemibrain and JFRC2 images follow.Follow-ups: none beyond the VFBquery change and its cache refresh.