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
Adds some initial improvements to Tasks #74
Conversation
src/pim-types.ts
Outdated
} | ||
|
||
get tags() { | ||
return JSON.parse(this.component.getFirstPropertyValue('tags')); |
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'll properly review everything slightly later, when you make more progress, but one important comment: this shouldn't be called "tags" but "properties", and you shouldn't JSON.stringfiy it, but rather it should be an array of strings.
This is not something that comes from me, it comes from the ical standard. This object that you're updating is an ical object that then needs to be serialized to the ical format. It doesn't change much, just make sure to rename it and change the value. Additional properties of tags, such as colour, should be saved elsewhere, and I'll happily explain it when you get to saving those. Though those should be maintained at a per-journal capacity as part of the journal metadata.
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 see. I think I've got it now. It was a little confusing to figure out how to do multi value properties, but looks like I need to explicitly add the "CATEGORIES" property to the TaskType
.
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.
Additional properties of tags, such as colour, should be saved elsewhere, and I'll happily explain it when you get to saving those. Though those should be maintained at a per-journal capacity as part of the journal metadata.
Could I also save a list of all the tags this way? If so, how would I go about that?
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.
The list of tags is external to specific tasks. It should probably be stored in each journal's metadata. I'm happy to explain to you how to do it (it would require a tiny bit of code on my side), though I think it's too early for that, just save it locally (and globally) for now, or heck, make the tags hardcoded while you are working on it, and ping me again in a few days / a week and I'll add the ability to set generic journal metada.
Note by @tasn: I actually wrote this from scratch, but slightly based it on work by @AbleLincoln in #74 which is why I set him as the author. Fixes #9
Hey, Just one general comment, if you fix a general issue with the code, please have it in a separate PR and at the very least a separate commit in a PR so it can be easily merged. I just fixed #9, and had to implement it from scratch because of this. A fix that could have been in for a while now... :) Additionally, your fix was incorrect because it was ignoring the "dateOnly" prop. |
better datetimepicker
Adds UI features like toolbar (w/ sorting & searching), sidebar (w/ filtering), light editing improvements. Adds task type features like priority, tags. Adds some use of Context for prop drilling. Adds Task Settings to the redux store. This is a massive commit. I wanted to keep everything separate but the code is too tightly coupled.
8b5463f
to
0907a47
Compare
I've added a bunch of features: Task properties
Task list
SidebarBasically where all of the filtering happens. Currently you can filter by all, due today, and tag ToolbarContains UI for sorting, searching, and toggling show completed. Currently you can sort by priority, due date, title, last modified. ContextI am using a bit of React Context to pass down props for saving and selecting tasks Redux StoreThe store now holds settings for the task page. This allows the user to maintain the filters, sorts, etc. between page reloads. |
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.
Hey,
Good job, and glad to see things are making progress! Can't wait to have it in!
I made a few inline comments in the code, suggesting some changes that didn't look right to me, though I do have some more general comments I'd like to make.
It was very hard to review this, and I'm sure my work reviewing it is not done. It's not about the code itself, but rather than you changed 20 files at once, with some changes being unrelated to what this PR this about. In addition, because you haven't split the changes to different commits, it was a lot of context to manage in my head while reviewing.
Here's just an example split to commits that you could have done (commit messages are bad, and are just to convey the idea):
- "Remove the task viewing page and make it always go to edit"
- "Redesign the task list page"
- "Add a task bar to the task list page"
- "Add ColorRadio widget for having coloured radio boxes"
- "Redesign the task edit page"
- ...
This would have made it much easier to review, because then related changes would be grouped together, and I wouldn't have to keep on scrolling through walls of source code to try to understand what is related to what.
I know you are new to open source, so really no worries (and no harm done!), though please try reorganising things a bit so it's easier to review your code. Because the whole point of code review is to be able to find issues and discuss choices (and tradeoffs), and it's really hard with suche large changes.
Looking forward to the next review iteration!
|
||
tasks: { | ||
showCompleted: false, | ||
sortOrder: 'dueDate', |
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'm not sure if you took a look at the code I sent you back then, but I assume you have some sort of a "smart" sort, that should be the default, not this.
showCompleted: boolean; | ||
sortOrder: string; | ||
filterBy: string; | ||
searchTerm: string; |
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 should not be a setting, it's ephemeral, not persistent... It should just be a prop / navigation property.
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.
The reason I have these as settings is that I want the filtering/sorting to persist when the user navigates away from the Tasks page. The main use case is when a user goes to edit/create a task. After saving and navigating back to the tasks page, all the sorting/filtering is reset, which can be frustrating.
Do you have a suggestion for another way I can handle this?
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.
Sorry if my initial comment wasn't clear, I was referring specifically to searchTerm, not the rest. The rest should indeed be as you did them. As I told you elsewhere, it's similar to how I did it in etesync-tasks, which you can refer to if you want a glimpse into my thoughts process on things, and anyhow, a lot of it is very similar. Obviously my thoughts aren't necessarily good, but at least you can see what I mean. :)
One more related comment to save both of us a lot of time: maybe let's do things step by step? So maybe have a PR that I can merge that changes the things that are not really related to this PR? And then have another small PR that does X and I can already merge, and so on? So we at least know things are good and can move forward? Only if it makes things easier for you... What I'm essentially trying to do is shorten the feedback loop, so you can change things and get immediate feedback rather than sitting on your changes for a few days, waiting for my feedback, and then sitting on your changes again for a few days. |
Yes I think that is a good idea. What would be the best way to go about this regarding git/GitHub since I already have a lot of these changes in progress on this branch. I'm sorry, I'm just not too experienced with complicated merges. |
Great, so I'm looking forward to your smaller PRs! Just think what changes make sense standalone and open the appropriate PRs. The added benefit is that we can discuss separate topics separately. So for example, we will be able to discuss search in one and quick-add in another.
Don't be silly, nothing to be sorry about! I didn't mean my previous messages as complaints, I meant them as guiding. I know it's new for you, and I'm here to help! I was just telling you what I think could make things easier based on my experience. |
Thank you for all your help and understanding. Do you recommend I just create completely new branches from the master and copy over changes? |
Yeah, maybe just creating new branches and copying over changes is the easiest way to go. It's likely that some of your PRs will rely on others, which is fine too. Even within PRs, split to commits as it makes sense to you (maybe no split is needed), so unrelated code isn't grouped together. |
Hey, Just one thing I noticed now that we have merged #81: you can't access the change history anymore. That link should be added to the task edit page. Please keep that in mind. |
Noted, thank you for the heads up. I will add this in |
Another comment that comes to mind: the mapping of High, Medium and Low priority from the UI to ical should be: I took a look at the RFC and that's the mapping they used there. Just FYI. |
Another thing I noticed, especially given that we now have quickadd: we need a way to choose the default task list - so it'll both be the one in the new event dialog, but also the one added to from quickadd. Edit: just to clarify, it doesn't need to happen now, but just so we remember it for later on. |
closing because all of these features have now been implemented in other PRs |
\o/ |
This is the MVP for a few features I want to add to Tasks. The code is by no means good or clean yet, I just wanted to get out a few rough ideas first. Let me know what you think of the following. Anything can be changed.
I've added: