-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(datalog-console): add datalog-console #91
Conversation
src/homebase/datalog_console.cljs
Outdated
(:require [goog.object :as gobj] | ||
[cljs.reader])) | ||
|
||
(js/document.documentElement.setAttribute "__datalog-inspect-remote-installed__" true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
":datalog-console.remote/installed?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that these special characters are not allowed as an attribute on html document. Changed it to "datalog-console-remote-installed"
src/homebase/datalog_console.cljs
Outdated
|
||
(js/document.documentElement.setAttribute "__datalog-inspect-remote-installed__" true) | ||
|
||
(defn init-datalog-console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to init!
src/homebase/react.cljs
Outdated
@@ -7,7 +7,10 @@ | |||
[clojure.set] | |||
[homebase.js :as hbjs] | |||
[datascript.core :as d] | |||
[datascript.impl.entity :as de])) | |||
[datascript.impl.entity :as de] | |||
[homebase.datalog-console :as console])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:as datalog-console
src/homebase/react.cljs
Outdated
@@ -134,6 +137,7 @@ | |||
conn (d/create-conn (if schema | |||
(merge (hbjs/js->schema schema) base-schema) | |||
base-schema))] | |||
(console/init-datalog-console {:conn conn}) ; initialise listener for datalog admin console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the comment is needed. The naming is clear enough
…omebase-react into datalog-console-integration
🎉 This PR is included in version 0.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
(:require [goog.object :as gobj] | ||
[cljs.reader])) | ||
|
||
(js/document.documentElement.setAttribute "__datalog-console-remote-installed__" true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@groundedsage it looks like this breaks Next.js support for HBR with the following error:
error - ReferenceError: document is not defined
at /Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:1491:479
at /Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:6:22
at Object.<anonymous> (/Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:10:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at eval (webpack-internal:///homebase-react:1:18)
Installing CLJS DevTools 1.0.2 and enabling features :formatters :hints :async
ReferenceError: document is not defined
at /Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:1491:479
at /Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:6:22
at Object.<anonymous> (/Users/jb/repos/supabase-js/example/next-todo/node_modules/homebase-react/dist/js/homebase.react.js:10:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at eval (webpack-internal:///homebase-react:1:18)
CLJS DevTools: some custom formatters were not rendered.
https://github.com/binaryage/cljs-devtools/blob/master/docs/faq.md#why-some-custom-formatters-were-not-rendered
CLJS DevTools: some custom formatters were not rendered.
https://github.com/binaryage/cljs-devtools/blob/master/docs/faq.md#why-some-custom-formatters-were-not-rendered
Can you please do error catching here and make it a warning when it fails vs breaking compilation?
PR Description
Adds a way to signal that a Datalog DB is available to the Chrome extension.
Adds a listener to receive a request for the database as a string and send it as a string to the Chrome extension.
PR Checklist
Testing
Docs
Typescript
Merging
For maintainers.
To merge, select "Squash and Merge". Then: