frontend icon indicating copy to clipboard operation
frontend copied to clipboard

wip: migrate() should accept newer versions of a document

Open kulla opened this issue 1 year ago • 3 comments

See https://linear.app/serlo/issue/PE-151/bug-migration-algorithm-does-not-accept-newer-versions

kulla avatar Sep 13 '24 10:09 kulla

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

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Sep 13, 2024 10:56am

vercel[bot] avatar Sep 13 '24 10:09 vercel[bot]

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 105.21 KB (-1 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

github-actions[bot] avatar Sep 13 '24 10:09 github-actions[bot]

Hm, right now function migrate ensures it will return type StorageFormat. Changing it like suggested would mean it can also return other (unknown) types.

The two use cases where I could see this happen:

  • Editor version is downgraded but some content in the newer version was already created
  • Copy & paste content across platforms where the editor versions do not match

I am not sure it we want to be more strict or loose with the type. But I am leaning more towards being strict and failing early.

LarsTheGlidingSquirrel avatar Sep 16 '24 10:09 LarsTheGlidingSquirrel

keeping branch as reference for the issue but closing PR

elbotho avatar Nov 13 '24 15:11 elbotho