Description
As noted in https://wp.me/p58i-ioo there are a couple of tasks relating to untangling the admin bar:
- Make the admin bar the same as core
- Remove the frontend actionbar
By adopting the core admin bar (replacing the calypso 'masterbar'), we'll need to migrate any features across. For the most part this seems trivial, in fact there is already close alignment:
wp-admin
Calypso
Migrate actionbar actions
By removing the frontend actionbar we'll need to find a home for the various actions therein:
Move to blocks
An idea discussed in #96202 is that important frontend visitor actions like 'Subscribe', 'Reblog', 'Comment', 'Copy short link' could be blocks. Indeed 'Subscribe' has already shipped using the Jetpack Subscribe block. This approach has a number of benefits;
- Users have much more flexibility around the appearance of each action, effortlessly making them blend in with their general site aesthetic, customizing, repositioning, etc.
- Users have granular control over which actions to include, rather than a single toggle for the entire action bar.
- Thanks to block hooks we can conditionally add appropriate actions based on flags triggered during onboarding. E.g. only include the 'Subscribe' block if the site includes a blog.
- Creates scope for enhancement down the road; perhaps Jetpack adds a 'Blog actions' block which is sticky (with positioning options) and includes the relevant actions as child blocks.
- As blocks, wporg and wpcom are inherently aligned.
Most importantly it enables the removal of the action bar on the frontend, reducing conceptual overlap with the admin bar.
Move to admin bar
Any actions that don't make sense as blocks could move to the admin bar. Actions for which we intend to create blocks could also move in the short term.