-
Notifications
You must be signed in to change notification settings - Fork 165
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
Removing fuzzy NOW
date
#612
base: master
Are you sure you want to change the base?
Removing fuzzy NOW
date
#612
Conversation
* less internal values for the Date class, introducing the use of `__slots__` * introducing Accuracy * allowing comparison across accuracies * cleaning some unused Task method related to Dates * Redoing date xml dumping (dates are now dumped and read in xml at the best of their accuracy, getting rid of xml_str, which is a duplicate of str)
Now is used to mark something as urgent, so it flies up to the top when sorting (at least that's the idea). This is worth thinking about though. Since now doesn't always end up at the top. If we use the current date instead of a fuzzy now, tasks would go into overdue and move to the top. Whereas using "fuzzy now", means something like "ASAP". (it's probably easier to see in an image) I wonder if we could simplify our fuzzy-ness. Do we really now and soon? (Also I summon @nekohayo to weigh in on this) |
Yeah I do use "now" and "soon" extensively, basically for pinning some tasks as first and second priorities without being specific-deadline-sensitive. I suppose a decent amount of users make use of that too. I would like to retain the ability to do so, I don't see what we gain from removing those statuses? At first when I looked at the description above I thought it was about fixing some odd backend distinction somewhere, but if you're saying that the status is pointless to have at all, I'd say I disagree with that; "now" always remains "now" without being attached to a particular date, being top-of-the-line without being more urgent than overdue date-specific tasks... |
Well this has been written a while ago so I'm speaking from memory alone but the idea isn't to remove either display of the now or natural language parsing for auto setting the due date but to actually remove the fact that, internally, when parsing a now, So yeah, PR isn't done but it's mainly to discuss the idea of:
It'd also be the occasion of moving the entire logic of date parsing out of the date module. |
Coming back to this. As far as I understand,
Not too sure about this, since we don't do hours at all in due/start dates. Also if you are doing pomodoro or other time-block systems, +/- 1hr is about three different blocks (possibly assigned to different tasks). |
@jaesivsm Any new plans regarding this PR or should we close it? |
The size of the blocks is totally up to discussion, I was merely proposing this.
I'm more than willing to work on it, but does the main principle of the PR has any appeal to anyone ? To reformulate I would say my idea was to :
|
This does sounds interesting, I mean we could drop the entire date class altogether, but what about "someday"? |
Yes and now, the date class provides nice shortcut for date localization and displaying (also parsing). But they could be just method regrouped in a module which always returns
|
But how do you store them? |
…Oh. I think I finally see why you might want to propose this whole idea, now.
Those two concepts combined is the only reason I can imagine why you would want to go through this trouble... to allow "temporarily pinning" (or reversibly pinning) to the top, without sacrificing the exact duedate value once the task "unpins" itself (or the user unpins it). Is that what you wanted to achieve? In that case, I suspect both me and @diegogangl can picture ourselves in what you are aiming to accomplish here. I am sorry that it has taken me so long to come back to look at tickets and MRs (now that the big refactoring cycle has been completed). It might help to clarify the title of this PR to not sound like it's just about removing functionality. I'm no backend/format expert, but in that case I guess this could be accomplished with another "pinned-until" property (or something like that) which allows pinning a task to the equivalent of "now", forever or up until a certain date? Others will certainly have more precise thoughts than me on the matter of implementation. |
IIRC @jaesivsm was referring to a backend POV. The UX would be unchanged because "now" would turn to "yesterday" and still show up high in the list of tasks when sorted by due date. Removing 0.7 milestone for this since it's going to take some more consideration (and a rebase). Also, we've had more than enough refactoring for one release :) |
While rebasing #597, I observed something strange,
Date.now()
,Date('now')
,Date.parse('now')
and all the variations around that pattern returns a fuzzy date. Which brings me to the following two points :NOW
ain't fuzzy x) it's just now, so it's conceptually weird to mark it as fuzzyNOW
and comes back tomorrow, it won't be "Yesterday" then, it'll still beNOW
.I open that PR to discuss the opportunity and implementation of changing that behaviour and make all
NOW
return straight forwarddatetime.now()
in aGTG.core.dates.Date
instance.(That PR is based on #597 and includes code from that PR, I'll clean the whole stuff before merging if it's decided to be so).