-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Feature: Create a "linting" interface for errors, warnings, in the editor #76996
Description
Across a slew of issues, it has become clear that there are a lot of places content in a document you are authoring can have various levels of issues that need user attention. Things such as:
- Image block is empty
- Button/link is dead or empty
- Custom block is missing an API key
- Colors are missing contrast
- Navigation menu (cpt) has been deleted, but navigation block still refers to it
- Image is inserted in the editor but deleted in the media library
- Block is hidden
- Social Icons don't link anywhere
- Block has custom CSS
- Navigation items link to draft pages
- On-the-fly media sizes were interrupted during creation
These are just some of the different types of errors content in the editor can have. But common to them all: they refer to content errors that need user interaction.
#41747 detailed showing errors in the List View, but this would only catch local errors, and the List View is already crowded. In fact this very proposal for a new linting tool was instigated in part due to not wanting to over-burden the List View itself with additional labels and flags.
What I'd like to discuss—this is a proposal, but the design and concept needs feedback—is embracing the Notes tray as a visual linting tool. Shown here, with a notice-level lint item for indicating a block is hidden:
But the concept would go further: any notice, warning, or error, across the category of issues listed above, could potentially get a visual notice in context of a block. A thread, if a single block has multiple issues. It would provide big visual emphasis on items that need attention, and obvious flows to engage with them, as well as plenty of real-estate to be verbose with information.
Consider an OpenStreetMap block, unless engaged with, it could have a big Notice in the notes tray:
OpenStreetMaps needs an API key in order to function. [See instructions for getting your own key here], and then add it to the input field on the block itself.