Skip to content

Sortable directive, generic or specific? #7

@cmkramer

Description

@cmkramer

The sortable directive is placed in the writer module though it seems it does not necessarily have to be writer specific. The directive itself has a very generic name, which can cause problems if its nature is only specifically aimed at facilitating the sortability of scenarios and steps in stories within the writer module.

It may be better to choose one of the following approaches:

  1. Rename the directive to storyWriterSortable to show its only relevant for this specific case. Also do this for the controller.
  2. Make it generic. This can probably be achieved by ensuring that the list-animate class statements are abstracted into a passable parameter for the directive as opposed to hardcoded class names that are very application specific. You would also have to double check the parent scope digest references to ensure that works in a generic setup, or if you should work with an explicitly passed sortable container on which you can call a digest.

For now option 1 might be the best, considering the lack of other cases where this directive is applied.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions