-
-
Notifications
You must be signed in to change notification settings - Fork 235
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: Add new priorities: highest and lowest #1943
feat: Add new priorities: highest and lowest #1943
Conversation
Hi, thank you for the suggestion. It would have have been helpful to us both to have had a chance to discuss the ideas in this before you did so much work.
Could you please explain your reasoning behind the above statement? I do not recall any previous requests for more priority levels. |
Some of the tests have failed, but I recommend not investigating them whilst the principles of the change are still being considered. |
oh, yeah, seems that the tests for Suggestor needs to be fixed too. I can do that, but as you said, let's discuss everything first.
Well then, maybe I'm first? As I'm developer myself, I thought that instead of issuing a request for a feature, I can help 🙂 and implement it myself. So it seems it's not only me, but other users would like this feature too. Another thing worth considering is that this change has a rather small impact and it's not introducing a lot of complexity to the plugin, so it shouldn't be a problem to add this. |
I appreciate that. As the following in the Tasks Contributing Guide says, it's not mandatory to discuss in advance, but it does help... https://publish.obsidian.md/tasks-contributing/Contributing/Updating+code Thank you for the links. Neither of the examples is a request for more priorities, though - and it's interesting to me that in #6, this plugin's author, even though having mentioned highest and lowest, went ahead and implemented without them. I read #1366 (comment) as mainly about the visual display of priorities, not the number of them. I'm still keen to understand, though, what are your specific reasons for needing more priorities? In the meantime, I'll go ahead and make some initial comments on the changes in the code. |
OK I'll take the fact that these new names already exist in Jira as good enough motivation!!! |
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.
I had a read-through of the code, and tried the new code out - sorting, grouping, searching, auto-suggest, dataview format.
It worked well in all the areas changed.
As well as the changes already made, there are quite a few documentation references that will need updating please. But I suggest holding off doing that until the code is finalised.
Well, I started lately moving from other task management apps to Obsidian, I really like it and this plugin in particular too. But, I have a lot of tasks, and priority feature helps me to, well, prioritize what should I be doing in which order. These tasks are usually not really time-related things, so assigning due date doesn't really make sense. But, when you have only 4 levels of priority there is not really enough granularity. Especially, considering that I'm a bit reluctant of setting many tasks to "high" at the moment, as the highest possible priority is something that makes you consider a task to be done ASAP. And there can't be many things which you can really do ASAP. So that leaves me with 3 priorities really for ~100 tasks. |
Perfect. I had not thought of priorities like this, and this explanation really helps! Many thanks. |
Whilst waiting until I can review the changes, it would be really helpful if you could have a first go at finding all the references to Priority in the documentation and updating them where appropriate, please. Edit the docs/ directory as a vault within Obsidian. |
Found some time for that - done :). |
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.
This is looking good.
I should be able to actually test it all out in a few days' time, but in the meantime I read through the changes.
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.
Thank you again for this.
I've now been able to test it out, and am sure I will make use of the new priorities.
Here are a few comments based on testing.
Hi, thanks very much for the extra commits... ❤️ I'll try them out as soon as I can, and resolve conversations as I go... |
Reminder to self, for after merge:
|
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.
Great stuff - thank you very much indeed!
@chrabia Many thanks for this super useful contribution, that I had no idea I even wanted! ❤️ 😄 🎉 |
You're welcome, thanks for the review :) I hope I'll have an opportunity to contribute again! 😄 |
@chrabia Just to let you know about a minor change I'm proposing to make... In the auto-suggest, I want to put:
When using the auto-suggest, because Highest comes before High, if I start typing I'm thinking it should default to the shorted word first, so High and Low, and people should have to type more characters, or arrow-down, to get the longer word. This would also not break people's muscle memory from using the previous High and Low... This has tripped me up several times today, so I'm expecting someone will log a request for it sometime soon.... Just wanted to let you know in advance... |
Yes, it makes sense, go for it :) |
Fixes #1943 The order of priorities in auto suggestion is now - high - medium - low - highest - lowest This retains the original order, for people's muscle memory. And it means that the longer names are after the shorter ones, which also makes it possible to type both, and it means that typing parts of names selects the same result as before highest and lowest were added.
) Fixes #1943 The order of priorities in auto suggestion is now - high - medium - low - highest - lowest This retains the original order, for people's muscle memory. And it means that the longer names are after the shorter ones, which also makes it possible to type both, and it means that typing parts of names selects the same result as before highest and lowest were added.
Description
Two new priorities are added for tasks: "highest" and "lowest"
Motivation and Context
There are too few priorities to choose from, this PR introduces two new ones, which probably should be enough. The names for new priorities were inspired by the names used in jira, but some new names could be introduced for easier suggesting when creating the task. But I'm not sure about what those could be, "asap" seems nice for the "highest", but I don't have a good alternative for the "lowest".
I'm not sure what numbers should really be used for urgency calculation, they might need to be changed a bit.
Also, I'm not really sure about the emoji used for "highest" priority, other propositions for that: ❕or 🔥
How has this been tested?
The change is small, so mostly older unit tests are adapted. But also, a few new tests are added. The change was tested on my local Obsidian too, by creating a few tasks with new priorities and checking that everything works and e.g. the tasks are sorted correctly.
Screenshots (if appropriate)
Types of changes
Changes visible to users:
fix
- non-breaking change which fixes an issue)feat
- non-breaking change which adds functionality)feat!!
orfix!!
- fix or feature that would cause existing functionality to not work as expected)docs
- improvements to any documentation content for users)vault
- improvements to the Tasks-Demo sample vault)contrib
- any improvements to documentation content for contributors - see Contributing to Tasks)Internal changes:
refactor
- non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)test
- additions and improvements to unit tests and the smoke tests)chore
- examples include GitHub Actions, issue templates)Checklist
yarn run lint
.Terms