-
-
Notifications
You must be signed in to change notification settings - Fork 399
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: v1 queries table view for tasks #2336
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* feat: readable table query * fix: clearer style for disabled taskbox * improvement: neater query table
* feat: readable table query * fix: clearer style for disabled taskbox * improvement: neater query table * feat: block in row toggle and children counter * feat: block in row toggle and children counter * feat: more goodies in query table
(defn handle-escape | ||
"BUG: escape is fired 24 times for some reason." | ||
[uid e] | ||
[e uid {:keys [esc-handler] :as _state-hooks}] | ||
(.. e preventDefault) | ||
(if @(rf/subscribe [::inline-search.subs/type uid]) | ||
(rf/dispatch [::inline-search.events/close! uid]) | ||
(dispatch [:editing/uid nil]))) | ||
(if (fn? esc-handler) | ||
(esc-handler e uid) | ||
(if @(rf/subscribe [::inline-search.subs/type uid]) | ||
(rf/dispatch [::inline-search.events/close! uid]) | ||
(dispatch [:editing/uid nil])))) |
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 added an esc-handler for some of task title editors on kanban and table views. In those cases, esc should cancel the title edit, and blurring should save. Wanted to bring this to your attention @neotyk to double-check this is an ok way to do things
(defn get-entity-type | ||
"Returns the value of eids `:entity/type` prop, if any." | ||
[db eid] | ||
(->> (d/entity db eid) | ||
:block/_property-of | ||
(some (fn [e] | ||
(when (-> e :block/key :node/title (= ":entity/type")) | ||
(:block/string e)))))) | ||
(let [prop-entity-type (->> (d/entity db eid) | ||
:block/_property-of | ||
(some (fn [e] | ||
(when (-> e :block/key :node/title (= ":entity/type")) | ||
(:block/string e))))) | ||
page (get-page-title-from-eid db eid)] | ||
(cond | ||
prop-entity-type prop-entity-type | ||
page "page" | ||
:else "block"))) |
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.
This is a sort of centralized type aggregator / schema.
(defn get-entity-type | ||
"Returns the value of eids `:entity/type` prop, if any." | ||
[db eid] | ||
(->> (d/entity db eid) | ||
:block/_property-of | ||
(some (fn [e] | ||
(when (-> e :block/key :node/title (= ":entity/type")) | ||
(:block/string e)))))) | ||
(let [prop-entity-type (->> (d/entity db eid) | ||
:block/_property-of | ||
(some (fn [e] | ||
(when (-> e :block/key :node/title (= ":entity/type")) | ||
(:block/string e))))) | ||
page (get-page-title-from-eid db eid)] | ||
(cond | ||
prop-entity-type prop-entity-type | ||
page "page" | ||
:else "block"))) |
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.
This is a sort of centralized type aggregator / schema @sid597
Can edit title, shows derived hierarchy if it exists, etc. Can't edit other fields yet, while Stuart is working on picker component.