Git Product home page Git Product logo

Comments (4)

debajyoti1990 avatar debajyoti1990 commented on May 28, 2024

Below is one sample output in my terminal.

image

from ttdl.

VladimirMarkelov avatar VladimirMarkelov commented on May 28, 2024

It is reproducible on any OS as it was designed this way from the beginning 😄 But I am not saying that it must remain this way forever.

Let me explain why I chose this way. In the very beginning I used a thirdparty library to parse and process tasks in todo.txt format. Its feature was: remove all tags while parsing and add some of them to the end of the task. If I am not mistaken, only standard tags like "rec", "thr", and "due" were hidden. First I noticed that ttdl list did not displays my tasks in the same way I composed them. The I found that tag processing code. And finally I realized that I do not like that way because of 2 main troubles:

  • some tags can be part of a message and deleting or moving tags can ruin the task text. Example off the top of my head (maybe it does not look very real but you get the idea). If you add a task order online on loc:amazon a xmas gift by due:2022-12-15, ttdl list shows it as order online on a xmas gift by loc:amazon. As you see, its meaning becomes a bit hard to get
  • in the beginning it was confusing when the text in the screen did not match what I entered
  • I was not able to copy a task from screen and use it to create a new similar task because standard tags are hidden

Hence, we have to agree on some stuff before starting the implementation. Here are my thoughts:

  1. In any case there must be a way to display subjects as-is. At first sight, it seems that a good solution is to hide some (more about it in the next bullet points) tags and show the entire subject with a command-line option(not sure about its name yet). In addition, it makes sense to introduce a config option like show_subject with possible values at least full(or as-is) and auto (it can be more values depending on many things)
  2. Do not forget that you can hide any column. e.g list --fields=pri. What about due in this case? My idea is to hide only things that are already displayed in another columns. So, when displaying all the fields, due and thr would be removed from the subject when printing. I do not think we need an option for this: auto can be good enough.
  3. There is a way to display any tag in its own column by using custom columns feature. I guess TTDL should hide all custom tags(if columns are displayed) in subject as well.
  4. Let's looks at the issue #77. After it is implemented, another question will arise: do we want to hide project/context in subject column to avoid duplication? First thought: yes, it should. Second thought: what if project/context is a part of meaningful message and removing it ruins the message?

What do you think?

from ttdl.

debajyoti1990 avatar debajyoti1990 commented on May 28, 2024

Your points are very much valid, I get the idea. Actually the .gif in github homepage was showing due only once, that's why I thought there might be something I am missing or something broke in latest release, although I vaguely remember I saw this in last release also.

I think hiding due column is a good option. I have not tried it yet, will try. I was thinking maybe it was possible to strip all tags like due, context or project from subject and show the remaining.

from ttdl.

VladimirMarkelov avatar VladimirMarkelov commented on May 28, 2024

I see. I suspect that I took the screenshot before I replaced the thirdparty todo.txt library with my own parser 😄

Another case when seeing all tags in the subject is useful: when listing with --human. In this case, column Due displays often approximate value like 2w or 5m, but subject displays the exact due date:

 # D P Created  Due          Subject
-------------------------------------
44     2w ago   in 5m        doctor checkup due:2023-10-11

Though, it may be not frequent case.

Anyway, let's sum everything up. As we agreed at some points, my current roadmap is:

  • add a config option global.hide_elements. Possible values are auto(default - hide everything that is duplicated in subject and any other column), tags (hide only duplicated tags, but keep subject/context - for cases when subject/context are part of the message), none (do not hide anything - it is how it works at this moment)
  • add a command-line option --hide with the same 3 values as above (to override the config value)

If needed, we can add more values to the list for more fine-grained control. But I doubt we do it any time soon.

from ttdl.

Related Issues (20)

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.