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

integration of code-folding extension into brackets #10792

Merged
merged 13 commits into from Apr 7, 2015

Conversation

Projects
None yet
@thehogfather
Contributor

thehogfather commented Mar 25, 2015

Integration of core code-folding extension files into brackets' default extension folder.

@Florian-R

This comment has been minimized.

Show comment
Hide comment
@Florian-R

Florian-R Mar 25, 2015

Out of curiosity, any reason to not keep this as an extension?

Florian-R commented Mar 25, 2015

Out of curiosity, any reason to not keep this as an extension?

@prksingh

This comment has been minimized.

Show comment
Hide comment
@prksingh

prksingh Mar 25, 2015

Contributor

@Florian-R There has been demand to have code folding in the default user experience for brackets. It made sense to reuse an already popular extension to provide this support in core

Contributor

prksingh commented Mar 25, 2015

@Florian-R There has been demand to have code folding in the default user experience for brackets. It made sense to reuse an already popular extension to provide this support in core

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Mar 25, 2015

Contributor

@thehogfather Thanks 👍
The Travis CL builds are failing mostly due to JSLint related errors. Could you fix the lint errors and update?

Contributor

abose commented Mar 25, 2015

@thehogfather Thanks 👍
The Travis CL builds are failing mostly due to JSLint related errors. Could you fix the lint errors and update?

@Florian-R

This comment has been minimized.

Show comment
Hide comment
@Florian-R

Florian-R Mar 25, 2015

@prksingh I had hoped that Brackets has kept some sort of Node philosophy, "small core, vibrant userland" but anyway thanks for your input.

Florian-R commented Mar 25, 2015

@prksingh I had hoped that Brackets has kept some sort of Node philosophy, "small core, vibrant userland" but anyway thanks for your input.

@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Mar 25, 2015

Contributor

@abose sure thing.

Contributor

thehogfather commented Mar 25, 2015

@abose sure thing.

@ryanstewart

This comment has been minimized.

Show comment
Hide comment
@ryanstewart

ryanstewart Mar 25, 2015

Member

@Florian-R in general, that's our philosophy, but code folding has been on our list as "core" for a very long time. Most major editors have it out of the box. It's also far and away one of the most popular extensions, so it was clear that users were missing it.

Member

ryanstewart commented Mar 25, 2015

@Florian-R in general, that's our philosophy, but code folding has been on our list as "core" for a very long time. Most major editors have it out of the box. It's also far and away one of the most popular extensions, so it was clear that users were missing it.

@ryanstewart

This comment has been minimized.

Show comment
Hide comment
@ryanstewart

ryanstewart Mar 26, 2015

Member

A couple of things we want to do as part of the merge:

  • Double check the shorts that are used. I think they're probably fine but we should take a look at that.
  • Move the preferences into our regular preferences system (brackets.json)
  • Create an option to disable code folding as preference

Open question here: Do we allow separate code folding preferences per project? or just globally? or per file?

Member

ryanstewart commented Mar 26, 2015

A couple of things we want to do as part of the merge:

  • Double check the shorts that are used. I think they're probably fine but we should take a look at that.
  • Move the preferences into our regular preferences system (brackets.json)
  • Create an option to disable code folding as preference

Open question here: Do we allow separate code folding preferences per project? or just globally? or per file?

@MiguelCastillo

This comment has been minimized.

Show comment
Hide comment
@MiguelCastillo

MiguelCastillo Mar 27, 2015

Contributor

@thehogfather It is awesome that you are brining this into brackets!! High-5.

I did not realize how big your extension was! But I did a quick pass and it seems that one glaring inconsistency is the mix of spaces/tabs and that lots of the function are defined right in the module.exports. I am guessing it will be a couple of rounds of tweaks/refactorings to get your extension in line with the rest of brackets. :)

Really happy this is coming in.

Contributor

MiguelCastillo commented Mar 27, 2015

@thehogfather It is awesome that you are brining this into brackets!! High-5.

I did not realize how big your extension was! But I did a quick pass and it seems that one glaring inconsistency is the mix of spaces/tabs and that lots of the function are defined right in the module.exports. I am guessing it will be a couple of rounds of tweaks/refactorings to get your extension in line with the rest of brackets. :)

Really happy this is coming in.

@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Mar 27, 2015

Contributor

@MiguelCastillo No problem. I'll work on these fixes and update. :)

Contributor

thehogfather commented Mar 27, 2015

@MiguelCastillo No problem. I'll work on these fixes and update. :)

@MarcelGerber

This comment has been minimized.

Show comment
Hide comment
@MarcelGerber

MarcelGerber Mar 29, 2015

Contributor

You should probably merge your translations (at least the English ones) into our main strings.js as other default extensions do the same.

Contributor

MarcelGerber commented Mar 29, 2015

You should probably merge your translations (at least the English ones) into our main strings.js as other default extensions do the same.

thehogfather added some commits Mar 29, 2015

Merge commit 'e56192e09ceed72834985f2483ed70e339e5c519' into codefolding
* commit 'e56192e09ceed72834985f2483ed70e339e5c519':
  Logos are now perfectly centered
  Whitespace trimming suggested by @MarcelGerber
  Fix some moved APIs that were left over from PR #10641
  Text is now perfectly centered
@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Mar 29, 2015

Contributor

I've tidied up and refactored a bit based on the suggestions (thanks all). I've moved preferences to brackets.json and merged the english strings into brackets main strings. There is also an option to disable the extension in the settings dialog (should this be on the menu instead - or as well?).

I have translations for fi, fr, ja, nl, pt-br and ru but haven't merged yet. Shall I go ahead and merge those?

Contributor

thehogfather commented Mar 29, 2015

I've tidied up and refactored a bit based on the suggestions (thanks all). I've moved preferences to brackets.json and merged the english strings into brackets main strings. There is also an option to disable the extension in the settings dialog (should this be on the menu instead - or as well?).

I have translations for fi, fr, ja, nl, pt-br and ru but haven't merged yet. Shall I go ahead and merge those?

@nethip

This comment has been minimized.

Show comment
Hide comment
@nethip

nethip Mar 30, 2015

Contributor

@thehogfather Please go ahead and merge all the translations for this, barring fr and ja. The fr and ja will need to go through our translation process.

Contributor

nethip commented Mar 30, 2015

@thehogfather Please go ahead and merge all the translations for this, barring fr and ja. The fr and ja will need to go through our translation process.

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Mar 30, 2015

Contributor

@thehogfather As i understand, the translations, the HTML dialogs and the menu entries are for the settings dialog for code folding. But as @ryanstewart pointed out in an earlier comment, Brackets doesn't set app preferences with dialogs; But customizable options are set in the preerences file and the default options are set in the 'brackets.json' file in the repo. As the code folding extension is directly integrated with brackets, i think it would be best if it confirms to brackets preferences settings.
So i think we should

delete all the preferences dialogs and related strings and move all configurable settings to brackets.json.
Remove the menu entry for code folding settings
Code folding by default will be enabled for all users. The option to disable code folding can be set as a preferences entry.
@peterflynn @ryanstewart

Contributor

abose commented Mar 30, 2015

@thehogfather As i understand, the translations, the HTML dialogs and the menu entries are for the settings dialog for code folding. But as @ryanstewart pointed out in an earlier comment, Brackets doesn't set app preferences with dialogs; But customizable options are set in the preerences file and the default options are set in the 'brackets.json' file in the repo. As the code folding extension is directly integrated with brackets, i think it would be best if it confirms to brackets preferences settings.
So i think we should

delete all the preferences dialogs and related strings and move all configurable settings to brackets.json.
Remove the menu entry for code folding settings
Code folding by default will be enabled for all users. The option to disable code folding can be set as a preferences entry.
@peterflynn @ryanstewart

@MiguelCastillo

This comment has been minimized.

Show comment
Hide comment
@MiguelCastillo

MiguelCastillo Apr 6, 2015

Contributor

@thehogfather this code is definitely landable right now and it is looking very good!

There are a few changes that seem manageable to make the code fit better with brackets style. I think we are almost there :)

Contributor

MiguelCastillo commented Apr 6, 2015

@thehogfather this code is definitely landable right now and it is looking very good!

There are a few changes that seem manageable to make the code fit better with brackets style. I think we are almost there :)

thehogfather added some commits Apr 6, 2015

Merge commit 'fd6c8acca823e3cf197e6d3ac0ab9adea190843e' into codefolding
* commit 'fd6c8acca823e3cf197e6d3ac0ab9adea190843e': (31 commits)
  Added a newline
  Adding newline
  Updating the comments
  Updating the comments
  Removing this preference as it should be set to true by default.
  Changing function name.
  Decreasing timeout to 4 sec.
  Adding unit test cases. Submitting changes suggested in PR review.
  Setting ONE_DAY to correct value. Initially value used for testing was left by mistake. Removing serverTestURL as it is not needed now.
  Moving lastTimeSentData before making AJAX call to make sure data is not sent before ONE_DAY as setting it to always() will be asynchronous
  Move the implementation to the extensions. Data will be send to the server as soon as user has launched the Brackets and dialog box prompting for user to opt-in and opt-out is closed. Rework the comments and defects. Test cases has not been added yet. Will be adding to the next PR.
  Updated by ALF automation.
  Updated by ALF automation.
  Extended {APP_NAME}
  Correcting jshint errors.
  Deleting duplicate string.
  Synchronized with latest root commit
  "developer" -> "pengembang"
  Fixed text wrapping
  Add comments..
  ...

Conflicts:
	src/nls/root/strings.js
@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Apr 6, 2015

Contributor

@MiguelCastillo just pushed an update for all those fixes + merged with the latest commit from master.

Contributor

thehogfather commented Apr 6, 2015

@MiguelCastillo just pushed an update for all those fixes + merged with the latest commit from master.

@abose abose merged commit 16c4483 into adobe:master Apr 7, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

abose added a commit that referenced this pull request Apr 7, 2015

Merge Code Folding pull request 10792
Merge pull request #10792
Code Folding by Patrick Oladimeji; Github:@thehogfather
@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Apr 7, 2015

Contributor

@thehogfather Thanks for the help. Merged into master.
Any suggestion on the unit tests that needs to be added?

Contributor

abose commented Apr 7, 2015

@thehogfather Thanks for the help. Merged into master.
Any suggestion on the unit tests that needs to be added?

@MiguelCastillo

This comment has been minimized.

Show comment
Hide comment
@MiguelCastillo

MiguelCastillo Apr 7, 2015

Contributor

@thehogfather yeah man, your last changes look very good. Thank you, this is a great addition to brackets! Now you gotta come up with another really cool extension :)

@abose I really like the idea of adding the package.json for attribution :)

Contributor

MiguelCastillo commented Apr 7, 2015

@thehogfather yeah man, your last changes look very good. Thank you, this is a great addition to brackets! Now you gotta come up with another really cool extension :)

@abose I really like the idea of adding the package.json for attribution :)

@le717

This comment has been minimized.

Show comment
Hide comment
@le717

le717 Apr 7, 2015

Contributor

Dancing banana

Congrats on the merge, @thehogfather! 😄

Contributor

le717 commented Apr 7, 2015

Dancing banana

Congrats on the merge, @thehogfather! 😄

@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Apr 7, 2015

Contributor

👍 thanks all. Glad I could help.

@abose I guess I would mainly check that folded states are persisted and restored correctly, and that the preference options (enabled, minFoldSize etc.) work as intended.

Contributor

thehogfather commented Apr 7, 2015

👍 thanks all. Glad I could help.

@abose I guess I would mainly check that folded states are persisted and restored correctly, and that the preference options (enabled, minFoldSize etc.) work as intended.

@@ -0,0 +1,268 @@
/**
* Based on http://codemirror.net/addon/fold/foldcode.js
* @author Patrick Oladimeji

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

I think we still need to keep the original copyright from CodeMirror here

@peterflynn

peterflynn Apr 8, 2015

Member

I think we still need to keep the original copyright from CodeMirror here

"i18n" : "lib/i18n"
},
locale: brackets.getLocale()
});

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

This should be unnecessary now that this is a part of core

@peterflynn

peterflynn Apr 8, 2015

Member

This should be unnecessary now that this is a part of core

module.exports = require("i18n!nls/strings");
});

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

Ditto -- I think this whole file is no longer used

@peterflynn

peterflynn Apr 8, 2015

Member

Ditto -- I think this whole file is no longer used

@@ -0,0 +1,59 @@
/**
* Fold latex code regions

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

I wonder if a better approach would be to make this more extensible -- an important goal of the LanguageManager work is to make it so any feature in Brackets can be enabled for additional languages just by installing an extension. Latex and the custom regions feature both seem like potential candidates to move out into extensions. (Especially since the Latex CM mode isn't even turned on in Brackets core...)

Custom regions also adds a menu item that I suspect few users will understand, and that's concerning to me. Since refactoring this to be more extensible is probably a post-1.3 thing, I wonder if it'd be better to just disable the custom regions feature for now? Or have the menu item hidden by default, and accessible only by setting a preference?

@peterflynn

peterflynn Apr 8, 2015

Member

I wonder if a better approach would be to make this more extensible -- an important goal of the LanguageManager work is to make it so any feature in Brackets can be enabled for additional languages just by installing an extension. Latex and the custom regions feature both seem like potential candidates to move out into extensions. (Especially since the Latex CM mode isn't even turned on in Brackets core...)

Custom regions also adds a menu item that I suspect few users will understand, and that's concerning to me. Since refactoring this to be more extensible is probably a post-1.3 thing, I wonder if it'd be better to just disable the custom regions feature for now? Or have the menu item hidden by default, and accessible only by setting a preference?

This comment has been minimized.

@thehogfather

thehogfather Apr 8, 2015

Contributor

@peterflynn I agree - and I've already tested moving the latex-fold function into the latex extension and that is works as expected. They can be safely removed from the main.js file (if you haven't sealed changes to 1.3 yet).
I also think the custom region should be disabled by default (and the menu option hidden).

@thehogfather

thehogfather Apr 8, 2015

Contributor

@peterflynn I agree - and I've already tested moving the latex-fold function into the latex extension and that is works as expected. They can be safely removed from the main.js file (if you haven't sealed changes to 1.3 yet).
I also think the custom region should be disabled by default (and the menu option hidden).

* @param {Object} folds the fold ranges to save for the current document
*/
function setFolds(path, folds) {
store[path] = simplify(folds);

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

This really should be in view state and not the main preferences file -- it's exactly the kind of thing view state was intended for. This seems like something we should fix for 1.3 lest we start polluting everyone's preferences file (which should be easily human-readable) with folding state.

@peterflynn

peterflynn Apr 8, 2015

Member

This really should be in view state and not the main preferences file -- it's exactly the kind of thing view state was intended for. This seems like something we should fix for 1.3 lest we start polluting everyone's preferences file (which should be easily human-readable) with folding state.

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

Filed as #10846 to make sure we track this

@peterflynn

peterflynn Apr 8, 2015

Member

Filed as #10846 to make sure we track this

This comment has been minimized.

@abose

abose Apr 8, 2015

Contributor

@thehogfather #10846 Instead of using the prefs , could we migrate the folding state to state.json?

@abose

abose Apr 8, 2015

Contributor

@thehogfather #10846 Instead of using the prefs , could we migrate the folding state to state.json?

This comment has been minimized.

@thehogfather

thehogfather Apr 8, 2015

Contributor

@abose yes - for the folds. I suspect the other settings would need to be in the regular prefs (brackets.json).

@thehogfather

thehogfather Apr 8, 2015

Contributor

@abose yes - for the folds. I suspect the other settings would need to be in the regular prefs (brackets.json).

This comment has been minimized.

@abose

abose Apr 8, 2015

Contributor

@thehogfather could use PreferencesManager.getViewState("codefolding.states"); and PreferencesManager.setViewState("codefolding.states", state) to put to the state.json file.

@abose

abose Apr 8, 2015

Contributor

@thehogfather could use PreferencesManager.getViewState("codefolding.states"); and PreferencesManager.setViewState("codefolding.states", state) to put to the state.json file.

* Clears all the saved line folds for all documents.
*/
function clearAllFolds() {
prefs.set(foldsKey, {});

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

This function appears to be unused, but I think it also has a bug: this doesn't reset the store var used elsewhere, so any call to setFolds() later seems like it would immediately restore all the folds that had been cleared previously.

It's probably safest just to re-get the pref before setting it each time. There may be other bugs lurking with the current approach too (e.g. if you edit the prefs file... does it blow those changes away?)

@peterflynn

peterflynn Apr 8, 2015

Member

This function appears to be unused, but I think it also has a bug: this doesn't reset the store var used elsewhere, so any call to setFolds() later seems like it would immediately restore all the folds that had been cleared previously.

It's probably safest just to re-get the pref before setting it each time. There may be other bugs lurking with the current approach too (e.g. if you edit the prefs file... does it blow those changes away?)

This comment has been minimized.

@thehogfather

thehogfather Apr 8, 2015

Contributor

@peterflynn yes editing the prefs file for documents that are currently open in brackets (has no effect - the changes are restored one the document becomes the active editor). This is a bug - that your safe approach should fix.

@thehogfather

thehogfather Apr 8, 2015

Contributor

@peterflynn yes editing the prefs file for documents that are currently open in brackets (has no effect - the changes are restored one the document becomes the active editor). This is a bug - that your safe approach should fix.

{name: strings.ALWAYS_USE_INDENT_FOLD, description: strings.ALWAYS_USE_INDENT_FOLD_HELP});
prefs.definePreference("enableRegionFolding", "boolean", true,
{name: strings.ENABLE_REGION_FOLDING, description: strings.ENABLE_REGION_FOLDING});
prefs.definePreference("fadeFoldButtons", "boolean", false,

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

I wonder if this preference should be on by default.

I can't actually get it to work though -- when I set it to true, it seems to have no effect (at least on JS or LESS files). Will file a bug.

@peterflynn

peterflynn Apr 8, 2015

Member

I wonder if this preference should be on by default.

I can't actually get it to work though -- when I set it to true, it seems to have no effect (at least on JS or LESS files). Will file a bug.

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

Ok, false alarm with the preferences issue.

I wonder if the best UX is actually in between this setting (hidden until mouseover) and the default (always visible) -- having the triangles be fainter until you mouse over the gutter, then getting darker. I may mock that up and see how it feels...

@peterflynn

peterflynn Apr 8, 2015

Member

Ok, false alarm with the preferences issue.

I wonder if the best UX is actually in between this setting (hidden until mouseover) and the default (always visible) -- having the triangles be fainter until you mouse over the gutter, then getting darker. I may mock that up and see how it feels...

prefs.definePreference("saveFoldStates", "boolean", true,
{name: strings.SAVE_FOLD_STATES, description: strings.SAVE_FOLD_STATES_HELP});
prefs.definePreference("alwaysUseIndentFold", "boolean", true,
{name: strings.ALWAYS_USE_INDENT_FOLD, description: strings.ALWAYS_USE_INDENT_FOLD_HELP});

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

What does it mean to have this enabled? What is the behavior e.g. in a JS file if this conflicts with the standard brace-fold/comment-fold helpers?

@peterflynn

peterflynn Apr 8, 2015

Member

What does it mean to have this enabled? What is the behavior e.g. in a JS file if this conflicts with the standard brace-fold/comment-fold helpers?

This comment has been minimized.

@thehogfather

thehogfather Apr 8, 2015

Contributor

It means that line indentation is used as a suggestion for fold regions. Although this shouldn't take priority over range finders based on the current mode. So where there is conflict, the brace-fold-finder should take precedence. Having said that this might be another pref that could be better off disabled by default.

@thehogfather

thehogfather Apr 8, 2015

Contributor

It means that line indentation is used as a suggestion for fold regions. Although this shouldn't take priority over range finders based on the current mode. So where there is conflict, the brace-fold-finder should take precedence. Having said that this might be another pref that could be better off disabled by default.

Initialise the extension
*/
function init() {
if (CodeMirror.fold.combine || !prefs.getSetting("enabled")) {

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

When would CodeMirror.fold.combine be true?

@peterflynn

peterflynn Apr 8, 2015

Member

When would CodeMirror.fold.combine be true?

This comment has been minimized.

@thehogfather

thehogfather Apr 8, 2015

Contributor

It would be truthy if the code-folding plugin is already loaded. This is mainly for the extension in the registry- to prevent registering key bindings twice etc. I could not find an api to check that an extension has loaded. That code fragment can be removed without affecting the logic of initialisation.

@thehogfather

thehogfather Apr 8, 2015

Contributor

It would be truthy if the code-folding plugin is already loaded. This is mainly for the extension in the registry- to prevent registering key bindings twice etc. I could not find an api to check that an extension has loaded. That code fragment can be removed without affecting the logic of initialisation.

This comment has been minimized.

@peterflynn

peterflynn Apr 8, 2015

Member

Ah, in that case -- core extensions are always loaded before user-installed extensions, so I think this logic is only needed in the registry copy, not here.

@peterflynn

peterflynn Apr 8, 2015

Member

Ah, in that case -- core extensions are always loaded before user-installed extensions, so I think this logic is only needed in the registry copy, not here.

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Apr 8, 2015

Contributor

@thehogfather I was verifying the unit tests and some of the integration tests in the unit test setup is failing.
Most is with this message- Cannot read property 'lastIndexOf' of undefined
Could you take a look at debug>run tests>integration>all .

Contributor

abose commented Apr 8, 2015

@thehogfather I was verifying the unit tests and some of the integration tests in the unit test setup is failing.
Most is with this message- Cannot read property 'lastIndexOf' of undefined
Could you take a look at debug>run tests>integration>all .

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Apr 8, 2015

Contributor

Code folding is enabled in all files by default, and in some files like txt files it looks a bit odd.
Would it be a good thing to enable code folding in only HTML,XML,js Etc. and disabled in all other file types?

Contributor

abose commented Apr 8, 2015

Code folding is enabled in all files by default, and in some files like txt files it looks a bit odd.
Would it be a good thing to enable code folding in only HTML,XML,js Etc. and disabled in all other file types?

@thehogfather

This comment has been minimized.

Show comment
Hide comment
@thehogfather

thehogfather Apr 8, 2015

Contributor

@abose wrt unit tests, I am unable to run them completely. They freeze with about 125 tests to go. Can you tell me the file throwing the error or show a stack trace? I remember spotting one a while back in one of the imported codeMirror range finders.

Contributor

thehogfather commented Apr 8, 2015

@abose wrt unit tests, I am unable to run them completely. They freeze with about 125 tests to go. Can you tell me the file throwing the error or show a stack trace? I remember spotting one a while back in one of the imported codeMirror range finders.

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Apr 9, 2015

Contributor

There is a memory issue with the unit tests currently, so we won't be able to run all tests in a single go.
So in order to run it, we have to the tests in individual sections.
First restart brackets; then open test suite, click on integration tab, click on all; it would start running integration tests. If brackets slows down, Restart brackets again to run tests.
In integration test, specifically the following test are failing[ FindInFiles(3 test cases),FindReplace - Integration(1), InlineEditorProviders(3), QuickOpen(3)].
I am checking out these errors and the stack.

But Issue#10857 seems to be much more important than this. My understanding of the extension is limited; it might take a while for me to fix it. Could you take a look at the issue?

Contributor

abose commented Apr 9, 2015

There is a memory issue with the unit tests currently, so we won't be able to run all tests in a single go.
So in order to run it, we have to the tests in individual sections.
First restart brackets; then open test suite, click on integration tab, click on all; it would start running integration tests. If brackets slows down, Restart brackets again to run tests.
In integration test, specifically the following test are failing[ FindInFiles(3 test cases),FindReplace - Integration(1), InlineEditorProviders(3), QuickOpen(3)].
I am checking out these errors and the stack.

But Issue#10857 seems to be much more important than this. My understanding of the extension is limited; it might take a while for me to fix it. Could you take a look at the issue?

@peterflynn

This comment has been minimized.

Show comment
Hide comment
@peterflynn

peterflynn Apr 9, 2015

Member

@abose I took a quick look at those unit tests and it seems like the Health Report notification dialog might be causing problems in some of them (you can see it popping up in each test run, even though there's code that should suppress it).

The 3 QuickOpen failures might be different -- I can repro them on my old smart-autocompelte branch (which doesn't have code folding or Health Report), so those failures might be caused by my recent PR there. I can try to take a look tomorrow -- lmk if you find anything out before then.

Member

peterflynn commented Apr 9, 2015

@abose I took a quick look at those unit tests and it seems like the Health Report notification dialog might be causing problems in some of them (you can see it popping up in each test run, even though there's code that should suppress it).

The 3 QuickOpen failures might be different -- I can repro them on my old smart-autocompelte branch (which doesn't have code folding or Health Report), so those failures might be caused by my recent PR there. I can try to take a look tomorrow -- lmk if you find anything out before then.

@abose

This comment has been minimized.

Show comment
Hide comment
@abose

abose Apr 9, 2015

Contributor

The health notifications dialogs will be disabled when unit tests are nunning, but i guess that PR is still under review.
For the time being, it can be disabled by going to HealthDataNotification.js > AppInit.appReady()>
params.parse();if (params.get("testEnvironment")) return;

Contributor

abose commented Apr 9, 2015

The health notifications dialogs will be disabled when unit tests are nunning, but i guess that PR is still under review.
For the time being, it can be disabled by going to HealthDataNotification.js > AppInit.appReady()>
params.parse();if (params.get("testEnvironment")) return;

@redmunds

This comment has been minimized.

Show comment
Hide comment
@redmunds

redmunds Apr 9, 2015

Contributor

There's a wiki page with Tips and Tricks for Running Brackets Unit Tests so just add any new tips there and share this link.

Contributor

redmunds commented Apr 9, 2015

There's a wiki page with Tips and Tricks for Running Brackets Unit Tests so just add any new tips there and share this link.

@Pooria-H

This comment has been minimized.

Show comment
Hide comment
@Pooria-H

Pooria-H May 28, 2015

Why there is no option to disable this feature? It's ugly.

Pooria-H commented May 28, 2015

Why there is no option to disable this feature? It's ugly.

@le717

This comment has been minimized.

Show comment
Hide comment
@le717

le717 May 28, 2015

Contributor

@Pooria-H There is an option. In your brackets.json file, set code-folding.enabled to false. You can get more details on the wiki.

Contributor

le717 commented May 28, 2015

@Pooria-H There is an option. In your brackets.json file, set code-folding.enabled to false. You can get more details on the wiki.

@ryanstewart

This comment has been minimized.

Show comment
Hide comment
@ryanstewart

ryanstewart May 28, 2015

Member

Thanks @le717 !

Member

ryanstewart commented May 28, 2015

Thanks @le717 !

@Pooria-H

This comment has been minimized.

Show comment
Hide comment
@Pooria-H

Pooria-H May 28, 2015

@le717 Oh I didn't noticed. thanks

Pooria-H commented May 28, 2015

@le717 Oh I didn't noticed. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment