Closed tangjeff0 closed 4 years ago
:heart: Is this in progress now? This would be a great feature to keep around in the final version!
The sci.web
interface is :100:. Is there a reason that we need sci
itself or could we use the datascript
client in CLJS for the eval?
Good question @ticean. We are interested in sci.web
beyond pure datascript because we expect that there may be use cases where users want to import arbitrary npm
packages. For instance, if they wanted to use other graph visualization libraries.
*Edit: Another reason is that sci provides a safe sandbox for code execution.
I'm working on something, not much code yet, but I do have an idea that might work. Current progress can be seen here: https://jelmerderonde.github.io/athens/cards.html#!/athens.devcards.db_boxes.
The code I have builds on the work done earlier by @tomisme in #91.
sci
. Provide bindings for datascript functions like q
and pull
. Also provide a binding to the datascript connection.sci
Feedback to this idea is appreciated.
@jelmerderonde great start!
Values that indicate a "next step" like a unique id or a reference ... should be clickable
Love this idea!
Keep a history of previous queries/result-sets so users can navigate backwards.
Keep in mind that we get history and time travel for free with DevCards:
It would be nice to have this a developer tool outside of DevCards too. You get this with Elm, Redux DevTools, and re-frame-10x, but posh/re-posh doesn't have this unfortunately.
If you haven't already, try doing datascript queries in Roam. Things to note about Roam's queries:
@tangjeff0 thanks!
Keep in mind that we get history and time travel for free with DevCards:
Good point, I will enable this next time I work on it.
they eagerly evaluate, which is sometimes annoying
I will have to figure out how to do this, I will also take a look at Roam queries.
Small update, I've managed to get some minimal browsing going. You can now click on cells that we know contains a :db/id
and it will generate some new code for you.
Also, the code is a mess and in need of some cleaning up, I will do that later.
Another update, see the latest state at: https://jelmerderonde.github.io/athens/cards.html#!/athens.devcards.db_boxes
:key
sI think I'm now at a stage where it would be helpful to have some discussion about which direction we should take this in. When is it "good enough" for developers? What questions should they be able to answer with it? How can it be further improved?
I'm looking forward to hearing more ideas and opinions!
@jelmerderonde I'm definitely finding it useful for exploring our attributes. I added this to my devcards css:
.com-rigsomelight-devcards_rendered-card {
display: flex;
flex-direction: column-reverse;
}
I'm sure it breaks other cards somewhere but it moves the history control bar up above the text box.
Some ideas for where we could go:
datafy
and nav
(https://corfield.org/blog/2018/12/03/datafy-nav/)I'm sure it breaks other cards somewhere but it moves the history control bar up above the text box.
@tomisme we can override CSS on each individual Devcard namespace. No worries!
Agree with datafy
and nav
. Let's get inspired by REBL and Datomic On-Prem Console for what other interactions and UI we could build!
Can't wait to have #31 so people can begin querying their own DBs to learn datascript!!
I've added some minor improvements in #138:
For now I think this is as far as we should go with this. It should be suitable for experimenting with datascript and exploring the database. When we have a firmer idea on how we will work with datascript and how we want to implement similar functionality in Athens we can pick this up again.
Do you agree @tangjeff0 ?
Looks great @jelmerderonde , approved and merged.
Eventually, when parser is further along, we can implement exploration for [[links]]s and ((block))s.
Eventually, when parser is further along, we can implement exploration for [[links]]s and ((block))s.
This shouldn't be hard to implement (I think). Let's revisit it when @roryokane deems it ready :-).
Moving this to the "Done" column because doesn't require any immediate action
This has mainly been superseded by #139. Closing!
132 https://athensresearch.github.io/athens/cards.html#!/athens.devcards.db_boxes
91 https://athensresearch.github.io/athens/cards.html#!/athens.devcards.sci_boxes
Using sci, allow users to query their database in the browser. Datalog is a very powerful language and could one day be as common knowledge as SQL.