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

Add Unpublish button to page editor #319

Merged
merged 8 commits into from
Jan 3, 2025
Merged

Add Unpublish button to page editor #319

merged 8 commits into from
Jan 3, 2025

Conversation

APB9785
Copy link
Collaborator

@APB9785 APB9785 commented Dec 18, 2024

Screenshot 2025-01-02 at 3 43 07 PM

  • Adds unpublish button
  • Adds draft/published status badge in header
  • Unpublished pages show as "Draft"

@APB9785 APB9785 requested a review from leandrocp December 18, 2024 18:57
@APB9785 APB9785 self-assigned this Dec 18, 2024
@leandrocp
Copy link
Contributor

With these changes would be interesting to stop redirecting to the index page after publishing a page. That behavior is not really necessary and a bit annoying.

@APB9785
Copy link
Collaborator Author

APB9785 commented Dec 18, 2024

With these changes would be interesting to stop redirecting to the index page after publishing a page. That behavior is not really necessary and a bit annoying.

@leandrocp good to know! I was also thinking the same thing but wasn't sure if there was a reason for that redirect. it should be even easier to do it that way now, and will align with publishing.

one other question though: is the recent change to save changes on publish, still needed? if we're not navigating away, then users won't lose data anymore. so it could go either way:

  • save changes automatically on publish so it's only one step instead of save + publish
  • don't save, publish the previous version, then you can still save + publish afterwards
    wdyt?

@leandrocp
Copy link
Contributor

leandrocp commented Dec 18, 2024

I guess it's 50/50. I can see someone expecting Publish to publish what they are seeing on the editor or expecting to Publish what they previously saved. But I believe the former makes more sense. If we could add a modal to warn like "hey I'm gonna save the pending changes and publish ok?" - that would be very clear for the user, unless that adds too much complexity.

@APB9785
Copy link
Collaborator Author

APB9785 commented Dec 18, 2024

@leandrocp the publish confirmation modal is already updated to tell the user that their unsaved changes will be saved before publishing. we could do a two-step modal, but it would probably be better to stick with a one-step process and add another button, e.g. [Cancel] [Publish without saving] [Save + Publish]

@leandrocp
Copy link
Contributor

Another modal would be confusing but adding those buttons seems interesting.

@APB9785 APB9785 linked an issue Dec 18, 2024 that may be closed by this pull request
Copy link
Contributor

@leandrocp leandrocp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a non-blocking comment. We could improve it in a following PR if you want.

@leandrocp
Copy link
Contributor

Linking #97 for future reference. The redirect manager will be implemented eventually to manage unpublished pages.

@APB9785 APB9785 merged commit f0aa90c into main Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Components and Pages: Unpublish page
2 participants