This does provide some utility over just showing the code view, since the name links to the source notebook, but unlike the other visualizations, it doesn’t list the name/names imported from the statement. Would it be possible to display the names, perhaps using the same syntax as the import statement uses?
Seeing that version, since all the “important” bits (i.e. the ones that change between different import statements) are highlighted by virtue of being a link, the bold is less necessary:
Yes, I currently always leave code blocks with imports pinned open, because otherwise it is impossible to search on the page for variable names defined therein. I have several times wished the names were written in the output, but never bothered filing a ticket here.
In the case of import {chart as treemap} from "@d3/treemap" (to take an example from introduction to imports), the name treemap should get into the rendered cell output. Whether the name chart does is less important.
When the import cell is unpinned, would it be possible to show the “with” options and use the same link behavior? I was searching for an import in my notebooks using the “with” option and couldn’t find them at first. I didn’t realize that when the import cell is unpinned, the with portion is not shown. Thanks again for all the cool features.