Giter VIP home page Giter VIP logo

logseq-plugin-todo-master's Introduction

Logseq Plugin TODO Master

A simple plugin to render a progress bar to gather the overall progress of the TODO markers based on the rendering position.

Usage

Use slash command [TODO Master] Add Progress Bar to add a progress bar macro {{renderer :todomaster}} . The progress will be calculated based on the position of the macro.

  • If the macro has children blocks, it will show the progress of the children blocks
  • If the macro is at the root of the page (without a parent block) and has no children blocks, it will show the progress of the current page
  • If the macro is rendering in a block which has a query block, it will show the progress of the query block

Tips

Since this macro {{renderer :todomaster}} will display progress based on the rendering block, you can place it in the journal template, or in a query block title. Here are some examples:

Add TODO Master into the page's properties

progress:: {{renderer :todomaster}}

Add TODO Master into the query block's title

#+BEGIN_QUERY
{:title "{{renderer :todomaster}}"
    :query [:find (pull ?h [*])
            :in $ ?start ?next
            :where
            [?h :block/marker ?marker]
            [?h :block/refs ?p]
            [?p :block/journal? true]
            [?p :block/journal-day ?d]
            [(> ?d ?start)]
            [(< ?d ?next)]]
    :inputs [:today :7d-after]
    :collapsed? false}
#+END_QUERY

logseq-plugin-todo-master's People

Contributors

pengx17 avatar semantic-release-bot avatar testingbytes avatar waymedev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

logseq-plugin-todo-master's Issues

Request - ignore TODO in master block

Basically creating list with "TODO" prefix looks nice, but when using TODO Master with TODO in parent block, it is considered part of progress bar. Example:

  • TODO Parent || Progress bar ||
    • DONE element 1
    • DONE element 2
    • DONE element 3

The progress bar will show 75% - 3 elements are marked as done, but parent is not. Can the progress bar ignore TODO in parent?

Not an issue, just thanks!

I wasn't so sure what to use of this plugin when i saw it in marketplace. But once I started to plan things that should be done in any day within the week, I feel good! It's very helpful because I can track tasks across weeks. Thanks again ♥️

choice of font

hi,
i have set a custom font in my custom.css

:root {
	--content-font-family: "SF Pro Display";
}

would it be possible for your plugin to somehow fetch the defined font?

Support for block references?

Hi, thanks for the wonderful plugin!

I was wondering if it can also support tasks that come from block references / block embeds. What I like to do is to note tasks in my daily notes and then reference them in a project note, but the way the todo-master plugin works now doesn't allow for that.

Many thanks!

Display Error

As shown in the following figures, I typed some to-do lists.
image
And I gave each of them a property "tasktags", whose value is a page "[[TaskInJuly2022]]".
Then I wanted to outlist these tasks, so I used the slash command {{query (property tasktags [[taskinjuly2022]] )}}.
Finally, I got the result as below.
image
All progress displayed 25%, even there are some ones I have done.
I also use advanced queries command.
#+BEGIN_QUERY { :title [:h2 "2022年7月任务表"] :query [ :find (pull ?b [*]) :where [?b :block/properties ?p] [(get ?p :tasktags) ?t] [(= "[[TaskInJuly2022]]" ?t)] ] } #+END_QUERY
This is so weid, the progress is 0%.

The progress is not displayed in the queries title

Version:

  • todo master: v1.10.3
  • logseq: v0.9.4

Queries:

{
  :title "{{renderer :todomaster}}"
  :query [
    :find (pull ?b [*])
    :in $ ?start ?today
    :where
      (between ?b ?start ?today)
      [?b :block/marker ?m]
  ]
  :inputs [:-30d :today]
  :result-transform (
    fn [result] (
      sort-by (
        fn [h] (
          get-in h [:block/priority]
        )
      )
      result
    )
  )
  :breadcrumb-show? false
  :collapsed? false
}

Display result:

{{renderer :todomaster}}

Tracking target not found

Every time I refresh or relaunch the app progress bar stops working and displays this message:
Tracking target not found

Config to show fraction label by default

What
Currently, percent label is shown next to progress bar. Hovering it will change the percent to fraction:

Screen.Recording.2022-02-23.at.10.06.35.mov.mp4

Is there a config to flip the behavior so that by default, a fraction is shown and hovering the bar will change it to percent. Like this:

Screen.Recording.2022-02-23.at.10.08.54.mov.mp4

I'd prefer fraction as default because I can estimate the percentage by seeing the progress bar. And if I need to see the specific % value, i can hover it. For now, what I did is manually customizing the dist code (~/.logseq/plugins/logseq-todo-master/dist/assets/index.[some-hash].js):

.todo-master-progress-bar__percentage-label {
-  opacity: 1;
+  opacity: 0;
}

.todo-master-progress-bar__fraction-label {
-  opacity: 0;
+  opacity: 1;
}

.todo-master-progress-bar__label:hover
  .todo-master-progress-bar__percentage-label {
-  opacity: 0;
+  opacity: 1;
}

.todo-master-progress-bar__label:hover
  .todo-master-progress-bar__fraction-label {
-  opacity: 1;
+  opacity: 0;
}

[Question] How to use it with text expander

Hi,

Thanks a lot for this plugin (and the awesome Dev theme as well). I was wondering if there is a way to insert the progress bar command (e.g., [TODO Master] Add Progress Bar for current page) in a logseq template or in some text snippet application such as text expander, so when using the text snippet the progress bar is added automatically.

Thanks in advance!

Support for queries

Hello, I just started using this plugin and I was wondering if it is possible for it to work with queries?

What I do is everyday I query for all TODOs in the last 7 days or so. I am also experimenting with querying TODOs for a specific page.
The problem is that the progress bar does not seem to detect the TODOs in the query block.
image

I might be doing something wrong but, if not, is it possible to support this use case?

Unable to create a template with "Add progress bar to children blocks"

Hello,

I'm having trouble creating templates that self reference when used.

Whenever I USE a template in a journal page, the progress bar doesn't update as it is still referencing the original template block.

Is there any "Dynamic Variables" config for this? Thanks for the help!

could support to create progress bar in block property?

Thanks for your plugin, I use it every day, and I find a inconvenient behavior of this plugin.

I want to create a progress bar in block property, then I could use the query table function to collect the major task's progress, I don't want to create a page for these tasks, because even they have many sub-tasks, they are not a specific concept or object.

It will looks great when the tasks and progress showed in table view, but since the Logseq not support show the checkbox in table view, the question could be solved after logseq add the feature.

could give a background color for TODO/LATER?

If there are only TODO status in a block, then the TODO master will show an empty bar, that is confusing. Users might guess is there have tasks TODO or have no tasks at all?

Therefore, if it possible to add background color for TODO, and if there is no task then show the empty background?

is there a way to avoid error on android ?

Hi,

Thanks a lot for your addon. It's very useful on my laptop but on my android I just see a large deep red "{{render :todomaster}}".

Is there a workaround by any chance to make this silent ?

Thanks!

Add WAITING to progress bar

Request: Would it also be possible to add WAITING tasks to the progress bar of Todo-Master? (=nice to have)

Thank you for developing logseq plugins. Wkr. Rene

Jumpy progress bar on block hover

Hi there,

For some reason, the progress bar is a bit jumpy for me. Not sure how to describe it any better, so here is a GIF.
image

Logseq version: 0.8.8
TODO master version: v1.10.3
OS: Win 10

Also, huge thanks for this extension, amazingly helpful!

Feature request: Display "No progress to track" when there are no tasks to track

Problem: I'm using the extension for all of my meetings, and it is crucial for me to quickly identify any open tasks. Currently, it's somewhat challenging to differentiate between having no tasks and having only open tasks, as both display "0%". The only distinction is a slight color variation in the progress bar.

Solution: Display "No progress to track" when there are no tasks to track (refer to screenshot)

image

I have implemented the illustrated solution in my fork:
https://github.com/muhahaaa/logseq-plugin-todo-master/blob/a725b2fa741256a09a988290562de692ec0544a8/src/progress-bar.tsx#L42

The only change necessary was in the declaration of the shortText variable:
const shortText = total === 0 ? `No progress to track.` : `${percentage}%`;

DOMException: Blocked a frame with origin "lsp://logseq.io"

Hi,

I noticed an error in logseq console related to the plugin

[LSPlugin Ready Error] DOMException: Blocked a frame with origin "lsp://logseq.io" from accessing a cross-origin frame.
    at ke.P (lsp://logseq.io/logseq-todo-master/dist/assets/index.87bfa7fe.js:85:3012)
    at ke.ready (lsp://logseq.io/logseq-todo-master/dist/assets/vendor.c775ebdb.js:10:17058)

Show Progress of Priority Group

I would like to use {{renderer :todomaster}} to display the progress of a certain priority group e.g. for all ToDo's tagges with Priority #C. Is this already possible or would this be considered a feature request? If it is already possible I would be interested in knowing how.

When there is more than one progress bar on the page, it cannot be displayed properly.

Thank you so much for the great plugin! I use it everyday.

After I upgraded Logseq (0.6.7) yesterday, the TODO Master (v1.9.4) had the following issue.
Everything worked fine before.

  • Scenario 1: I will use TODO Master on the daily Journal page. Now when I scroll down the Journal page, only one of the bars is displayed for the entire page (instead of one bar per daily journal).
  • Scenario 2: I use TODO Master in different blocks (with sub-items) in a project, and now only one of the bars is displayed, and the bar will incorrectly display the progress of other parent bolcks.
  • Scenario 3: The TODO Master progress bar displayed in Linked References has the same problem.

I've tried refreshing, re-indexing, and reinstalling the plugin multiple times, and the issue persists.

I love TODO Master! Thank you.

Screen.Recording.2022-05-02.at.10.14.26.mov

m

Progress bar inside query not working, seems not updating

Progress bar inside query not working, seems not updating

Query used:

#+BEGIN_QUERY
{:title "{{renderer :todomaster}}"
:query [:find (pull ?b [* {:block/_parent ...}])
:where
[?b :block/marker ?marker]
[(contains? #{"LATER" "NOW" "TODO" "DOING"} ?marker)]

[?b :block/ref-pages ?p]
[?p :block/name ?tag]
[(contains? #{"personal"} ?tag)]]

}
#+END_QUERY

Screenshot
latest logseq release .10
image

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.