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

Separate Reblogging (and add draft editing) and ActivityPub Boosting #309

Merged
merged 4 commits into from
May 11, 2024

Conversation

akirk
Copy link
Owner

@akirk akirk commented May 5, 2024

This splits the Reblog button from the Boost button (when it's an ActivityPub post). This allows to:

  • Edit the draft before publishing the Reblog
  • Decide whether to boost the post via ActivityPub separately.

reblog-separate

@kgourlay
Copy link

kgourlay commented May 8, 2024

Excellent idea.

If I understand, then “Boost” will only show if ActivityPub is installed. I see two potential configuration settings to go with this feature.

  • The ActivityPub setting “When you boost a status, also reblog it” changes to “Automatically boost when reblogging”. If this option is checked then the separate “boost” button would not show and the “reblog” button would boost as well. If unchecked, both buttons would show so user can boost or reblog independently.
  • Regardless of ActivityPub installed, a new setting “Reblog Instantly” would revert to the old behavior. If unchecked, reblog button will open the editor prior to publishing the reblog.

@kgourlay
Copy link

kgourlay commented May 8, 2024

After some thought, I think the simplest solution to formatting control might make the most sense. Simply add an additional css class when reblogging. In includes/class-frontend.php:

354c354
< 		$reblog  = '<!-- wp:paragraph -->' . PHP_EOL . '<p>';
---
> 		$reblog  = '<!-- wp:paragraph {"className":"friends-reblog"} -->' . PHP_EOL . '<p class="friends-reblog">';
371c371
< 		$reblog .= '<!-- wp:quote -->' . PHP_EOL . '<blockquote class="wp-block-quote">';
---
> 		$reblog .= '<!-- wp:quote {"className":"friends-reblog"} -->' . PHP_EOL . '<blockquote class="wp-block-quote friends-reblog">';

@akirk
Copy link
Owner Author

akirk commented May 11, 2024

Thanks for the suggestion, @kgourlay! I have added the CSS classes as your code proposal suggested (feel free to create a PR in future, so that you can show up as a contributor, please!) but I just wanted to point you to the friends_reblog_pre_insert_post hook which would allow you to do more stuff to the post, like automatically adding a category or tag.

@akirk
Copy link
Owner Author

akirk commented May 11, 2024

@kgourlay thank you for your settings suggestion. I've been thinking about it and actually think that simply removing the ActivityPub settings is the better option. There are too many settings already anyway.

This way, people can deliberately do the addition boost if they think. Practically, this would mean that both the reblog will show in their followers feed as a dedicated post, and the ActivityPub boost.

While a reblog is now one click more, I think it's worth double checking before posting something. The reblog without showing the editor was always a bit too much magic for me.

@akirk
Copy link
Owner Author

akirk commented May 11, 2024

I am happy to add back the options if there is demand for it but for now I'd like to go by decision vs. option.

@akirk akirk merged commit d9a8c00 into main May 11, 2024
34 checks passed
@akirk akirk deleted the separate-boost-reblog branch May 11, 2024 00:30
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.

2 participants