Proposal: Add ClassifAI button in the editor Toolbar

Open
#812 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php, wordpress
Domain
frontend

Research direction

Start by reviewing the Gutenberg Block Toolbar and Editor Toolbar entry points, then compare how the existing Content Resizing and Rewrite Tone controls are exposed through the Block Toolbar and Document Panel. Done means an extendible toolbar area makes those multi-block controls available when different block types are selected, without requiring a switch to the Document/Post panel.

Written by the indexing model from the issue text.

Description

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.

  • When multiple blocks are selected, the "Block" panel is selected by default.
  • The user has the click the "Document/Post" panel to access the ClassifAI panel.
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
  • I agree to follow this project's Code of Conduct
Dominant language
PHP
Stars
714
Forks
68
Avg merge
4h 32m
Merged PRs (30d)
23

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 10up/classifai

All issues in 10up/classifai

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.