mikaeljorhult / brackets-todo

Brackets/Edge Code extension that displays all TODO comments in current document or project.
144 stars 37 forks source link

User supplied tags should override default, not be merged #40

Closed anzhihun closed 10 years ago

anzhihun commented 10 years ago

If user want to use his/her own tag only by configure .todo file, such as "tags": [ "TEST" ], the way merging settings will make it impossible.

mikaeljorhult commented 10 years ago

The point of merging settings instead of replacing them is to let the user only specify the settings that he/she wants to override. If they are replaced the user must be sure to add all the properties for the extension to work.

That said, this do cause some problems when specifying tags and should be corrected. The easiest solution, at least for now, is probably to merge everything and then replace the tags property if it's supplied by the user.

anzhihun commented 10 years ago

If we worry about that users may make a .todo file with wrong content, the easiest solution also can not solve the problem thoroughly. Maybe we should give a window for configuration. It will bring two benefit. The first one is that we can control the contents the user configures (select or add). Secondly, it is more easy to use. The drawback is we will spend more time to fix it. what do you think about it?

mikaeljorhult commented 10 years ago

Eventually I think a optional GUI that help the user create and manage settings is the best option but that do require some time to develop.

Core developers are looking to implement project based settings and probably some UI for it so using that would probably be the easiest path.

anzhihun commented 10 years ago

Thinking about this issue, I found there is another issue. Whether the user like to add .todo file in the project? For me, I don't like. Because it does not belong to the project. Whether the todo settings should have influence on only one project or all other projects? Maybe we should think about this issue together.

mikaeljorhult commented 10 years ago

Yes, I've also been thinking about that case. I use specific settings for each project that I work on and therefore the .todo file makes sense but I can imagine that most people would like to set this in Brackets once and not have to think about it again.

One solution might be global settings, that work with all projects, that can be set through a user interface. These could be exported as a .todo file which would then override your global settings if present in a project.

This would allow you to specify your own settings which is used most of the time and allow the extension to use specific project settings when working on a project that has a .todo file.

Do you think that would be a good solution?

mikaeljorhult commented 10 years ago

I've closed this as the commit solves the problem, for now, but I would very much like your input on settings as above...

anzhihun commented 10 years ago

I'm agree with the solution. I would like to implement the the global settings interface If we adopt the solution.

mikaeljorhult commented 10 years ago

Great! Let's go for it as soon as current version is live.