-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] This fixes 2 issues when changing the Close Other Preferences #6416
Comments
Comment by TomMalbran
|
Comment by njx Sure - leaving it up to |
Comment by JeffryBooher
|
Comment by TomMalbran
For the second issue, after adding any of those preferences, restart Brackets and check the developers tools. I can make an issue if you want. |
Comment by njx
|
Comment by MarcelGerber Isn't |
Comment by JeffryBooher Some observations here: The original impl came long before preferences could be changed and reloaded so that means that some of the original impl should be updated to reflect that. Primarily with respect to registering commands. It seems better to just register the commands regardless of whether or not they are enabled in prefs and then enable / disable them as needed. Additionally the code enables and disables commands when the the context menu is opened regardless of the fact that the commands may not have been registered. This should generate an error or warning in the console. If we just register all commands regardless of whether or not their prefs are turned on then we don't have this problem. So line 108 should be:
This allows external methods (such as another commands) to invoke the command even if all of the context menu prefs for the commands are turned off. The team discussed this today and, since these prefs are not documented, the risk of anyone hitting any of these scenarios is minimal. We need to get sprint 37 wrapped up today so we're going to move this to sprint 38 when the changes discussed above are done. |
Comment by TomMalbran
I am thinking that we should just separate the initial creation from the preferences update, since the code can be quite different now, and will be a better solution that using |
Comment by MarcelGerber
|
Comment by JeffryBooher
|
Comment by TomMalbran
Since this fixes an issue created in this Sprint it would be nice if we can fix it for Sprint 37, The fix is kind of simple too, but I guess is a lower priority bug. |
Comment by MarcelGerber
Another point, but not a showstopper (it would definitely be nice to get this PR landed in Sprint 37), is to add more tests. |
Comment by TomMalbran I'll try to add them later, if I have time. |
Comment by TomMalbran
|
Comment by MarcelGerber Maybe one to check that the prefs are minded at all and one to check the behaviour on pref change, if that's possible. |
Comment by JeffryBooher Yeah it is possible but a lot of work. I'm going to merge this and confer internally to see what we should do about it. We had a discussion today around having unit tests to ensure bug fixes don't regress but this is hardly the bug to start with. We can file a separate issue for unit tests on this pull request since it really involves testing for menu changes. |
Issue by TomMalbran
Wednesday Mar 05, 2014 at 07:37 GMT
Originally opened as adobe/brackets#7088
When all 3 Close other preferences are false, the commands are never registered, but it was still trying to change them which makes the working set context menu not open.
It was also trying to remove the menu Items when those were never added in the first place.
TomMalbran included the following code: https://github.com/adobe/brackets/pull/7088/commits
The text was updated successfully, but these errors were encountered: