Closed aboodman closed 3 years ago
This is part of the spec. http://gibson042.github.io/canonicaljson-spec/
- MUST represent all integer numbers (those with a zero-valued fractional part)
- without a leading minus sign when the value is zero, and
- without a decimal point, and
- without an exponent, and
- without insignificant leading zeroes (as already required of all JSON numbers)
We can and probably should do what Figma did and use a big num under the hood and encode it using base96.
A better impl is outlined here https://observablehq.com/@dgreensp/implementing-fractional-indexing
We really need to change because our current model runs out of precision pretty fast
That's a long article :). Agree that this is what we should do.
On Tue, May 12, 2020 at 6:58 AM Erik Arvidsson notifications@github.com wrote:
We really need to change because our current model runs out of precision pretty fast
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rocicorp/replicache/issues/55#issuecomment-627468221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATUBBWZE45LHRDKWDP2YLRRF5Z5ANCNFSM4M6UHMUQ .
This issue exists in both lit-todo demo too.
Let's just fix this and create an npm repo
Fixed with 8da53e8c655dddc7dbaf847a286c684c41f39289