Skip to content
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] Disable and enable extensions #9778

Open
core-ai-bot opened this issue Aug 30, 2021 · 30 comments
Open

[CLOSED] Disable and enable extensions #9778

core-ai-bot opened this issue Aug 30, 2021 · 30 comments

Comments

@core-ai-bot
Copy link
Member

Issue by busykai
Saturday May 30, 2015 at 22:55 GMT
Originally opened as adobe/brackets#11184


This PR provides a simple mechanism to disable and enable again an extension and complete support of the functionality in the Extension Manager.

Extension loader looks for .disabled file in the extension directory, if it's present the information is included and propagated to the entire extensibility subsystem. Extension Manager can disable and enable extensions using the same mechanism.


busykai included the following code: https://github.com/adobe/brackets/pull/11184/commits

@core-ai-bot
Copy link
Member Author

Comment by busykai
Sunday May 31, 2015 at 01:26 GMT


CC:@albertinad, you made me do it. now you have to review it. :)

@core-ai-bot
Copy link
Member Author

Comment by mackenza
Sunday May 31, 2015 at 01:34 GMT


Good stuff. As I mentioned on Slack, I think the .disabled file is a great, simple way of using convention over configuration to make this work. So I definately appreciate that.

Unless I am missing something, or maybe behaviour is different on Linux (Ubuntu 14.04 x64 here), but I don't see how you can enable a disabled extension. I was expecting an Enable button in my "Installed" list in Extension Manager.

@core-ai-bot
Copy link
Member Author

Comment by busykai
Sunday May 31, 2015 at 01:37 GMT


Unless I am missing something, or maybe behaviour is different on Linux (Ubuntu 14.04 x64 here), but I don't see how you can enable a disabled extension. I was expecting an Enable button in my "Installed" list in Extension Manager.

This sounds as a bug. Checked, it should be Enable. Somehow it regressed while I was writing tests. :( Will fix.

@core-ai-bot
Copy link
Member Author

Comment by mackenza
Sunday May 31, 2015 at 01:43 GMT


My disabled extensions show up in the list, but the buttons all say Disable

@core-ai-bot
Copy link
Member Author

Comment by busykai
Sunday May 31, 2015 at 02:03 GMT


@mackenza, fixed it (slightly blushing).

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Sunday May 31, 2015 at 03:15 GMT


You need to unmark all extensions that were marked to be disabled after this line (https://github.com/adobe/brackets/blob/kai/disable-enable-extensions/src/extensibility/ExtensionManagerDialog.js#L209).

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Sunday May 31, 2015 at 07:57 GMT


question: will this work for default extensions? if so, can we add .disabled to .gitignore file?

@core-ai-bot
Copy link
Member Author

Comment by busykai
Sunday May 31, 2015 at 13:33 GMT


@zaggino, it will work on default extensions via manually creating and deleting .disabled file.

@TomMalbran, thanks for the thorough review will fix these.

@core-ai-bot
Copy link
Member Author

Comment by mackenza
Sunday May 31, 2015 at 17:02 GMT


@zaggino@busykai I went into /src/extensions/default/CodeFolding, did a touch .disabled and reloaded Brackets and, indeed, no code folding.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Sunday May 31, 2015 at 22:08 GMT


@busykai great, can you add an .disabled entry to the https://github.com/adobe/brackets/blob/master/.gitignore then?

@core-ai-bot
Copy link
Member Author

Comment by busykai
Monday Jun 01, 2015 at 01:21 GMT


@zaggino, you're right. Will add this file to .gitignore.

@core-ai-bot
Copy link
Member Author

Comment by busykai
Monday Jun 01, 2015 at 01:43 GMT


Did some more testing, focused on error handling. Seems to be fine now.

@core-ai-bot
Copy link
Member Author

Comment by rroshan1
Wednesday Jun 17, 2015 at 07:59 GMT


With an update available for an extension, the buttons look like this (refer first extension):-
extensions
We can either have all 3 bttons in same line or just update in separate line..

@core-ai-bot
Copy link
Member Author

Comment by rroshan1
Wednesday Jun 17, 2015 at 08:12 GMT


@busykai I really liked this feature. Enabling and disabling of extensions is super smooth now. 👍
All unit tests pass and I have reviewed the PR from my side and shared my comments.
Can you please update ".disabled" entry in the .gitignore file to more specific "src/extensions/default/*/.disabled" and address my comments and we should be all ready to have this PR merged soon. 😄

@core-ai-bot
Copy link
Member Author

Comment by busykai
Friday Jun 19, 2015 at 12:11 GMT


@rroshan1, thanks for the review. I'll get to this real soon. I'm not sure what to do with the buttons, though...@larz0, would you recommend a direction? Perhaps, stack them vertically instead (always). Or not show the disable button when there's an update (not good). Or increase the size of the dialog...

@core-ai-bot
Copy link
Member Author

Comment by larz0
Friday Jun 19, 2015 at 23:27 GMT


@busykai can we replace the "Delete" button with the delete icon below and see if things can fit? When the buttons are stacked on the right the right side will seem heavier compared to the left side of the modal.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" width="17" height="18" viewBox="0 0 17 18">
  <defs>
    <style>
      .cls-1 {
        fill: #7f8181;
        fill-rule: evenodd;
      }
    </style>
  </defs>
  <path d="M6.000,7.000 L6.000,14.000 L7.000,14.000 L7.000,7.000 L6.000,7.000 ZM8.000,7.000 L8.000,14.000 L9.000,14.000 L9.000,7.000 L8.000,7.000 ZM10.000,7.000 L10.000,14.000 L11.000,14.000 L11.000,7.000 L10.000,7.000 ZM13.000,2.000 C13.000,0.470 12.529,-0.000 11.000,-0.000 L6.000,-0.000 C4.380,-0.000 4.000,0.500 4.000,2.000 L4.000,3.000 L-0.000,3.000 L-0.000,5.000 L2.000,5.000 L2.000,16.000 C2.000,17.500 2.471,18.000 4.000,18.000 L13.000,18.000 C14.410,18.000 15.000,17.470 15.000,16.000 L15.000,5.000 L17.000,5.000 L17.000,3.000 L13.000,3.000 L13.000,2.000 ZM11.000,2.000 L11.000,3.000 L6.000,3.000 L6.000,2.000 L11.000,2.000 ZM4.000,5.000 L13.000,5.000 L13.000,16.000 L4.000,16.000 L4.000,5.000 Z" class="cls-1"/>
</svg>

@core-ai-bot
Copy link
Member Author

Comment by rroshan1
Monday Jun 22, 2015 at 07:40 GMT


@larz0@busykai I was thinking of something like this- Update button if applicable should be on a separate line while the disable and remove buttons should be consistent.. Since mostly there won't be many update buttons, the right side won't seem to be heavy either. What do you guys think?
extensions2

@core-ai-bot
Copy link
Member Author

Comment by larz0
Tuesday Jun 23, 2015 at 00:07 GMT


@rroshan1 that works too! We shouldn't be getting more buttons in that area (fingers crossed) so let's go with that 👍

@core-ai-bot
Copy link
Member Author

Comment by nethip
Tuesday Jun 23, 2015 at 04:11 GMT


@larz0 Thanks!.

@busykai Please go ahead with the suggested changes to this PR, so that it can be merged. Let us target this for 1.4.

@core-ai-bot
Copy link
Member Author

Comment by busykai
Thursday Jun 25, 2015 at 13:59 GMT


@rroshan1, simplicity is the best! :) I should have thought about this layout!..

@core-ai-bot
Copy link
Member Author

Comment by busykai
Thursday Jun 25, 2015 at 14:29 GMT


@rroshan1,@larz0 how about this? made the buttons a little bit more spread:
screen shot 2015-06-25 at 11 25 01
or little less spread:
screen shot 2015-06-25 at 11 27 45
I like the second better.

@core-ai-bot
Copy link
Member Author

Comment by abose
Thursday Jun 25, 2015 at 14:42 GMT


I like the first one better. The second one seems a bit out of proportion to me.

@core-ai-bot
Copy link
Member Author

Comment by lenovouser
Thursday Jun 25, 2015 at 14:43 GMT


@busykai I think the first one looks better. The second one seems so cluttered.

@core-ai-bot
Copy link
Member Author

Comment by busykai
Thursday Jun 25, 2015 at 14:45 GMT


OK. FWIW, the second one is what close to what we used to have (buttons are close to each other).

@core-ai-bot
Copy link
Member Author

Comment by busykai
Thursday Jun 25, 2015 at 14:50 GMT


@rroshan1, ready for re-review. did not address separate functions comment though. let me know if you feel it has to be addressed.

@core-ai-bot
Copy link
Member Author

Comment by mackenza
Thursday Jun 25, 2015 at 15:41 GMT


@busykai agreed 1st screenshot is much better than 2. Even if 2 is what we have now.

side note: why is remove greyed out on "Proper Indent" extension in both SS?

@core-ai-bot
Copy link
Member Author

Comment by busykai
Thursday Jun 25, 2015 at 15:57 GMT


@mackenza, it's in src/extensions/dev (space to develop extensions) -- they are not managed via this dialog (but you still should be able to disable your extension if you screwed up :).

EDIT: I've pushed the first version, so more spacious design with this change.

@core-ai-bot
Copy link
Member Author

Comment by larz0
Friday Jun 26, 2015 at 00:09 GMT


@busykai great, first screenshot is better but could we shave off 2px to the spacing between Disable and Remove buttons?

@core-ai-bot
Copy link
Member Author

Comment by busykai
Friday Jun 26, 2015 at 14:24 GMT


@larz0, like this?
screen shot 2015-06-26 at 11 23 04

@core-ai-bot
Copy link
Member Author

Comment by busykai
Monday Jun 29, 2015 at 16:36 GMT


@larz0, so I've pushed the changes to the layout corresponding to the last image.

@rroshan1, this is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant