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

Sort model properties #622

Merged
merged 2 commits into from
Oct 21, 2017
Merged

Conversation

ryanlitalien
Copy link
Contributor

@ryanlitalien ryanlitalien commented Dec 20, 2016

Sort the properties of the selected mixin on the object-inspector sidebar.

Mentioned in this issue: #562

(I had some issues with tests, though running it against my Ember app, the properties were sorted correctly)

@ryanlitalien
Copy link
Contributor Author

ryanlitalien commented Dec 20, 2016

Closing due to my time constraints. There is a bit more work, as a few tests are failing, but this is the general idea on how to sort properties.

@locks locks reopened this Feb 11, 2017
@ryanlitalien
Copy link
Contributor Author

@locks Any reason for the re-open? It'd be awesome if you could tackle this ;)

@kamikaz1k
Copy link
Contributor

@ryanlitalien just tried it locally and it doesn't seem to be failing tests anymore. You should try re-running the CI build. (I think closing/re-opening the PR triggers that?)

@ryanlitalien
Copy link
Contributor Author

@teddyzeenny Can you please merge and release? Thanks!

@@ -17,6 +17,9 @@ export default Component.extend({
return this.get('model.expand') && this.get('model.properties.length') > 0;
}),

sortProperties: ['name'],
sortedProperties: sort('model.properties', 'sortProperties'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please document these? We're trying to document new code to slowly transition to a documented codebase.

/**
 * Used by the `sort` computed macro.
 *
 * @property sortProperties
 * @type {Array<String>}
 */
sortProperties: ['name'],

/**
 * Sort the properties by name to make them easier to find in the object inspector.
 *
 * @property sortedProperties
 * @type {Array<Object>}
 */
sortedProperties: sort('model.properties', 'sortProperties'),

@teddyzeenny teddyzeenny merged commit 940a65b into emberjs:master Oct 21, 2017
@teddyzeenny
Copy link
Contributor

Thanks!

@ryanlitalien ryanlitalien deleted the sorted-properties branch October 21, 2017 16:13
cyril-sf pushed a commit to cyril-sf/ember-inspector that referenced this pull request Mar 30, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants