-
Notifications
You must be signed in to change notification settings - Fork 401
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
fix: feature segments created with priority 0 are sent to bottom #4383
fix: feature segments created with priority 0 are sent to bottom #4383
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Docker builds report
|
Uffizzi Preview |
…rating on current segment
917ded1
to
3f1fb19
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4383 +/- ##
=======================================
Coverage 96.82% 96.83%
=======================================
Files 1165 1165
Lines 38568 38621 +53
=======================================
+ Hits 37345 37398 +53
Misses 1223 1223 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new tests look exhaustive enough to me. 👍
Changes
The previous PR here actually causes an issue because the FE always defaults to sending the priority as 0.
This PR is in part accounting for that, but also accounting for the fact that the
django-ordered-model
library that we are using doesn't enforce uniqueness on the priority so, when the priority is set in the save, any subsequent calls toto()
don't work because it early returns that it already exists at that priority. The issue is that we now likely have 2 feature segments at that priority. To resolve this, we first move the 'collision' feature segment down and out of the way before completing the save.How did you test this code?
Added a bunch more tests for all scenarios.