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

Factor out sorting in the doc table #10924

Merged
merged 2 commits into from Apr 3, 2017

Conversation

Projects
None yet
3 participants
@weltenwort
Contributor

weltenwort commented Mar 29, 2017

This refactoring effort turns the implicit manipulation of the sort
order, that was performed inline in the table header, into explicit
calls to functions provided by the parent of the <doc-table>
directive. It thereby separates presentation logic from business logic
and prepares the directive for further refactorings.

Additionally, the parent can now control whether sorting is allowed at
all by either implementing custom logic in the onSortOrderChange
handler or by leaving it out completely. In the latter case the sorting
controls will be completely hidden from the header.

Factor out sorting in the doc table
This refactoring effort turns the implicit manipulation of the sort
order, that was performed inline in the table header, into explicit
calls to functions provided by the parent of the `<doc-table>`
directive. It thereby separates presentation logic from business logic
and prepares the directive for further refactorings.

Additionally, the parent can now control whether sorting is allowed at
all by either implementing custom logic in the `onSortOrderChange`
handler or by leaving it out completely. In the latter case the sorting
controls will be completely hidden from the header.
@lukasolson

LGTM! Thanks for cleaning this up.

@weltenwort

This comment has been minimized.

Show comment
Hide comment
@weltenwort

weltenwort Mar 31, 2017

Contributor

@Stacey-Gammon I implemented your suggestion. Are you fine with the way that looks?

Contributor

weltenwort commented Mar 31, 2017

@Stacey-Gammon I implemented your suggestion. Are you fine with the way that looks?

@weltenwort weltenwort merged commit 6e4ee6f into elastic:master Apr 3, 2017

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
kibana-ci Build finished.
Details

weltenwort added a commit to weltenwort/kibana that referenced this pull request Apr 3, 2017

Factor out sorting in the doc table (elastic#10924)
This refactoring effort turns the implicit manipulation of the sort
order, that was performed inline in the table header, into explicit
calls to functions provided by the parent of the `<doc-table>`
directive. It thereby separates presentation logic from business logic
and prepares the directive for further refactorings.

Additionally, the parent can now control whether sorting is allowed at
all by either implementing custom logic in the `onSortOrderChange`
handler or by leaving it out completely. In the latter case the sorting
controls will be completely hidden from the header.

weltenwort added a commit that referenced this pull request Apr 3, 2017

Dreadnoth added a commit to Dreadnoth/kibana that referenced this pull request Aug 8, 2017

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