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

Transition Posting Journal Services into Grid Services #376

Closed
jniles opened this issue May 3, 2016 · 1 comment
Closed

Transition Posting Journal Services into Grid Services #376

jniles opened this issue May 3, 2016 · 1 comment
Assignees
Labels

Comments

@jniles
Copy link
Contributor

jniles commented May 3, 2016

Currently, we have all our ui-grid services in directory services/journal/*Service.js. These are chiefly used by the Posting Journal, but might easily be used by other grids.

I propose that we transition most of the Posting Journal Services (Grouping, Sorting, Filtering) into generically-named Grid Services. This will encourage us to share services for the grids, and design modular, generic interfaces. Since we will be using ui-grid in a number of modules, it makes sense for us to reuse services as much as possible.

@jniles jniles added the design label May 3, 2016
@jniles
Copy link
Contributor Author

jniles commented Jul 13, 2016

I'll work on this while fixing #535.

@jniles jniles self-assigned this Jul 13, 2016
jniles referenced this issue in jniles/bhima Jul 14, 2016
Closes #535.

This commit refactors the journal's column services into a single
service that can be shared across any UI grid.  It uses class instances
to namespace grids, while efficiently sharing methods between instances
via prototypes.

GridColumnService now expects the default visibility of columns to be
set on the column definitions in the gridOptions.  For example:
```js
$scope.gridOptions = {
  columnDefs : [{
    field : 'currency_id', displayName: 'Currency ID', visible: false
  }, {
    field : 'debit', displayName: 'Debit', visible: true
  }]
};
```

Note that ui-grid defaults to `visible:true` for all columns whose
visibility is not explicitly defined.

Additionally, the end-to-end tests have been rewritten to test the
following:
 1. Column selection checkboxes change the columns to the correct column
 names.
 2. Column selections are cached (survive browser refresh)
 3. Column config modal resets the default number of columns.

This PR does not completely address #376 yet.  Since there is some
non-standard service architecture, I am submitting it for review before
continuing on in this fashion.
jniles referenced this issue in jniles/bhima Jul 14, 2016
Closes #535.

This commit refactors the journal's column services into a single
service that can be shared across any UI grid.  It uses class instances
to namespace grids, while efficiently sharing methods between instances
via prototypes.

GridColumnService now expects the default visibility of columns to be
set on the column definitions in the gridOptions.  For example:
```js
$scope.gridOptions = {
  columnDefs : [{
    field : 'currency_id', displayName: 'Currency ID', visible: false
  }, {
    field : 'debit', displayName: 'Debit', visible: true
  }]
};
```

Note that ui-grid defaults to `visible:true` for all columns whose
visibility is not explicitly defined.

Additionally, the end-to-end tests have been rewritten to test the
following:
 1. Column selection checkboxes change the columns to the correct column
 names.
 2. Column selections are cached (survive browser refresh)
 3. Column config modal resets the default number of columns.

This PR does not completely address #376 yet.  Since there is some
non-standard service architecture, I am submitting it for review before
continuing on in this fashion.
jniles referenced this issue in jniles/bhima Jul 14, 2016
Closes #535.

This commit refactors the journal's column services into a single
service that can be shared across any UI grid.  It uses class instances
to namespace grids, while efficiently sharing methods between instances
via prototypes.

GridColumnService now expects the default visibility of columns to be
set on the column definitions in the gridOptions.  For example:
```js
$scope.gridOptions = {
  columnDefs : [{
    field : 'currency_id', displayName: 'Currency ID', visible: false
  }, {
    field : 'debit', displayName: 'Debit', visible: true
  }]
};
```

Note that ui-grid defaults to `visible:true` for all columns whose
visibility is not explicitly defined.

Additionally, the end-to-end tests have been rewritten to test the
following:
 1. Column selection checkboxes change the columns to the correct column
 names.
 2. Column selections are cached (survive browser refresh)
 3. Column config modal resets the default number of columns.

This PR does not completely address #376 yet.  Since there is some
non-standard service architecture, I am submitting it for review before
continuing on in this fashion.
sfount pushed a commit that referenced this issue Jul 18, 2016
Closes #535.

This commit refactors the journal's column services into a single
service that can be shared across any UI grid.  It uses class instances
to namespace grids, while efficiently sharing methods between instances
via prototypes.

GridColumnService now expects the default visibility of columns to be
set on the column definitions in the gridOptions.  For example:
```js
$scope.gridOptions = {
  columnDefs : [{
    field : 'currency_id', displayName: 'Currency ID', visible: false
  }, {
    field : 'debit', displayName: 'Debit', visible: true
  }]
};
```

Note that ui-grid defaults to `visible:true` for all columns whose
visibility is not explicitly defined.

Additionally, the end-to-end tests have been rewritten to test the
following:
 1. Column selection checkboxes change the columns to the correct column
 names.
 2. Column selections are cached (survive browser refresh)
 3. Column config modal resets the default number of columns.

This PR does not completely address #376 yet.  Since there is some
non-standard service architecture, I am submitting it for review before
continuing on in this fashion.
jniles referenced this issue in jniles/bhima Jul 20, 2016
Fixes IMA-WorldHealth#573.

This commit fixes the bug that collapsed all rows of the grid by default
using a $timeout hack.

It also migrates the entire journal grouping service to a independent
service fit to be attached to any grid.  This partially addresses #376.
jniles referenced this issue in jniles/bhima Jul 20, 2016
Closes #376.
Closes IMA-WorldHealth#586.

This commit completes the migration of specific posting journal services
to grid services.  It also removes the ability to paginate the posting
journal as this increases the complexity of the process several fold.

In addition to migrating the service, the GridFiltering service now
provides the option to toggle (inline) filtering on and off.  This could be
useful for power users wanting to filter the view quickly.
jniles referenced this issue in jniles/bhima Jul 21, 2016
Fixes IMA-WorldHealth#573.

This commit fixes the bug that collapsed all rows of the grid by default
using a $timeout hack.

It also migrates the entire journal grouping service to a independent
service fit to be attached to any grid.  This partially addresses #376.
jniles referenced this issue in jniles/bhima Jul 21, 2016
Closes #376.
Closes IMA-WorldHealth#586.

This commit completes the migration of specific posting journal services
to grid services.  It also removes the ability to paginate the posting
journal as this increases the complexity of the process several fold.

In addition to migrating the service, the GridFiltering service now
provides the option to toggle (inline) filtering on and off.  This could be
useful for power users wanting to filter the view quickly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant