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

feat: incrementing sort order for strategies #4343

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jul 25, 2023

About the changes

Incrementing sort order for newly created strategies so that strategies with variants have predictable order:

  • first strategy gets index 0
  • every subsequent strategy gets incremented by 1 compared to the highest current sort order for the feature env
  • if you set sort order yourself it's respected and no increment happens. When you manually set sort order then multiple strategies can have identical sort order. Our own UI is never setting the order on add new strategy.

Important files

src/lib/db/feature-strategy-store.ts

Discussion points

I tried to keep this increment logic in one place (a store) so that most code can be unaware of it

@sonatype-lift
Copy link

sonatype-lift bot commented Jul 25, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@vercel
Copy link

vercel bot commented Jul 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jul 26, 2023 6:29am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Jul 26, 2023 6:29am

@kwasniew kwasniew merged commit 2b565ae into main Jul 26, 2023
10 checks passed
@kwasniew kwasniew deleted the sort-order-for-new-strategies branch July 26, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants