You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: position sorts should dictate the order that files are uploaded (#1449)
| 🚥 Resolves CX-3309, #1405,
#1367 |
| :------------------- |
## 🧰 Changes
With ReadMe Refactored the `position` value that we use in our API is
not _quite_ the same as it was pre-refactored because it dictates the
position that your page should be sorted within the `_order.yaml` file
that we create for you in Git. If `page-2` has a `position` of `2` and
is created _before_ `page-1`, which has a position of `1`, then the
`_order.yaml` file will have `page-2` sorted before `page-1` because it
came in first.
Pre-Refactored these `position` values were stored as the value you had
alongside the page in our database so a file with a `position` of `2`
would forever have that position until it explicitly changed.
The work I've done here is to change the way that rdme batches up its
API requests to ensure that we make these requests in the order of the
`position` value that we have present. If we don't have a `position`
then we'll fall back to the `slug` available, sorting it naturally
(ensuring that `page-10` is not sorted between `page-1 and `page-2`)
0 commit comments