{"action":"closed","issue":{"url":"https://api.github.com/repos/iodide-project/iodide/issues/288","repository_url":"https://api.github.com/repos/iodide-project/iodide","labels_url":"https://api.github.com/repos/iodide-project/iodide/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/iodide-project/iodide/issues/288/comments","events_url":"https://api.github.com/repos/iodide-project/iodide/issues/288/events","html_url":"https://github.com/iodide-project/iodide/issues/288","id":296223752,"node_id":"MDU6SXNzdWUyOTYyMjM3NTI=","number":288,"title":"iodide needs a stdlib for common notebook-centric operations","user":{"login":"bcolloran","id":2380975,"node_id":"MDQ6VXNlcjIzODA5NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2380975?v=4","gravatar_id":"","url":"https://api.github.com/users/bcolloran","html_url":"https://github.com/bcolloran","followers_url":"https://api.github.com/users/bcolloran/followers","following_url":"https://api.github.com/users/bcolloran/following{/other_user}","gists_url":"https://api.github.com/users/bcolloran/gists{/gist_id}","starred_url":"https://api.github.com/users/bcolloran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcolloran/subscriptions","organizations_url":"https://api.github.com/users/bcolloran/orgs","repos_url":"https://api.github.com/users/bcolloran/repos","events_url":"https://api.github.com/users/bcolloran/events{/privacy}","received_events_url":"https://api.github.com/users/bcolloran/received_events","type":"User","site_admin":false},"labels":[{"id":666104668,"node_id":"MDU6TGFiZWw2NjYxMDQ2Njg=","url":"https://api.github.com/repos/iodide-project/iodide/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":838709340,"node_id":"MDU6TGFiZWw4Mzg3MDkzNDA=","url":"https://api.github.com/repos/iodide-project/iodide/labels/iodide%20api","name":"iodide api","color":"e99695","default":false},{"id":692691161,"node_id":"MDU6TGFiZWw2OTI2OTExNjE=","url":"https://api.github.com/repos/iodide-project/iodide/labels/needs%20feedback","name":"needs feedback","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/iodide-project/iodide/milestones/5","html_url":"https://github.com/iodide-project/iodide/milestone/5","labels_url":"https://api.github.com/repos/iodide-project/iodide/milestones/5/labels","id":3101332,"node_id":"MDk6TWlsZXN0b25lMzEwMTMzMg==","number":5,"title":"0.5a - a usable app","description":"- deprecate local storage\r\n- GH sign-in authentication working no matter where you load the file from\r\n- CELL: fully revamped cell menus\r\n- CELL: make visible in report view (input, output, intermediate?)\r\n- three-row JS cell\r\n- stdlb: show, dom, print, script/stylesheet, etc.\r\n- deprecate ExternalResourceCell\r\n- EDITOR PERFORMANCE: test different JS code editors in PRs\r\n\r\n\r\n\r\n\r\n====================\r\n\r\n- implement explore / report views, and separate out modes (command, edit, menu)\r\n- better error handling around external resource stuff\r\n- CELL: better debuggers for cell evaluations\r\n- CELL: output handler selection / state-saving\r\n- app-level errors handled with UI treatment\r\n","creator":{"login":"hamilton","id":95735,"node_id":"MDQ6VXNlcjk1NzM1","avatar_url":"https://avatars1.githubusercontent.com/u/95735?v=4","gravatar_id":"","url":"https://api.github.com/users/hamilton","html_url":"https://github.com/hamilton","followers_url":"https://api.github.com/users/hamilton/followers","following_url":"https://api.github.com/users/hamilton/following{/other_user}","gists_url":"https://api.github.com/users/hamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/hamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamilton/subscriptions","organizations_url":"https://api.github.com/users/hamilton/orgs","repos_url":"https://api.github.com/users/hamilton/repos","events_url":"https://api.github.com/users/hamilton/events{/privacy}","received_events_url":"https://api.github.com/users/hamilton/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":9,"state":"open","created_at":"2018-02-08T22:59:19Z","updated_at":"2018-08-01T23:42:59Z","due_on":"2018-04-03T07:00:00Z","closed_at":null},"comments":5,"created_at":"2018-02-11T20:44:24Z","updated_at":"2018-08-01T23:42:59Z","closed_at":"2018-08-01T23:42:59Z","author_association":"COLLABORATOR","body":"we've talked for a while about having a small library of built-in functions; following from our discussion the other day, i think our approach will feel more unified (most stuff happens in code, not in special cells), and our app code will be simplified a bit if we move things to a set of library functions that are called within the normal eval paradigm.\r\n\r\nThese are just a few ideas to get the conversation rolling (we can pick any namespace we think works best, but in these examples i'll just use `io.`; could also be \"IO.\", \"iodide.\", \"nb.\", \"NB.\", etc) --\r\n\r\n`io.DOM(elt type, elt attrs, showInPresentation = true, ???)` - immediately create and return a reference to a DOM element (dangerously mutating the DOM outside of the react flow-- i *think* we can get away with this, b/c muting DOM within MD elts seem to work ok, even when you trigger re-renders of parent elts by e.g. moving a cell up/down). This would append a new child to a div that we would add to each cell (between the input and output rows), and which could be selected by e.g. `document.body.querySelector(\"div.cell.selected div.printarea\")` or whatever.\r\n\r\n`io.print(obj, showInPresentation = false)` - extension to `io.DOM` that would print `obj` into, let's say, a `<pre>` container? note that i don't favor globally overriding or somehow capturing `console.log`. i believe we should whenever possible avoid changing _anything_ about the behavior of regular browser APIs unless we have no choice, and this is a perfectly legible alternative.\r\n\r\n`io.show(obj, showInPresentation = false)` - extension to `io.DOM` that would pretty print `obj` using any registered output renderers.\r\n\r\n`io.script(url)`; `io.stylesheet(url)` -- request a script or stylesheet and do whatever we currently do (just append a <script> or <link css> tag in <head>?). we could also offer something like `x = io.script(url, namespace=true)` that returns an object containing everything that is dumped into the window object when you load a script via script tag. i'm wary of using the term \"require\" because i think it implies dependency resolution or something (but i'm not sure about that)? or maybe `io.require` would be used for files wrapped in module syntax? i'm really not sure how this stuff works.\r\n\r\n`io.getFile(url, timeOut = 5000ms)` or `io.awaitFile(url, timeOut = 5000ms)` -- synchronously load and return data object. flags for parsing csv, json, ... ?\r\n\r\n`io.registerTranspiler(url, transpilerKeyword)`registers a transpiler to be run on the input content of a cell before passing the content to `eval`. `transpilerKeyword` is some string that, if present on the first line of the input, runs the input through the transpiler. e.g., it might be \"use math\" for math syntax sugar, \"use jsx\" to use the normal jsx transpiler, and so on. \r\n\r\ncurious what ppl think of this idea and if it makes sense, what other utility functions would we want create?\r\n"}}
{"actor":{"display_login":"bcolloran"}}