observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Cannot select imported cells for embedding #83

Open mootari opened 3 years ago

mootari commented 3 years ago

Describe the bug Cells Variables which have been imported by a notebook cannot be selected within its embed modal.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://observablehq.com/@mbostock/most-popular-programming-languages-2004-2021
  2. Open embed modal
  3. Try to select the chart cell for embedding

Expected behavior The chart cell variable is listed and can be selected.

CobusT commented 3 years ago

Looking at that notebook, the 'chart' cell was not named. If the notebook said 'myChart = chart', then it would be embeddable. This is consistent with other unnamed cells.

mootari commented 3 years ago

Looking at that notebook, the 'chart' cell was not named

That's not the cell I was talking about, though. I was referring to the chart import. Given that it can be reimported from the notebook ...

import {chart} from '@mbostock/most-popular-programming-languages-2004-2021'

... I would assume that it also should be listed as an embeddable value. If this is by design though, I'm happy to open a feature request instead.

mbostock commented 3 years ago

Thanks for the additional context, @mootari! I agree it would be reasonable to allow imported symbols to be embedded, too, which would conveniently address this use case.