Skip to content
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

Athena auto #141

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions src/cljs/athens/devcards/athena.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,22 @@
[cljsjs.react]
[cljsjs.react.dom]
[datascript.core :as d]
[devcards.core :refer-macros [defcard-rg]]
[devcards.core :refer-macros [defcard defcard-rg]]
[re-frame.core :refer [subscribe dispatch]]
[reagent.core :as r]))


(defcard-rg Import-Styles
[style-guide-css])

(defcard "
## [Issue #126](https://github.com/athensresearch/athens/issues/126)
")

(defcard-rg Instantiate-app-db
"Using re-frame, even though DevCards </3 re-frame. Not using re-frame elsewhere for subs, but will probably
need refactoring or real isolation later.

- https://github.com/athensresearch/athens/issues/126
- https://github.com/bhauman/devcards/issues/105
- https://github.com/bhauman/devcards/pull/131/
")
(defcard-rg Import-Styles
[style-guide-css])


(defcard-rg Instantiate-DBs)
(dispatch [:init-rfdb])

(defcard-rg Instantiate-Dsdb)
(defonce conn (new-conn))
(posh-conn! conn)

Expand All @@ -46,7 +40,7 @@


(defcard-rg Create-Page
"Press button and then search \"test\" "
"Creates pages and blocks with the string \"Test\" in them."
[:button.primary {:on-click handler} "Create Test Pages and Blocks"])


Expand Down Expand Up @@ -183,7 +177,8 @@
[:input (with-attributes +athena-input
{:type "search"
:placeholder "Find or Create Page",
:on-change handler})]]
:on-change handler
:auto-focus true})]]
[recent]
[(fn []
(let [[query {:keys [pages blocks] :as result}] @*match]
Expand All @@ -203,7 +198,6 @@


(defcard-rg Athena-Prompt
"Must press again to close. Doesn't go away if you click outside."
[:<>
[athena-prompt]
[athena conn]])