Git Product home page Git Product logo

query-builder's People

Contributors

dvargas92495 avatar mdroidian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

query-builder's Issues

Alias on Query Drawer / Query Pages

While making the docs for #44, I noticed that missed looking at Query Drawer / Query Pages

Query Drawer doesn't serve a purpose
image

I thought the same would be true for Query Pages ... but ...
image

Where is {{query block:whyDoesThisWork}} stored for Query Pages?

Possible solution

adding this check to QueryEditor.tsx to remove it from the Query Drawer

const isQueryDrawer = getPageTitleByPageUid(parentUid) === "roam/js/query-builder/drawer";

Find 'node' where

I've been facing two issues:

  1. The default query that appears in pages and within blocks shows 'Find nodes where'
  2. My list of selections are very few compared to the one shown in the video.

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.

Build Failed

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.

Add Number of Results and Pagination to the top or Results View

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:

  • user sets shown results to a large number
  • embedded column view (page or long block)

Example
https://query.wikidata.org/
image

PRs to Roam Depot

@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

Query results showing up in query results (recursively)

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.

image

results

image

One has this path:
image

And if I show results as emded view, It starts rendering recursively nested blocks and blows up app.
from this:
image

to this:
image

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?)

Allow for custom sorting and prioritization

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.

Relations missing in JSON export

I 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)]
]

Question: How do I add an "or" condition?

I have a case where I want to add a condition where the page referenced could be either #p1 or #p2 or p3. If I add these as separate conditions it looks like it adds em as an "and" operation.

How would you go about achieving this? I'm sure i'm doing something wrong here πŸ™ˆ
image

Sortable Linked References icon disappears

Sortable Linked References icon only appears when having the button switched off and on again. (It happens that the icon disappears after reloading Roam while this option having switched on in settings)

Screenshot 2023-01-08 at 15 23 19

Cannot find Creator of Graph for "Created By" Condition

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?

Why are the query panes so narrow?

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.

Screenshot 2023-08-18 at 8 11 27 PM

I'm observing this problem in multiple graphs on multiple platforms.

node is only target option

Installed this via RoamDepot (previously it was installed via Roam marketplace)
query builder issue

I only get an option for Node as a target

Make copy/pasting datalog easier

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]
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.