Copy id of block in the UI

Hey @thiago,

I made a simple plugin demonstrating a super basic version of this:

Clicking one of the blocks in the list at the bottom will copy its ID to the clipboard.

You can get the source here: https://github.com/arcataroger/datocms-plugin-block-id-copy/blob/treeview-addon/src/entrypoints/BlockIdCopy.tsx (please use the treeview-addon branch; main is currently being used to debug another issue).

And try it on this demo project (invitation in your email).

For now it’s just a simple field addon. Unfortunately, there doesn’t seem to be a way to override each block’s dropdown menu. There IS a way to override the field’s menu, but that currently has a separate bug (reported to the devs) that prevents sub-menus from displaying correctly.

But at least this gives you the basic functionality of being able to easily see & copy IDs.