framework icon indicating copy to clipboard operation
framework copied to clipboard

Add a classname to running / invalidated cells

Open Fil opened this issue 1 year ago • 0 comments

Originally posted by @yurivish

In Observable notebooks, you can tell that a cell is loading by the appearance of a gray stripe to the left of the cell.

Is there any mechanism in Observable Framework by which a cell can know when it's loading, ie. with a CSS class analogous to observablehq--running in notebooks, so that it can be styled differently?

The use case that prompted this is that I have a page with a dataset picker input. Changing their selection causes a new file to be loaded, but while that file is being loaded, the old charts continue to be displayed for a second or two, even though they correspond to the previous selection. It would be nice if they could be visually marked as invalidated or pending so it's clear that the displayed data does not correspond to the new selection.

Fil avatar Aug 27 '24 09:08 Fil