Skip to content

Keep server image order within a template in the carousel - #1744

Merged
Robbie1977 merged 1 commit into
masterfrom
fix/carousel-keep-server-order
Sep 15, 2026
Merged

Robbie1977 merged 1 commit into
masterfrom
fix/carousel-keep-server-order

Conversation

@Robbie1977

@Robbie1977 Robbie1977 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

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 unused carouselImageIdOf() 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_00003748 with JRC2018U loaded. The first Available Image should be VFB_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.

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
@Robbie1977
Robbie1977 merged commit 58dfbe4 into master Sep 15, 2026
2 of 3 checks passed
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.

1 participant