adobe / da-admin

Apache License 2.0
0 stars 4 forks source link

Versioning #6

Open auniverseaway opened 8 months ago

auniverseaway commented 8 months ago

As a content creator, I would like to be able to create versions of my documents so that I can reference them at any time.

Context

Thoughts: version on publish + adhoc version creation

Criteria of acceptance (MVP)

Create version (w/ optional label) Get version Restore version List versions

Out of scope

Compare - UI problem Auto-create on action - UI problem

auniverseaway commented 8 months ago

Additional thoughts

I think when a version is created should be a da-live problem to solve, while how a version is made rests on da-admin.

Thinking within the limits of S3 keys & prefixes and not wanting to make a separate index we have to maintain (at least for now), my high level thought to explore is that versions are just objects stored under the canonical current version.

Potential structure

/aemsites/da-block-collection/drafts/my-page.html
/aemsites/da-block-collection/drafts/my-page.html/my-page-1707435121.html
/aemsites/da-block-collection/drafts/my-page.html/my-page-1706135927.html

Other considerations

When we do CRUD operations with S3, we have to address all keys below the item we are trying to change. This means that moving my-page.html means also moving all the children. Same for renames, deletes, etc.

From a version ~naming~ labelling perspective, my thought is that we can use custom metadata. Custom metadata is maybe impossible for mutable data, but if we say a version has an immutable label, we would get labels for cheap / free from a request perspective.

Speaking of cheap / free. One DA goal is to have as few modalities as possible for people to learn:

  1. Browse list
  2. Edit page / sheet

If the above works, browsing a list of versions becomes no different than browsing a folder. I don't know how long that will last given that we'll have authorization, page props, etc. but it's worth noting.

Speaking of page props, while it's not supported today, there will be some sort of config / properties sidecar file that lives next to an html file that we will probably also store with the version.

Other high level thoughts / questions

What happens when we overwrite a page? I think we probably just keep all the timestamps and blend them together. DA doesn't even support rename right so overwriting / merging of two docs doesn't really exist right now. Speaking of rename:

What happens when we rename? I think we can probably keep the version names as is... it may be nice to say, "at this point in time, the file was called XYZ."

bosschaert commented 5 months ago

I think we can probably close this issue as the da-admin side of versioning is done AFAICS.