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

Sharing block: ensure compatibility with global settings set in module #34117

Open
Tracked by #35993
jeherve opened this issue Nov 14, 2023 · 5 comments
Open
Tracked by #35993

Sharing block: ensure compatibility with global settings set in module #34117

jeherve opened this issue Nov 14, 2023 · 5 comments
Assignees
Labels
[Block] Sharing Buttons [Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@jeherve
Copy link
Member

jeherve commented Nov 14, 2023

Ensure compatibility with sharing settings that may have been created via the old module.

Compatibility may mean separating the settings entirely so the new block is only managed via the block / site editor, but that needs to be made clear in settings UI.

This issue may be broken down into multiple issues if necessary.


Epic: #19694

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Sharing Post sharing, sharing buttons [Block] Sharing Buttons labels Nov 14, 2023
@andrii-lysenko
Copy link
Contributor

While working on #34115 (hook new block buttons to Sharing_Service) we basically has copied the logic needed inside the block, having it entirely separated from the Sharing Service.

We would still need to see, what would be the less confusing way to go, either entirely replace current logic (including central buttons controls in calypso), or make these work together.

I suggest we hold off this task until we get some feedback from Call For Testing.

@jeherve
Copy link
Member Author

jeherve commented Feb 21, 2024

#35542 brings us in this direction, but doesn't have any UI yet. We'll need to work on one, that will set the jetpack_sharing_buttons_auto_add option when toggled. It is necessary, since we do not want to add the block to all sites as soon as they activate the plugin.

@andrii-lysenko
Copy link
Contributor

I think the easiest way would be if we could add UI to wp.com side on https://wordpress.com/marketing/sharing-buttons/:site. We probably could add a notice there (for sites with block based themes), that has a link to Sharing Buttons docs and a button, that will switch to new behavior. Underhood, it would toggle jetpack_sharing_buttons_auto_add for the site and disable old Sharedaddy feature.

Following up #35542 we could read these settings (could we?) and fill with buttons and styles from old module. Also, on https://:site/wp-admin/admin.php?page=jetpack#/sharing, we might add another toggle, that will do the same for sites, where the old module enabled. If for some reason we can't do these manipulation from wp.com side, we could probably redirect users to page=jetpack#/sharing and utilize that switch.

In terms of tasks I imagine it something like:

  • Follow up with Sharing Block: automatically add block to templates in block themes #35542 to add buttons based on settings from old module if user has ones. It should also correctly handle Official button defaulting to classic view and More button which should be skipped at this time.
  • Follow up with Sharing Block: automatically add block to templates in block themes #35542 and possibly adding new filters to be able to add a sharing buttons to other templates matching old feature settings (posts, pages, media, etc.).
  • Modify https://:site/wp-admin/admin.php?page=jetpack#/sharing, adding a button/toggle that will automatically set jetpack_sharing_buttons_auto_add to true and old module feature to false.
  • Modify https://wordpress.com/marketing/sharing-buttons/:site to either have a button that does everything automatically or navigates to https://:site/wp-admin/admin.php?page=jetpack#/sharing

cc @keoshi

@jeherve
Copy link
Member Author

jeherve commented Mar 4, 2024

we could add UI to wp.com side on https://wordpress.com/marketing/sharing-buttons/:site

If we do, we would definitely need to add the same UI to wp-admin/admin.php?page=jetpack#/sharing. We should avoid adding more UI elements that would only be available in Calypso.

@jeherve
Copy link
Member Author

jeherve commented Mar 7, 2024

I created Automattic/wp-calypso#88294 to start with some improvements, and we're also discussing other options in https://github.com/Automattic/dotcom-forge/issues/5915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Sharing Buttons [Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

2 participants