You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes#1098 by replacing every $.each in the core code with either Array.forEach for arrays or CollectionUtils.forEach for objects. The remaining $.each are only in jQuery.
@WebsiteDeveloper just to be clear, we will need a code review from a Brackets committer also before landing this. But still feel free to review it -- an extra set of eyes to point out issues never hurts!
@WebsiteDeveloper, I'll be tagging along with you for this one. Please, feel free to review and voice your concerns, if any. I'll go over it myself later today or tomorrow and do the same, and then we'll iterate until everything looks good before merging, as usual ;)
@peterflynn i did know that, but as you said i'll just look at it @jbalsas No issues spotted, all unit tests pass so should be fine.
After all, those are simple changes.
Simple, but could break anything if using the wrong forEach. Anyway I did tested everything and run the tests before submitting it.
There are still a couple of Object.keys().forEach iterations left. Those are OK, but for better consistency, should these be CollectionUtils.forEach loops?
As i'm a fan of consistency i would say yes, because generally consistency makes i a lot easier for new developers to understand the code, also it makes the code more maintainable.
@TomMalbran I think we only have Object.keys().forEach in PreferencesManager and UrlParams. I'd also prefer to move them over to CollectionUtils.forEach for consistency.
@WebsiteDeveloper Thanks for your help with the review! Keep your eyes open, surely more like this are on their way ;) @TomMalbran Sorry I couldn't get to this yesterday...
@TomMalbran By the way, I just realized that you're still using your personal fork of Brackets to create your pull requests. I think should be able to create branches directly in this main repo if that's an easier workflow for you.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #1098 by replacing every
$.each
in the core code with eitherArray.forEach
for arrays orCollectionUtils.forEach
for objects. The remaining$.each
are only in jQuery.