athensresearch / athens Goto Github PK
View Code? Open in Web Editor NEWATHENS IS NO LONGER BEING ACTIVELY MAINTAINED. Athens is an open-source, collaborative knowledge graph.
Home Page: https://athensresearch.github.io/athens
License: Other
ATHENS IS NO LONGER BEING ACTIVELY MAINTAINED. Athens is an open-source, collaborative knowledge graph.
Home Page: https://athensresearch.github.io/athens
License: Other
#185 #186 #189 implements the following screenshot (demo). Next steps are to implement actual link parsing at the page-level, and then only include/exclude blocks based on those filters.
After a certain number of links, it's quite difficult to manage all the filters. I believe some Roam users are now using {{query}}
s to achieve a similar goal of filtering information.
The design space is likewise broad as in #26: What is the actual user goal and what might be some various solutions?
READER BEWARE: this is a rabbithole and perhaps the most exciting part about knowledge graphs. Continue at your own risk.
I'm skeptical any of these would be quite good enough out of the box for the Roam/Athens use case. But at the implementation level, these are some usable libraries today:
In terms of what I want from a graph in general, and not just what is available today, here is a rambling list of stuff:
Read-level features for a global overview, e.g. https://twitterverse.net/:
Read+Write at the local page level:
Links, mainly from Discord. Some more relevant than others.
For v1, the only remaining task is drag and drop to re-order sidebar.
localStorage
as described in AppearanceSorted easiest to hardest (as I perceive)
+box-shadow-X
functions like [here].(https://github.com/athensresearch/athens/blob/master/src/cljs/athens/style.cljs#L45-L46)06-08-18 Edit: @shanberg found stylefy
lib and is refactoring relevant code in #136. This solves inline pseudoselectors, but not the opacity abstraction out of the box.
Problem
0.1, 0.25, 0.5, 0.75, 1
+primary-.1
+secondary-.5
+warning-bg-.75
...with-styles
also generates a style map, e.g. {:style {:key "val"}}
. But oftentimes these different shades/opacities happen on the hover
pseudoselector, which cannot be supplied through inline styles the way we've been doing with with-styles
.Solution?
style-guide-css
If this has already been discussed elsewhere, please feel free to close.
I believe a full stack framework with graphs and graph queries at its core is an ideal fit for this project. It is agnostic to backend DB, but offers a well developed and tested frontend DB and data sync abstraction, as well as a beautiful model for front end composition. A UI with potentially duplicated information such as backlinks and sidebar views would fit fulcro's model well in my opinion.
If this is a direction you wish to explore, I would be interested in spiking out a branch to get to feature parity to current state with fulcro.
CONTRIBUTING.md lacks sufficient guidelines. Areas to be improved:
This feature is for parsing block-level syntax – e.g. • here is [[a link]]
– and rendering it to the correct HTML via Hiccup.
We use the instaparse library.
This file may be useful for nested links: https://github.com/athensresearch/athens/blob/master/data/nested-link.hiccup
Is your feature request related to a problem? Please describe.
This might be a bit too early in the project, but are there plans to make this more performance-friendly? Right now self-hosting takes up more than 500 MB of RAM which is a bit much for someone that don't have the best spec like me.
Describe the solution you'd like
I'm not sure what the solution would be, but certain Electron web apps I've tried can be (relatively) lightweight, so maybe it's possible to make this into one?
[[]]
and (())
creates auto-complete (get-caret)/
creates slash commands menu (get-caret #59 )Related: #60
06-26-2020 Not much to say, just been doing hardcore study and engineering. Went really deep on datalog #183 and DOM fundamentals #158
06-16-2020 Resource I've been using for understanding DOM events (part 2): https://javascript.info/
Scopes for block writing:
06-11-2020 later
tab
/shift-tab
indent/unindentup
/down
to move between blocksenter
creates a new blockbackspace
on an empty block deletes it:block/string
datom06-11-2020: Early thoughts. There are a few different components that might use the base-level block component:
{{embed: ((uid))}}
— simplest one I believe:node/title
So, thinking of combining #96 with #97. Still unsure of how these components will map to isolated scopes.
Creating an issue for how to work with parsing the markup: how to turn plaintext like I __very__ much like [[Athens Research]]
into a semantic structure that we can understand.
I think we'll be able to find an elegant solution to this. Instaparse is powerful. I don't think we should try to "hack some regexes", as that will cause us problems with recursion.
Design proposal:
(= source (-> source serialize deserialize))
Hoping that we can reflect the same structure in our Instaparse
parser and in our specs.
Thoughts?
I like [[Athens Research
(missing ]]
) in an AST?Mostly concerned with writing issues, PRs, and commits clearly for posterity. (I'm bad at this myself.)
See https://github.com/jethrokuan/org-roam/blob/master/.github/CONTRIBUTING.md
[[]]
and (())
]) tutorialenter
or click, expand textMany small interaction / implementation questions. Lots of overlap with inline-search - [[]]
(())
. Slack and Discord are not great examples because they only allow commands if you start input with a slash.
(I've applied for a Sentry opensource license 🤞)
Sentry's error tracking is useful to catch errors in production (artificacts) early. This can monitor regressions and help us determine the general health of the application.
ctrl-z
: undoctrl-shift-z
: redocmd-k
: toggle athenactrl-g
: toggle devtoolsctrl-l
: toggle left sidebarctrl-r
: toggle right sidebarImplementation at time of this update. Mapping have not been thought about deeply. But it shouldn't be too difficult to change/customize.
This update is focused on global keybindings. Most other keybindings require block-level context. Thinking about putting block-level keybindings in the #97 issue, because there are many edge cases based on selection, location of block, location of cursor, etc. Copy and paste require some block-specific context, but they are magical so just acknowledging that.
Most of Roam's keybindings are not super necessary. The important ones that stand out to me are:
backspace
- deletes block if emptyindent
and shift-indent
ctrl-o
: open linkctrl-b
: boldcmd-z
: undocmd-shift-z
: undocmd-v
: paste (this is its own, lots of magic here)Do consider how this could fit into a plugin architecture: #63.
Non-root page example: #/page/AVOHMK6bK
My guess for why this is is that when the app is mounting, the datoms have not yet been loaded from Github. The solution would probably be to show a loading UI, and let all datascript queries wait in a queue until the datoms have been loaded.
I'd like to join in and chat, but the discord link currently in README.md leads to an error page!
Requirements:
reitit
is already being used on the front-end, and is Purely Functional's Top Choice.Note: these libraries/requirements are more of a suggestion and starting point than a final decision. These requirements can and may very well evolve or change.
Primarily interested in creating a sidebar and rendering favorites inside it.
If an entity has a :page/sidebar
attribute, it is in the sidebar. The value is an integer that represents the order in the sidebar list, indexed from 0.
Don't need to worry about write operations, e.g. adding or removing shortcuts, or rearranging items in the list. In terms of the links above the shortcuts, don't need to worry about Daily Pages until Phase 2, but there should be a link to All Pages which already exists.
Don't need to worry about showing/hiding the left sidebar, by default just show. Wouldn't mind a logo at the bottom. 😉
You will probably use the following attributes.
:block/children
:block/open
:block/order
See Datascript FAQ for more background on all attributes.
I'm not that familiar with Clojurescript. I downloaded, did yarn install, and was expecting npm start to work - or to find some scripts in package.json, but didn't find any.
Currently, some Roam users download the browser extension roam-toolkit to get additional features such as custom CSS overrides and additional keybindings.
Given that Roam is a text editor, it makes more sense to me that customizations be a native experience. Can we take inspiration from Atom and VS Code to see what a modern plugin architecture looks like? This architecture ideally supports a variety of use cases:
Some Inspirations
npm
packages on the client. A use case for this would be importing data visualization libraries and having ObservableHQ workflows inside your Athens. See #67.version
all productions builds e.g. 76d0881 (artifact here)
platform
Production build, Chrome 81.0.4044.138
problem
Page doesn't load
Under water:
For some reason the ?s
here in this query is not (always) a string. In dev this doesn't seem to matter or isn't the case
repro
Click on one of the page links or go to index.html#/page/04-02-2020
expected behavior
Display the page (like in dev)
DevCards isolates components so you can iterate on components in isolation from the rest of the app.
It's ClojureScript's Storybook.js, a development-time Design System.
Testable Clojurescript apps by Juxt goes deeper on dev/testing tools.
Most (if not all) of Clojure's options for developments environments allow the option of connecting your editor to the running instance of the program through an editor-integrated REPL. Do we have an option for this?
For athens, this would mean that we could do interactive queries of our roam datascript database from within the editor.
Some references:
Datascript is set-based so there is no implicit ordering to return values when you query for a collection. Therefore, if a block or a page has :block/children
, each of these children will have a :block/order
attribute with a natural number value. Only top-level children are being sorted now, but they should be sorted recursively.
See https://github.com/athensresearch/athens/blob/master/src/cljs/athens/subs.cljs#L63-L64
Modified
and Created
columns. Library discussion: #66 (comment)Don't worry about showing links within a page.
clj-kondo is helping us to keep code quality high. Right now, there are still many warnings. Let's fix this. Current output can be viewed here
If everything is resolved, the message here will disappear:
https://github.com/athensresearch/athens/runs/656191957#step:4:46
After resolving this, we can configure the linter to fail the build.
As follow up of #15, in tandem or maybe even beforehand, set up CI.
Github Actions (free for opensource) is the easiest, as it doesn't require any extra setup or new accounts.
Roam has been brought to its knees by the influx of new users. This means the documents linked from here to Roam are hard to access. Would it be possible to export them as markdown, and host them locally here on github?
Instaparse is the parsing library Athens and Roam use.
The code for Athens's parser can be found in src/cljs/athens/parser.cljs
I watched these videos to learn about EBNF Syntax, the parsing syntax used by Instaparse.
This blog shows an example of instaparse
that might be helpful for the link parsing.
There are many useful test cases for parsing at http://localhost:3000/#/page/fxi42G2zA, which is the, the page [[Nested [[Links]]]]
Basic markdown syntax: ![description](url)
See the linked md libraries.
Tricky part might be making the HTTP request.
No need to worry about resizing image since that requires writing datoms (e.g. Roam writes the height and width to :block/props
). Can do that in Phase 2.
According to OSS Watch, "It is never too soon to define a suitable governance model."
Things this governance document should include:
OSS Watch depicts projects in two dimensions:
What matters most to me beyond the categories and labels are transparency, inclusivity, and collective intelligence. I like to think we've done a good job of this so far.
How do we improve ClojureFam? Let's decentralize the process.
When a user open their Roam, they should automatically generate a notes page for the current
date. User should be able to scroll down to previous days.
Note: these Daily Notes pages are different from other pages in that their titles are not allowed to be changed. Attempt to do so leads to a warning.
When trying to run this on Windows with lein dev
I'm getting a lot of OutOfMemoryError
. When I visit localhost:3000
, there's only a blank page (but with the correct tab title and icon). Is my computer simply not powerful enough to run this?
Also, the blank page's source code says this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>athens</title>
</head>
<body>
<noscript>
athens is a JavaScript app. Please enable JavaScript to continue.
</noscript>
<div id="app"></div>
<script src="js/compiled/app.js"></script>
</body>
</html>
Requested by @anshbansal to test parser functionality.
Resources:
ctrl-f
testDid I do something wrong in setting it up or is athens really read-only for now?
#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.
Core meat of this issue is writing logic to scan through user's :node/title
s and :block/string
s when the input is changed, and showing first N recommendations. Don't worry too much about nice looking dropdown and other UX things. Can be handled by later issues when making user-friendly.
Search with [[]]
and (())
are actually subproblems of the search bar, since the search bar queries titles and blocks.
;; right sidebar
[:div (use-style sidebar-style {:class (if open? "is-open" "is-closed")})
...
;; left sidebar
(if (not @open?)
The consensus seems to be that the right sidebar in Roam is not a finished feature, in its current state. I've included some of my personal likes and dislikes of the right sidebar below.
Ultimately, I believe the ambitious designers and product people will want to recreate the right sidebar from the ground-up.
Thus, my questions to them would be:
Please provide a user story or flow to help me understand the problem and solution. 😄
+
and -
or a caret.Assigned to @jeroenvandijk
This issue covers importing only Roam's JSON export.
Requires generating :block/uid
s for pages since Roam's export lacks them... 🤷♂️🧐
Also, there are some properties in the JSON that may need to be omitted otherwise the datascript transaction throws an exception. Consider using clojure.spec
, specter
, or something like that to ignore non-essential attributes for now.
clojure.spec
can be used to determine the shape of the data: https://github.com/athensresearch/athens/blob/master/src/cljs/athens/db.cljs#L57-L6306-07-2020 Update
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.