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

feat: v1 queries table view for tasks #2336

Merged
merged 23 commits into from
Sep 6, 2022

Conversation

tangjeff0
Copy link
Collaborator

@tangjeff0 tangjeff0 commented Aug 31, 2022

Can edit title, shows derived hierarchy if it exists, etc. Can't edit other fields yet, while Stuart is working on picker component.

image

@vercel
Copy link

vercel bot commented Aug 31, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
athens ✅ Ready (Inspect) Visit Preview Sep 6, 2022 at 9:30AM (UTC)

* 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
Comment on lines 532 to +540
(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]))))
Copy link
Collaborator Author

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

@tangjeff0 tangjeff0 marked this pull request as ready for review September 6, 2022 09:19
@tangjeff0 tangjeff0 changed the title Queries table view feat: v1 queries table view for tasks Sep 6, 2022
Comment on lines 430 to +442
(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")))
Copy link
Collaborator Author

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.

Comment on lines 430 to +442
(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")))
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants