Skip to content
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

Unpublishing for the editorial workflow #727

Closed
erquhart opened this issue Oct 23, 2017 · 16 comments · Fixed by #2914
Closed

Unpublishing for the editorial workflow #727

erquhart opened this issue Oct 23, 2017 · 16 comments · Fixed by #2914

Comments

@erquhart
Copy link
Contributor

- Do you want to request a feature or report a bug?

feature

- What is the current behavior?

Published posts cannot be unpublished.

- What is the expected behavior?

User should be able to unpublish a published post:

  • Push a commit to the published branch to remove the entry
  • Create a new branch with an additional commit to re-add the removed entry
  • PR the new branch
  • Set status in the editorial workflow to Ready to Publish
@t1merickson
Copy link

IMO, this feels to me like a critically basic action for a CMS. Any action I take, I should be able to undo.

@erquhart
Copy link
Contributor Author

What's really funny is this was actually discussed in the very first CMS issue - check out this comment: #1 (comment)

@erquhart
Copy link
Contributor Author

erquhart commented Dec 9, 2017

I discovered on accident that we already have everything we need to do this through what is ultimately a bug: every save in the CMS results in a commit, with or without actual changes to the entry. (And yeah we should fix that.) So currently we can trivially unpublish in the workflow as follows:

  • Persist a change, same action as saving, which results in a PR in the EW (this step isn't necessary if the entry already has unpublished changes in the workflow)
  • Delete the entry itself (leaving the PR with the current entry content open)
  • Rejoice

This removes the file from the published branch, and leaves the entire entry in the "Draft" column of the workflow. We should probably drop unpublished items in the Ready column instead.

@nodox
Copy link

nodox commented Mar 15, 2018

What is the status of this issue? Would love a way to unpublished a post after a fixed amount of time has past. Think expiring job posts.

@erquhart
Copy link
Contributor Author

It's open for anyone to pick up if you're interested in working on it. Note that this ticket would cover manual unpublishing - scheduled publishing, which would pave the way for scheduled unpublishing - is discussed #263.

@lizzzp1
Copy link

lizzzp1 commented Mar 5, 2019

Could I take this?

@erquhart
Copy link
Contributor Author

erquhart commented Mar 7, 2019

@lizzzp1 all yours! The steps you'll want to take are outlined in a comment above: #727 (comment)

Sent with GitHawk

@lizzzp1
Copy link

lizzzp1 commented Mar 17, 2019

@erquhart is there a way to run just what you need? Running yarn start that runs everything, but it eats up my cpu :(

@erquhart
Copy link
Contributor Author

@talves any chance this ^^ is due to the new builds? On mobile right now, don't recall how it impacted the dev tasks.

Sent with GitHawk

@talves
Copy link
Collaborator

talves commented Mar 18, 2019

CPU or the issue itself? Not sure on either one.

Let's bring in the fixes and see if those were causing the issue.

@erquhart
Copy link
Contributor Author

erquhart commented Apr 2, 2019

@lizzzp1 we've played with our builds a bit, can you try again and see if the issue persists? It shouldn't be so resource intensive that a reasonably spec'd machine can't handle it. We don't have a great development workflow that doesn't include all modules, unfortunately.

@lizzzp1
Copy link

lizzzp1 commented Apr 5, 2019

@erquhart will do!

@lizzzp1
Copy link

lizzzp1 commented Apr 11, 2019

@erquhart it's noticeably better. Thanks!

@lizzzp1
Copy link

lizzzp1 commented May 5, 2019

@erquhart Wondering if I could get a nudge in the right direction in terms of what code this touches and how to test locally. 😬 I was trying to test a bit on my site, but not seeing the issue, but maybe I'm just not fully understanding.

@erquhart
Copy link
Contributor Author

erquhart commented May 9, 2019

You'd need to have some understanding of how the CMS works as a user, specifically the editorial workflow. The workflow allows your entries to be pull requests until you "publish" them, which merges the pull request and generally results in your site rebuilding and the published item going live.

This ticket is about adding "unpublish" functionality for items that are already published, so it will touch the GitHub backend (packages/netlify-cms-backend-github) and probably be triggered through the editor toolbar, where a dropdown currently contains the "publish" command - the toolbar component is here: https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants