Skip to content

Conversation

@johnleider
Copy link
Member

Summary

Adds priority support to banner system so important banners show first.

Changes

  • Add priority?: number to VOneBanner interface
  • Change banner selection from find() to filter()sort() → take first
  • Sort banners by priority (high first), then by created_at (newest first)
  • Existing 3-day cooldown logic preserved

How it works

  • Banners with higher priority (2 > 1 > 0) show first
  • Among same priority, newest banner wins
  • Default priority is 0

Related

  • Requires CosmicJS field (already added by John)
  • API changes in separate PR

…at DESC

- Add priority field to VOneBanner interface
- Change banner selection from find() to filter/sort/first
- Sort banners by priority (high first), then by created_at (newest first)
- Maintains existing cooldown logic (3 days)
CosmicJS returns radio button values as { key, value } objects.
Updated interface and sorting logic to handle both formats.
@johnleider johnleider merged commit c068300 into master Jan 29, 2026
1 check passed
@johnleider johnleider deleted the feat/banner-priority branch January 29, 2026 17:09
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