Skip to content

Conversation

@a10k
Copy link

@a10k a10k commented Feb 15, 2021

When compiling cells to implement an editor like interface, deleting a cell needs a reference to the variable created, to call variable.delete()

@bryangingechen
Copy link
Contributor

This looks reasonable, though I haven't done a full review yet.

Do you mind updating the README and adding a test or two?

@a10k
Copy link
Author

a10k commented Feb 16, 2021 via email

@asg017
Copy link
Owner

asg017 commented Feb 17, 2021

Havent taken a full look either, but once tests are in I like these changes!

re needing to get cell references after defining, another option is poking through the properties of the returned module. It's a little hard to do, but here's a notebook explaining what I mean: https://observablehq.com/d/ee6ef766304de2e9

@a10k
Copy link
Author

a10k commented Feb 17, 2021

Yes, the main issue was editing an import statement, there are multiple ones created, I'm trying out a file based observable editor using chokidar +socketio, so each cell is a file.ojs as they are modified the events and code is sent to the browser where they are compiled and added to a div, the order of the div is controlled using flex order. so, I'm associating each file with all variables created for it, this way when the non named cells/files are edited, I just remove those variables from my runtime and define them again (this way its easier as I have a reference to the cells when I'm creating them), hope this makes sense.

@a10k
Copy link
Author

a10k commented Mar 7, 2021

@asg017 & @bryangingechen Hey! sorry for the long delay, I added the tests and updated readme now! Also, here is the link to the PoC I have been building, it uses VS code like editor, enables users to hide/show cells, drag them around to compose dashboard like layouts and runs totally offline using localstorage: https://on.wishyoulization.com/fieldbook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants