Closed Angelinsky7 closed 6 years ago
Hey,
Give me sometime to check the code and I'll get back to you.
I'm not to understand, something like an example file ??
No. I just need time to look into the code you wrote here.
ahhh.. sorry misread sometime with something... my bad
No problem. I'll get back to you as soon as I can, I just need to finish something important on another project.
Thanks for the PR :)
Hey, I've been looking into the code, good job!
We can definitely make this work, I just have a couple of points and questions to go through.
Points
1 - We need to keep the naming convention consistent throughout the project. 2 - It would be nice to move DataTemplates and Styles into UserControl.Resource just to keep the XAML a bit tidier and easier to work with, for any future changes. 3 - XAML utils should be in the Options folder, since they're specific for XAML and not project wide.
Questions
1 - Do we need all that behavior code? Can't we do with something simpler and less code? 2 - Why not use Dictionary<CommentType, string> for TokenValues, instead of using Dictionary<string, string>? Wouldn't that make things a bit easier?
Hey, great cool...thanks
Points
Questions
Finally, the 1 and 2 are somewhat linked together... but of course if you know a better way with less code... i would happily learn :-)
Todos
Edit : Questions parts
For the XAML utils, just put them in Options/Infrastructure for now.
I’m still a beginner in XAML development and you seem much more comfortable with it, so if you think that’s the best way to go then we’ll do it that way.
For the saving mechanism, I would have to agree with you on that, there must be a better way to do it, especially when it gets bigger and more complicated. But that’s the best way I could come up with at the time, maybe will change it in the future.
I think the settings object should be shared between the two pages. I think this might solve the bug, not sure though!
I think the settings object should be shared between the two pages. I think this might solve the bug, not sure though!
i think that the Settings class should maybe become a singleton. Like that, there will be only one instance of him across all the extension.
i think that the Settings class should maybe become a singleton. Like that, there will be only one instance of him across all the extension.
Yeah, I think this might be a good idea!
i let you try and tell me what's missing (naming convention for example)
Did the singleton solve the settings bug?
Did the singleton solve the settings bug?
Yes it did.
Another question : Is the special parameter for the todo (HighlightTaskKeywordOnly) should be change for all keyworkd ?
HighlightTaskKeywordOnly is only for Task comments. It doesn't affect the other types.
Can we make sure the user doesn't use === and &&& as tokens?
If they did I think this might break the logic in SettingsStore, because you're using === and &&& as string separators.
I think even if they use = or & only this might be an issue.
Maybe we should count for that somehow.
Now that I think of it. The conversion logic between Dictionary<string, string> of tokens into a string and vice versa should be in the Settings class and not in the SettingsStore class.
The SettingsStore should only be responsible of storing and loading settings, and it should only handle the four basic types, int, double, bool, and string. Conversion is not its responsibility.
Look at my other extension Line Press, I've done a similar thing there.
If you look at SettingsStore now you can see that i don't use a string conversion anymore (so no need to worry for the "===" and "&&&") I fortgot to remove the old const, now it's done. Yes, we can move the all logic one step higher but if you look at the code (b29116f), it's seems to me normal to keep it there.
HighlightTaskKeywordOnly is only for Task comments. It doesn't affect the other types.
Yes i understand, but my question was more like : What if a user would like to have the same behaviour with the Important comments now that he can customize it ? But i understand that this question leads to another : why the plugins "impose" types of comments while it could instead propose by default the actual type (with their actual behaviour) and let the user configure them how he likes them.
But i was just a thought :-)
The main idea of the extension was changing the whole comment's color, to make it stand out, and HighlightTaskKeywordOnly came as a user request, and no requests were made for having the same feature for other comments. So I really don't see any good reason to go through all the change.
We can't just keep asking "What if?", that way we'll never stop.
Removing the string splitting from SettingsStore is a good thing. But I'm not really happy with the way SettingsStore turned into, the switch statement in Save and Load starting to look pretty ugly. The way I intended it to be is that it only handles bool, int, double, and string, and Settings class will be responsible for handing those values. That way the switch case is kept compact and never change.
I want SettingsStore to not be changed every time we add a new type of settings.
I want SettingsStore to not be changed every time we add a new type of settings.
Ok, but how to you want to handle it... because the current implementation need to call and use the WritableSettingsStore
I'm not sure it could be done with the current design. I'm thinking of merging this pull request as it is, for now, and then see if I can do something about it or redesign the whole thing.
Could you please handle the naming convention issue, and the formating as well.
No problem, but could you give me an example of "convention issue" to see what is important for you ?
Naming
Format
Here is a simple example on formating.
If number 2 in format is too much work for you. You can ignore it, I'll be able to use VS's auto format to handle it. But the other points you'll have to address.
Thanks for being patient and bearing with me :)
You know what, you can ignore format number 2 also. I'll be able to go through your code and change it myself. So you still have 3 and 4.
i think we are good :-)
Great. I'll work on the merge as soon as I can.
Thanks you :-)
Welcome, and thank you for your work and patience.
i had time... for #20 it's a first version, i certainly forgot some things but the overall plugin is working, and you can customize the token... On my version i had sometime a small issue when saving the other settings tab (not saving) but i'm not an extension dev expert so i'm sure someone could tell me.