10up / classifai

Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence.
https://classifaiplugin.com
GNU General Public License v2.0
580 stars 53 forks source link

Proposal: Add ClassifAI button in the editor Toolbar #812

Open Sidsector9 opened 1 month ago

Sidsector9 commented 1 month ago

Is your enhancement related to a problem? Please describe.

Currently the Content Resizing and Rewrite Tone features only work on multiple blocks if and only if the blocks selected are of the same type.

This is due to the limitation that Gutenberg doesn't display the button added to the Block Toolbar when multiple blocks of different types are selected.

Example:

Same types:

Screenshot 2024-09-09 at 9 18 49 PM

Different types:

Screenshot 2024-09-09 at 9 18 02 PM

We can add buttons to the Document Panel but this introduces poor UX when multiple blocks are selected.

Designs

I propose adding an extendible plugin area at the top inside the Editor Toolbar like the following:

https://github.com/user-attachments/assets/2961ca1f-8a99-4b24-b3b3-e706383d0dfa

In the example, I have added the controls for the existing features, but in practice this will contain controls for features like Content Resizing, Rewrite tone and any feature that has to work on multiple blocks.

@10up/open-source-practice open to hear your thoughts on this!

Describe alternatives you've considered

No response

Code of Conduct

jeffpaul commented 1 month ago

That seems like a decent option for now, though we'll want to be mindful of a potential future Gutenberg update that would allow us to add a button to the group block for different block types.

Sidsector9 commented 1 month ago

On discussing with @fabiankaegy internally a block toolbar button is unlikely but not completely impossible - https://fueled10up.slack.com/archives/C8Z3WMN1K/p1725896911758419