Apologies if this is on the roadmap already, but it'd be nice to have the ability to add descriptions to any block.
n
Nate
07/26/2023, 11:54 PM
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
Rachel H
07/27/2023, 12:13 AM
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
Nate
07/27/2023, 1:33 AM
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
Rachel H
07/27/2023, 2:13 AM
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!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.