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: hide journals in page graph #6120
Conversation
add "Show Journals" toggle in page-graph-inner add :right-side-bar/show-journals in en and it (dicts.cljc) add "include-journals" parameter to db/get-pages-that-mentioned-page add "show-journal" parameter to graph-handler/build-page-graph
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.
LGTM
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.
@8N9KT This looks great. As you're modifying a db namespace, it would be helpful to have a test to demonstrate this feature works as described. Could you add such a test to model_test.cljs
? Some tips for testing:
- See https://github.com/logseq/logseq/blob/master/docs/dev-practices.md#unit-testing for running tests. Focus tests are probably easiest for just running your tests
- There's already an example in your test file and there are more examples in https://github.com/logseq/logseq/blob/master/src/test/frontend/db/query_dsl_test.cljs for examples. Use
load-test-files
to create files andtest-helper/test-db
is therepo
value to pass to your db function
Happy to answer any questions as they come up
- add test for get-pages-that-mentioned-page with show-journal paramenter - comment deleted
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.
@8N9KT Thanks for the feature and addressing feedback! 👍 🚢
@@ -82,4 +82,33 @@ | |||
;; 1 (count a-ref-blocks) | |||
;; (set ["b" "c"]) (set alias-names)))) | |||
|
|||
(deftest ^:focus get-pages-that-mentioned-page-with-show-journal |
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.
Normally we remove metadata after using them since it can effect someone else trying to run the same focused tests. I don't mind removing this one but would be good to remove these in the future
add toggle in page graph the hide journals page
Note: only the journals which mention page are hidden, the journals which are mentioned by the page remain visible