Skip to content

Conversation

@mattwiebe
Copy link
Contributor

@mattwiebe mattwiebe commented Jan 7, 2025

At long last, you can configure the "Follow Me" button to have a button-only mode.

Fixes #478

Proposed changes:

  • Add a "Button Only Mode" toggle to the block
  • Make button text configurable
  • Add a "Button size" option (follows the Button component's sizes: "small" | "default" | "compact"

The sidebar looks like this now:

Screenshot 2025-01-07 at 13 30 51

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

Before trying this PR, configure various instances of the Follow Me block. Ensure that they render the same way after this branch is run.

After checking this branch out, try out the new functionality and ensure everything behaves properly.

@mattwiebe mattwiebe requested a review from a team January 7, 2025 19:34
@github-actions github-actions bot added [Block] Follow Me [Focus] Editor Changes to the ActivityPub experience in the block editor labels Jan 7, 2025
@obenland
Copy link
Member

obenland commented Jan 8, 2025

Upgrading worked well with the few instances I created ahead of time, nice!

There are some polish opportunities with the button-only mode:

  • With color customizations there are some unexpected results, like the text color not being customizable and text/background color being the inverse.
  • The button maintains margins around it, that make it behave and look different from the Core button block/
image

Is there a way to re-use the Core button and inherit its customizations when in button-only mode?

@obenland obenland force-pushed the update/button-only-mode-for-follow-me branch from 558ecab to 9056a64 Compare April 8, 2025 13:45
@obenland
Copy link
Member

obenland commented Apr 8, 2025

@pfefferle Should we merge as-is?

I've tried to get the core button working with some AI help, but it's quite a big change where I worry it'll mess with existing blocks. I think the way it is now should work well for the vast majority of situations. We could come back with follow-ups if we wanted to change the block further

@obenland obenland merged commit f70003a into trunk Apr 8, 2025
11 checks passed
@obenland obenland deleted the update/button-only-mode-for-follow-me branch April 8, 2025 15:35
pfefferle added a commit that referenced this pull request Apr 10, 2025
* Follow Me: add a button-only mode

Also make button text and button size configurable

* proper naming of sidebar panel

* changelog

* code style

* Add changelog item

* Update build after merge

* Remove changelog changes after merge

* Only add left margin to the button when there's profile content.

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
Co-authored-by: Konstantin Obenland <obenland@gmx.de>
@anantshri
Copy link

Thanks for doing this. got rid of a few lines of CSS i had hiding the extra stuff. Its nice to see when an old request gets closed with a proper fix.

jsit added a commit to jsit/wordpress-activitypub that referenced this pull request Nov 1, 2025
* tag '5.7.0': (29 commits)
  Release 5.7.0 (Automattic#1574)
  Fix: Show error if site uses "Almost Pretty Permalink" structure (Automattic#1570)
  Admin: Add padding to extra fields nav links (Automattic#1569)
  Signature: Add compat for more key encodings (Automattic#1557)
  Reply block: Improve fallback embed (Automattic#1560)
  Add label for "Health Check" and "REST API" (Automattic#1571)
  change changelog items (Automattic#1572)
  Transformers: Allow setting properties to false. (Automattic#1567)
  Upgrades: Delete orphaned extra fields (Automattic#1566)
  Fix: Missing Actor in Outbox-Activities (Automattic#1564)
  Outbox: Properly handle username requests (Automattic#1559)
  Import: Load on admin_init (Automattic#1561)
  Move: support same-server domain migrations (Automattic#1530)
  Follow Me: add a button-only mode (Automattic#1133)
  Tests: Convert timestamp to int for comparison (Automattic#1556)
  Reply: Make Mastodon embeds work (Automattic#1555)
  Add: `Vary` header settings (Automattic#1552)
  Actors: Don't convert non-numeric strings to Blog user id (Automattic#1554)
  Add: Shared Inbox setting (Automattic#1553)
  Add: New Health checks (Automattic#1524)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Follow Me [Focus] Editor Changes to the ActivityPub experience in the block editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar Follow button customization

5 participants