Apologies if this is on the roadmap already, but i...
# prefect-ui
r
Apologies if this is on the roadmap already, but it'd be nice to have the ability to add descriptions to any block.
n
hi @Rachel H - what kind of description would you like you attach? and where do you want it to show up? and just to clarify, you want to describe an instance of a block or a block type?
r
On a particular block instance would be great eg I click Blocks > select a JSON block > It shows the snippet, value and maybe a description on the side (on the red dot in the image)
n
hmm hows this?
Copy code
from prefect.blocks.system import JSON

class DescriptiveJSON(JSON):
    """
    A block for storing JSON data with a description.
    """
    _block_type_slug = "descriptive-json"
    description: str = None
to register the new block type with your workspace (first time only)
Copy code
❯ prefect block register -f descriptive_json.py
or delete the block type
Copy code
❯ prefect block type delete descriptive-json
😯 2
🔥 1
💙 1
r
Yeah it'd be cool to have it across all blocks, but that would work for a first iteration I reckon? It'd also be cool if it was a column or hover over in the main Blocks page. I might create a feature request to get more ideas in, thanks Nate!
n
👍