Code Monkey home page Code Monkey logo

Comments (6)

kptdobe avatar kptdobe commented on July 1, 2024

I would say we also need the capability to unpublish a page which has been accidentally published and should not be available yet.

from helix-sidekick.

rofe avatar rofe commented on July 1, 2024

@kptdobe right, so maybe we need 2 distinct plugins:

  • Preview: Delete deletes the resource from both preview and live buckets, then redirects to the homepage
  • Live: Unpublish deletes the resource from the live bucket only, then redirects to the preview page

wdyt?

from helix-sidekick.

kptdobe avatar kptdobe commented on July 1, 2024

Technically yes, but not sure how the end-user would understand that.
As a user, you do not really care about the file still being stored in the preview bucket.
Thinking about use cases, I only see 2:

  1. end-user sees an article on the production website that has nothing todo here yet, you want to un-publish it.
  2. end-user deletes the source file and probably expects the page to disappear from the site.

from helix-sidekick.

rofe avatar rofe commented on July 1, 2024
  1. end-user sees an article on the production website that has nothing todo here yet, you want to un-publish it.

Yes. The sidekick should offer an Unpublish action if it detects that the page is published (i.e. in the live bucket)

  1. end-user deletes the source file and probably expects the page to disappear from the site.

Yes in theory, however in reality, we can't hook into the "backend UI" (SP, gDrive) to warn the user of the consequences of deleting/moving a source document. Such could also be an accident, and the end-user may later notice their mistake and restore the document from the trash. So we shouldn't auto-delete anything in the preview and live buckets based on such an event, but instead give the end-user the ability to clean up manually.

Evolved from #76 (comment):

  • All environments:
    • Hide Edit if there is no source document
    • Hide Publish if there is no source document
  • Preview:
    • Hide Reload if there is no source document
    • Show Delete if there is no source document: deletes the resource from both preview and live buckets, then redirects to the homepage
    • Show Unpublish if the page is published: deletes the resource from the live bucket, no redirect
  • Live/Production:
    • Show Unpublish if the page is published (implicit on Live): deletes the resource from the live bucket, then redirects to the preview page

from helix-sidekick.

rofe avatar rofe commented on July 1, 2024

Note: Unpublish will currently only work after the source document has been deleted (or moved).

from helix-sidekick.

trieloff avatar trieloff commented on July 1, 2024

🎉 This issue has been resolved in version 3.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from helix-sidekick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.