okjuan / vbook

0 stars 0 forks source link

Revisions: Make revision numbers consistent #29

Closed okjuan closed 3 weeks ago

okjuan commented 1 month ago

The current implementation is confusing because it uses two numbering systems. One that is in negative numbers because it is relative to the newest version of the post and the other in positive numbers that counts up from the first revision to the last. So, for example, revision 1 of 3 for tell-a-story-3 has URL https://okjuan.me/vbook/revs/tell-a-story-3/-3/ instead of https://okjuan.me/vbook/revs/tell-a-story-3/1

Fix by using positive numbers that increment, instead of negative numbers that decrement: e.g. https://okjuan.me/vbook/revs/tell-a-story-3/-3/ -> https://okjuan.me/vbook/revs/tell-a-story-3/-3/

Might be easy to do by adding revision_count + 1 (3 + 1) to revision_number (e.g. -3), which would give the positive version of the number (1).