Open anulman opened 4 years ago
Hey @anulman the functionality currently does not exist but the API exists and it would be fairly easy to implement. I only worry about how easy it would be to delete a theme. I will have to plan more on how to make it safe.
Oooooh, nice to know I can drop down to the raw API! Thanks @tanema :)
As for how to wrap it safely within Theme Kit—are there any specific concerns? I imagine it's probably a similar API / developer experience as being discussed in #670. To add an additional layer of "developer intent", perhaps it should be its own command (e.g. delete
or destroy
) vs. an option-less remove
?
I need to make sure that someone doesn't do it by accident by testing commands or something like that. It definitely needs to be its own command (or like hide it below 2 flags to make it safer haha).
For instance, if someone were to accidentally run that, especially on their production live theme, and they didnt have copies, it would take down their store for a very long time so a command as destructive as this needs some planning.
Oh for sure! Not allowing it on the production live theme at all is probably a good idea.
Anyway, no rush—I'm sure y'alls have plenty of other priorities. We'll keep an eye on this issue in the interim!
Is your feature request related to a problem? Please describe. I am trying to configure a CI/CD flow using GitHub for my store, so our several developers can work concurrently on features and fixes on separate branches (e.g. adding a cart abandonment modal; replacing a plugin that is slowing down the page...).
Describe the solution you'd like I would like to use Travis CI on our pull requests to create branch-specific themes and publish them to our development store. Then developers and non-developers alike can comment on the changes in our Github PR. Once merged, we would have Travis publish to our production store and tear down the temporary theme files.
Describe alternatives you've considered We have considered using a subset of themes per developer, but this breaks when one developer is working on several changes in progress (which theme is deployed for which PR?)
We have also considered manually deleting themes when we reach the 100 theme limit, and while that would "work" the error messages from CI would either be frequent enough to be annoying (if the developer goes in to delete one theme, hopefully not one currently in use!) or take too long that team members would avoid the work.