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 "visibility" feature #931

Merged
merged 22 commits into from
Oct 16, 2024
Merged

Add "visibility" feature #931

merged 22 commits into from
Oct 16, 2024

Conversation

pfefferle
Copy link
Member

@pfefferle pfefferle commented Oct 8, 2024

Fix #923

This PR allows users to change the visibility of a post.

Options:

  • Public -> default
  • Quiet public -> This behaves exactly like public, except the post will not appear in live feeds or hashtags, explore, or Mastodon search, even if you are opted-in account-wide.
  • Do not federate -> Do not federate this post.
Screenshot 2024-10-08 at 12 30 31

Todo: Use constants

@pfefferle pfefferle requested a review from mattwiebe October 8, 2024 10:40
Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

Poked around a bit, had a few thoughts, but the React looks like a seasoned pro!

includes/functions.php Outdated Show resolved Hide resolved
includes/class-blocks.php Outdated Show resolved Hide resolved
src/editor-plugin/plugin.js Show resolved Hide resolved
@pfefferle pfefferle requested a review from mattwiebe October 10, 2024 07:22
@pfefferle
Copy link
Member Author

@mattwiebe

Poked around a bit, had a few thoughts, but the React looks like a seasoned pro!

😍

Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

A couple of questions:

  1. Is this going to break Outbox pagination? Should we adjust the query there to exclude hidden posts?
  2. Do we ever even want to save public? Should it be more of a default null case?

@pfefferle
Copy link
Member Author

pfefferle commented Oct 10, 2024

@mattwiebe

  1. Mastodon does not really support the Outbox, so we could care about that later.
  2. Good point. Will WordPress ignore the null value or will it persist the null?

@pfefferle
Copy link
Member Author

Updated icons! See: https://mastodon.social/@mattwiebe/113289210941629136

Screenshot 2024-10-11 at 21 56 57

@Menrath
Copy link
Contributor

Menrath commented Oct 15, 2024

@pfefferle I would like to add a feature here: could we add filters, so that other plugins might override the default visibility for a post?

Concrete why: some event plugins have a option per event to mark it as "unlisted", which would fit perfectly here.

@pfefferle
Copy link
Member Author

@Menrath and @mattwiebe done!

Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

Had a run through, the "Public" type is no longer saved, everything looks in order! 🚢

@pfefferle pfefferle merged commit 7ca9a58 into trunk Oct 16, 2024
21 checks passed
@pfefferle pfefferle deleted the add/content-visibility branch October 16, 2024 18:44
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.

Feature Request: Add filter to restrict ActivityPub not only per post_type but also per an individual post
3 participants