-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component Versioning #398
Comments
|
Looks good 👍 |
Could you clarify what problems this functionality would solve? Is it for writers who accidentally lose work due to a bad connection or a bad key press? Or is it more for writers working on features who would like access to multiple versions? Would components have unlimited versions? Are versions created on save? Can end users choose which version they would like to revert to? If not, how does Kiln know which is the correct version? Is it automatically the most recent version? I'm open to talking about this in person if its easier than using GitHub! |
@amycheng this is for when a developer updates the
The problem is that when schema's change templates usually do as well. The aim of this is to provide Amphora a way of knowing which version of a component's data we're dealing with and then providing a transformation if some change is necessary to get a component to the most recent version.
With this method you could actually update ALL your component's instance by just performing a GET to each instance. Otherwise components will be upgraded on the fly as they're requested by users. |
The Ad Team would LOVE this. Currently right now if we want to ad a new ad unit to an article, we have to back scratch all of the old articles to add a new instance of the ad component to each article. this would allow us to create a new instance on the fly if an article was lacking. |
@jonwinton thnxs for clearing things up. The proposed requirements look fine to me. I'd be interested to learn what the logic for "upgrading" a components data would look look like. Would it also entail comparing the |
Yes, to what @vicfriedman said. This would be essential for Ads. |
@amycheng the only thing that Amphora actually requires for a component is a The upgrade logic would be something like:
So basically, if your component is on version 1.4 and your schema is at 2.2, let's assume there are transforms for: 1.1, 1.6, and 2.1. Since you're component doesn't need the transform for 1.1, we won't run it, but we will run the 1.6 and 2.1 transforms. |
sounds good—would component-upgrading be done through API calls to Amphora (as opposed to Scratch)? |
@mheiber upgrades would just be done (as a low-level thing in amphora-core) when you GET the data (for json, rendering, etc etc) |
@mheiber but yes, you could make a utility (clay-cli, anyone?) that would just do a GET to every instance of a component. |
Question appears to be answered, moving to triage. |
What are the requirements for component versioning?
The text was updated successfully, but these errors were encountered: