Push only one Slice/Change to Prismic

Hello! We've recently upgrade our slice machine version (0.7.1) and now i see that the "Push to Prismic" button after saving to File System is no longer available and all changes must be push from the "Changes" section...
The thing is that i only want to push ONE Slice. For example, I have 4 changes (4 Slices) and i only need/want to push to Prismic one of those Slices... Is it posible? I know that since version 0.5.0 you have this "feature" of pushing multiple changes...
Thanks!

5 Likes

You can control your project codebase using git branches. Using git stash allows you to version your content models without pushing changes to your repository.

Hi Pau! Yeap, we already using git. I'll explain my situation a little better:
1- I created a branch from Main Changed 3 slices in slice machine (created 2 new fields), updated the codebase to use those 2 new fields. Pushed those 3 slices to Prismic. Created the PR, waiting for Review.

2- Proceed to a new ticket, again, I created a branch from Main Change 1 slice in slice machine (created 1 field), updated the codebase to use the new field. Now I have 4 changes (the 3 slices from point 1 and one from point 2). I want to Push to Prismic only this last slice (since the other changes/slices showed up as "Modified" because Prismic Repo has the "updated slices" from point 1 and because i'm in a new branch with the "old" codebase for those 3 slices.

Despite using Git/version control and branching... Why did you get rid of Pushing to Prismic Slice by Slice. Don't get me wrong, having the ability to push all at once is good, but also having the option to do it just for a few slices sounds better.

I understand. This product design decision was made with the new version of the Slice Machine, so it works like working on GitHub in the master branch. It's like working directly into production. We are continuously working toward improving the user experience in Slice Machine, which might include modifications to the Changes page. But we don't have any news for the moment.

I would also like to be able to push just a single file that has been changed for exactly the same reasons as @fernando.ferreyra. I've created a feature with a new custom type on branch A that the customer needs to review, or I need more data from our backend.
When I start working on branch B and want to push changes to prismic, I am required to delete the new custom type that's on branch A.

In this situation, the option to push a single slice/custom type would be a lot easier. For now, I need to switch to branch A to push my changes to prismic and then switch back to B to push them to GitHub. Which will not work when there is a branch C involved.

2 Likes

+1 same here

+1 Same here...
This is really hard to maintain when having a team of developers working on different features with slicemachine.

It s complicated for our team too. We cannot work on 2 different pages of our site at the same time. I dont know how it can work with larger teams (we are only 3 devs ! )

I am running into the same issue. I am really frustrated and concerned that the Prismic development team didn't realize this issue during testing of their own product. I know others have already mentioned the issue above, but I'll lay it out really clearly as the default answer from the Prismic team here is to just use Git and communicate better as a team, but those are not realistic answers that will actually work. I am only one developer working on prismic and I am even running into this problem:

  1. Branch 1: I add slice 1 in slice machine
  2. Branch 1: I push slice 1 to prismic
  3. Branch 1: I add data on a page that uses slice 1 on the prismic website
  4. I have to put the previous work on hold, so I switch to a new branch to work on a new slice
  5. Branch 2: Before I even begin any work, slice machine tells me that I have made changes. This is due to the fact that branch 2 doesn't have the slices data from branch 1 (since branch 1 hasn't been completed and pushed to staging). If I add another slice now and then push up the changes, it will add my new slice in prismic but it will also remove the slice (AND DATA) from branch 1, which is a horrible experience.

Please tell me you are putting some serious thought into finding a fast solution to this as the problem I have laid out is not uncommon and can lead to lots of lost data. Without a solution from the prismic team, this could easily be a reason for us to look around at what your competitors offer. Please figure this out soon!

1 Like

This is getting REALLY annoying...

I'm working only on the custom types but a co-worker is working on the "Cards" slice... So if i push my changes, the slice will be deleted in Prismic repo..
Yes... it's true that she can push her slice again (but this is a terrible UX if any stakeholder is testing the slice because It wont be available 'til someone push that slice again).

Please do something about it... Rollback this "feature"

+1 here too. It would be great to implement

@Pau Can we get any updates on whether this is on your to-do list or this simply will not change?
I'm running into this issue more and more, and it's very annoying.
Or maybe explain to us why this decision was made. Was it simply convenience on the backend, or an actual problem that was solved by this change?

As you can see from this thread, quite a few people miss the single change push, so I sure hope you guys are at least talking about it internally on how to help us manage our slicemachine projects.

Hi everyone,

I was just getting info on this for you. So good timing @gijs.

The team has some other priorities in the Slice Machine roadmap in the immediate future, BUT I can reassure you that they plan to look at this before the end of the year.

I can't share much about what the solution for this will look like, but I would love to have your input as to how you would like to see this functionality work. Got ideas? Got sketches? Please share them with us; we'd love to see them.

Towards the end of the year, when we start to dig into this, we'll take that info into account.

Thanks :slight_smile:

Hey Phil. Basically, go back to the previous/old fashion way that we had in Slice Machine v 0.3.8.
Where in each Slice and/or Custom Type, after you clicked "Save to File System" the caption for the button changed to "Push to Prismic" so you can only push THAT change to your Prismic Repo.

Thanks.

1 Like

Thanks for your feedback @fernando.ferreyra, I'll pass this on to the team.

Hi @Phil ,

Thanks for the update. Good to know that you guys are actually doing something with this feedback.

For me the current way is actually fine, if you guys can add a button per changed slice/custom type/page type to push only that change.
something like this would resolve all issues mentioned in this thread:


This is a screenshot from an older version of slicemachine

This way, everything you guys changed can stay, but just add a button per line to push the changes of that type.

Hopefully you guys can release this before the end of the year.

1 Like

Very clear. Thank you for the feedback. I'll pass this to the team and they will take this into consideration once they start working on this.

Thanks again.

@Phil I was thinking more about this and realised that al bulk selection would also be great.

By default the button in the top right could be "Push all changes".
If every row has a checkbox, we can select the changes we want to push. The button in the top right could now function as a "Push selected changes" or "Push X changes" where X is the amount of rows that are selected.

For the types this is a nice solution as those changes are displayed in a table. For the slices i could also be done with a checkbox on the top left or right.

A quick example:

2 Likes

That's a nice approach in terms of UI, and I think it's something the team is likely to do.

The difficulty that comes with this feature, and I think that's what the team (I'm not 100% this is why, so don't quote :joy:), is managing conflicts in terms of pushing changes when working in a team. I know their looking into the solutions for this as part of this change.

managing conflicts in terms of pushing changes when working in a team

Sorry for quoting, but this seemed interesting to me :slight_smile:

To me, not having the option to push selected changes actual causes problems working in a team. Conflicts while pushing can always occur if for example me and my coworker push different changes to the same custom type/slice at the same time. That can't be fixed by forcing us to push all changes at once.

Currently:
Me working on custom type/slice A cannot push my changes if my coworker has pushed changes to custom type/slice B. This forces us to, for example, make a separate branch with the changes and merge that to master/main. Only then we can safely push without deleting the others work.

When we are able to select changes:
Me working on custom type/slice A can select my changes and push them to Prismic without pushing a deletion of my coworkers changes on custom type/slice B.

This is not only a problem for teams, but also for just one developer. Changes on branch A are pushed to Prismic, when I try to push changes for feature B on a different branch I'm forced to revert or delete the changes on feature A.

I feel like I'm summarizing the issues mentioned in this thread, but it's just to illustrate how much this "push all" change has blocked us/me from rapid development. I need to push clients to review features, so I can resume work on another feature because of the conflicts that I can't work around.

Hopefully the team can prioritize this, so we can have a solution before the end of the year instead of starting to look at it at the end of the year.