Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Refactor the action layer for modules to load the actions directly not just names #2913

Closed
lsilvs opened this issue Feb 19, 2019 · 0 comments · Fixed by #2929
Closed

Refactor the action layer for modules to load the actions directly not just names #2913

lsilvs opened this issue Feb 19, 2019 · 0 comments · Fixed by #2929
Assignees

Comments

@lsilvs
Copy link
Contributor

lsilvs commented Feb 19, 2019

Expected behavior

Modify the implementation with these guidelines:

  1. Remove channel.action completely
  2. User can only define actions for a module in the module specification as an object, where keys of object are action names.
  3. Load those actions object in the controller properly (already have some implementation but need refactoring)
  4. The rest of the flow works exactly the same

Actual behavior

In current implementation the flow for actions is as below:

  1. At the time of module initialization, it provide array of actions (string names) that module supports.
  2. Controller pass the channel object while loading the module
  3. Module can actually define the action by using channel.action method during module loading async load method.

This flow does makes some ambiguity and difficult user flow. User may define the actions in different files, but forget to mention those in the module specification and vice versa. And its also difficult to find where the actions for particular modules are listed.

Which version(s) does this affect? (Environment, OS, etc...)

1.6.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants