observablehq / stdlib

The Observable standard library.
https://observablehq.com/@observablehq/standard-library
ISC License
966 stars 83 forks source link

Notebook Downloads (Standard Library Changes) #43

Closed jashkenas closed 6 years ago

jashkenas commented 6 years ago
jashkenas commented 6 years ago

@mbostock — if approved, I'd like to merge and publish this PR as version 1.0.0 on npm...

mbostock commented 6 years ago

Per https://github.com/tc39/proposal-observable, Observable may be a thing in ECMAScript in the future, although it is just stage 1. I suppose we could use observablehq as the namespace?

mbostock commented 6 years ago

My other concern #31 #32 is whether we should formally deprecate (though still support) the following methods:

That said I’d probably not deprecate:

I find myself still using DOM.svg a lot because it sets the viewBox automatically, likewise DOM.context2d is useful for its automatic high DPI support, and might as well keep DOM.canvas for symmetry with DOM.svg and for WebGL.

In practice this would mean moving the documentation for the deprecated methods from README.md to a DEPRECATED.md, and perhaps adding these to the deprecated list for autocomplete.

jashkenas commented 6 years ago

CSS and UMD namespaces updated across the board to observablehq.

(Although, I still hold out hope that one day we'll be able to purchase observable.com)...

Just for expediency's sake: If we're not changing any of the functionality (yet), just the documentation, I don't think we need to make a decision on the deprecations before merging this branch and publishing a 1.0.0 — as long as the functionality remains in place, we can deprecate at any point afterwards.

mbostock commented 6 years ago

Okay, that’s fair; we can punt on deprecation. 👍

jashkenas commented 6 years ago

Alright, @tmcw — if you don't mind taking a look at this, I'd like to merge this, and publish stdlib 1.0.0 to npm ... once notebook-runtime PR has been merged as well.