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

Terminology used in Command implementations #825

Closed
michael opened this issue Oct 4, 2016 · 0 comments
Closed

Terminology used in Command implementations #825

michael opened this issue Oct 4, 2016 · 0 comments

Comments

@michael
Copy link
Member

michael commented Oct 4, 2016

I think these are a bit confusing at the moment.

Currently used terminology:

  • params (passed in via ctor), they are specified at the configurator level. this is all static stuff
  • props (passed in for getCommandState and execute) and contain documentSession, selectionState, surface, selection for getCommandState. For execute the previously computed commandstate is merged into props.
  • context (provide access to app-specific childContexts, core tools don't use context)

Suggested terminology:

  • config (relates it better to the configurator level and it's static nature)
  • params (no confusion with props which are used in components)
  • context (as is)

Instead of merging commandStates into params as done right now, I would provide commandState as an individual key. This would require some refactoring, but maybe worth to do that now as we can then freeze the command API for 1.0.

Thoughts?

michael pushed a commit that referenced this issue Oct 4, 2016
michael pushed a commit that referenced this issue Oct 5, 2016
michael pushed a commit that referenced this issue Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant