ember-drag-drop icon indicating copy to clipboard operation
ember-drag-drop copied to clipboard

Closure actions

Open sandstrom opened this issue 8 years ago • 2 comments

Wonderful addon! ⛵

Unless I'm mistaken currying + closure actions could be used instead of the current method for setting secondary arguments.

Perhaps a future version could deprecate the previous usage (simplified codebase) and align with closure actions. Will also simplify passing extra arguments for misc types of actions.

What do you think?

<!-- before -->
{{#draggable-object-target action="setStatus" status="Ready to Publish"}}
  Ready to Publish
{{/draggable-object-target}}

<!-- after -->
{{#draggable-object-target action=(action 'setStatus' 'Ready to Publish')}}
  Ready to Publish
{{/draggable-object-target}}

Source: https://dockyard.com/blog/2015/10/29/ember-best-practice-stop-bubbling-and-use-closure-actions

sandstrom avatar Sep 06 '16 16:09 sandstrom

Absolutely. My goal is once I finish adding the feature I'm working on, I'm going to modernize a lot of the addon, including the usage of the the targets. Unfortunately that will mean breaking backward compatibility. When that goes out, it will be a version of 0.5 and once it's stable I'll move the library to 1.0 finally. I plan on making an issue with a list of what I'd like to see updated. I know some folks have requested this so they could help out as well.

dgavey avatar Sep 06 '16 16:09 dgavey

@dgavey Do you want a help with that issue?

marxsk avatar Feb 14 '17 15:02 marxsk