roamjs / query-builder Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://roamjs.com/extensions/query-builder
License: MIT License
Home Page: https://roamjs.com/extensions/query-builder
License: MIT License
Trying to understand how to do a query that doesn't find it's own results (doubling them). Becuase it if finding the blocks in the query scratch folder.
results
And if I show results as emded view, It starts rendering recursively nested blocks and blows up app.
from this:
I tried filtering by ancestor clause, but it seemed slow and crashed the app or froze.
Related: How to find only a top level item? How to find and item that is referenced by a page with a certain namespace (partial page text match?)
It looks like the query pane is only about 40% of the available width, no matter how wide the Roam window is. This makes the query builder widget hard to use in the first place, and the results pane ridiculously narrow for results with more than two columns.
I'm observing this problem in multiple graphs on multiple platforms.
Related to #128
When adding to the docs, we want to point to https://blueprintjs.com/docs/#icons/icons-list or even https://blueprintjs.com/docs/versions/2/#icons to let users know the total icon options available for action:{action}:{icon}
, but not all icons render:
Version issue? From qb package-lock.json
Yet, icon is listed in node_modules\@blueprintjs\icons\lib\esm\generated\iconNames.d.ts
I've been facing two issues:
My query builder used to work fine and show all the items in the list. But it has become like this for a few days now and no matter how many times I delete and reinstall the extension (either manually or via the roam depot which was added recently) it does not fix the 2 issues mentioned above.
I'm not sure if its something I've done to my roam graph or something with the extension itself, so I thought i'd ask here.
Thanks anyway for the great extension.
Support an icon to copy the datalog.
Fix the new line indenting to create the following output:
[:find
(pull ?node [:block/string :node/title :block/uid])
(pull ?node [:block/uid])
:where
[?test :node/title "test"]
[?node :block/refs ?test]
]
From Ivo
A small suggestion: like with other query builders, it will be way more convenient if the result count appears on top and not at the bottom so it can be seen right after running thought the need to scroll.
When results height is higher than viewport height, a user has to scroll to see number of results / change page, eg:
Example
https://query.wikidata.org/
returnNode
QueryEditor
and ResultView
and determine which we could π₯As of Roam build 0.0.17 (0.0.17), each time I change sort order, the query fails to render, though the header does display the correct number of items. This also occurs when setting any default sort order other than Alphabetical. Disabling the extension causes the queries to render as expected.
Following up on @mdroidian's feedback from here: #74 (review)
We started some of this work here: 2512bc1
Left to do:
Autocomplete
needs to accept id
prop.BRANCHES
in an or
A common pattern I've been doing is assigning rows a Priority attribute and then sorting by that.
This is pretty un-user-friendly and also sorting should be specific to the query builder board, not specific to the task itself.
The output should be reusable by other layouts in a sensible way
Then the QUERYBUILDER smartblock command should be able to reference these aliases from the block or from the page name
Joel loved this feature
I have Discourse Graph installed in two graphs.
In both I have a multiple queries finding nodes referencing multiple titles and created by
.
And in both graphs, the creator of the graphs name doesn't show up.
Multiple other username show up .
The name of the creator of the graph shows up when I hover over nodes he creates / edits.
His name also shows up in the selection
of of Author
and Last Edited By
.
I tried manually typing in his name, but it still doesn't show up.
I also tried disabling Discourse Graph and enabling Query Builder via Roam Depot, but no luck.
Any idea what might be causing this or how I might debug it?
Steps to repo:
https://samepage.network/releases/dvargas92495/roamjs-query-builder/
roam/js/discourse-graph
and preview any relationI believe the issue is when a source / destination are the same discourse node (EG: Claim Opposes Claim
)
Query sent
[:find
(pull ?Claim [:block/string :node/title :block/uid])
(pull ?Claim [:block/uid])
(pull ?Claim [:node/title :block/uid :block/string])
:where
[?5VkECBqtF-SPage :node/title "OpposedBy"]
[?5VkECBqtF-SBlock :block/refs ?5VkECBqtF-SPage]
[?5VkECBqtF-SBlock :block/children ?5VkECBqtF-Block]
[?5VkECBqtF-Block :block/refs ?5VkECBqtF-Page]
[?5VkECBqtF-Page :node/title ?5VkECBqtF-Page-Title]
[?5VkECBqtF-Page :block/uid ?5VkECBqtF-Claim-uid]
[?Claim :block/uid ?5VkECBqtF-Claim-uid]
[?5VkECBqtF-ParentPage :block/uid ?5VkECBqtF-Claim-uid]
[?5VkECBqtF-ParentPage :node/title ?5VkECBqtF-ParentPage-Title]
[?Claim :block/uid ?5VkECBqtF-Claim-uid]
[?5VkECBqtF-PBlock :block/refs ?5VkECBqtF-ParentPage]
[?5VkECBqtF-PBlock :block/children ?5VkECBqtF-SBlock]
[(re-pattern "^\\[\\[CLM\\]\\] - (.*?)$") ?5VkECBqtF-CLM-.*?$-regex]
[(re-pattern "^\\[\\[CLM\\]\\] - (.*?)$") ?5VkECBqtF-CLM-.*?$-regex]
[(re-find ?5VkECBqtF-CLM-.*?$-regex ?5VkECBqtF-Page-Title)]
[(re-find ?5VkECBqtF-CLM-.*?$-regex ?5VkECBqtF-ParentPage-Title)]
]
Making each claim in the query unique returns the expected results
?5VkECBqtF-Claim-uid
?5VkECBqtF-CLM-.*?$-regex
?Claim
[:find
(pull ?Claim1 [:block/string :node/title :block/uid])
(pull ?Claim1 [:block/uid])
(pull ?Claim2 [:node/title :block/uid :block/string])
:where
[?5VkECBqtF-SPage :node/title "OpposedBy"]
[?5VkECBqtF-SBlock :block/refs ?5VkECBqtF-SPage]
[?5VkECBqtF-SBlock :block/children ?5VkECBqtF-Block]
[?5VkECBqtF-Block :block/refs ?5VkECBqtF-Page]
[?5VkECBqtF-Page :node/title ?5VkECBqtF-Page-Title]
[?5VkECBqtF-Page :block/uid ?5VkECBqtF-Claim1-uid]
[?Claim1 :block/uid ?5VkECBqtF-Claim1-uid]
[?5VkECBqtF-ParentPage :block/uid ?5VkECBqtF-Claim2-uid]
[?5VkECBqtF-ParentPage :node/title ?5VkECBqtF-ParentPage-Title]
[?Claim2 :block/uid ?5VkECBqtF-Claim2-uid]
[?5VkECBqtF-PBlock :block/refs ?5VkECBqtF-ParentPage]
[?5VkECBqtF-PBlock :block/children ?5VkECBqtF-SBlock]
[(re-pattern "^\\\\[\\\\[CLM\\\\]\\\\] - (.*?)$") ?5VkECBqtF-CLM1-.*?$-regex]
[(re-pattern "^\\\\[\\\\[CLM\\\\]\\\\] - (.*?)$") ?5VkECBqtF-CLM2-.*?$-regex]
[(re-find ?5VkECBqtF-CLM1-.*?$-regex ?5VkECBqtF-Page-Title)]
[(re-find ?5VkECBqtF-CLM2-.*?$-regex ?5VkECBqtF-ParentPage-Title)]
]
Wonder if we should remove that entirely from roamjs-components given Roam Depot...
Let's also knock out the bug surrounding refreshing results in drawer
@dvargas92495 Is there a way to merge to main without triggering a PR to Roam Depot.
Use Case:
I was under the impression that updating the version triggered the PR, but this latest commit looks like it triggered it as well.
#134
Initial report on slack
Steps to replicate.
created date
random
5
created date
Seems like Feb 7 roam API changes makes renderBlock
render the whole page
See #39 (comment) for additional context
From Michael Shulman: https://roamresearch.slack.com/archives/C04H4739402/p1682454297896769
Would it be possible to allow resizing Query columns? Thereβs a lot of lost space without that affordance.
Joel has been asking for ages
This would remove the need for that sort icon element bc you could just create your own view to sort
While making the docs for #44, I noticed that missed looking at Query Drawer
/ Query Pages
Query Drawer
doesn't serve a purpose
I thought the same would be true for Query Pages
... but ...
Where is {{query block:whyDoesThisWork}}
stored for Query Pages
?
adding this check to QueryEditor.tsx to remove it from the Query Drawer
const isQueryDrawer = getPageTitleByPageUid(parentUid) === "roam/js/query-builder/drawer";
I've tried clearing the cache and loading in both iOS safari and chrome.
I tried updating both Roam and the Roam Depot extensions.
Error in load-extension for extension: Query Builder
Line: 60
sourceURL: blob:https://roamresearch.com/e29c9ef5-e649-4c28-8c6c-9e76884cd871
My last two builds failed with Bad credentials
and Failed to read commit message
What might this be referring to? @dvargas92495
Run npx samepage build
src built with 0 errors
Preparing to publish zip to destination query-builder as version 1.8.16
Error: Failed to read commit message for de527d8f68585f375c514d9150f240e0689e1d24 in dvargas92495/roamjs-query-builder:
{"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}
at /home/runner/work/roamjs-query-builder/roamjs-query-builder/node_modules/@samepage/scripts/build.js:39:46
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async publish (/home/runner/work/roamjs-query-builder/roamjs-query-builder/node_modules/@samepage/scripts/build.js:36:29)
Error: Process completed with exit code 1.
Other related changes needed:
extraColumn
field needs to be replaced by selectionsA 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.