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

[Canvas] Refactor shortcut types to better describe specific actions #45073

Closed
poffdeluxe opened this issue Sep 6, 2019 · 2 comments
Closed
Labels
chore Feature:Canvas impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@poffdeluxe
Copy link
Contributor

We should refactor our shortcut types to A) make it easier to add new shortcuts and B) make it easier to type specific shortcut actions.

For example, with something like:

  _keyHandler = (action: string) => {
    if (action === 'EDITING') {
      this.props.toggleWriteable();
    }
  };

there's not a good way to type that action besides string.

A refactor path could be to create an enum with all the actions. We could use this enum while building and typing the keymap or adding new shortcuts. This enum could also make it easier to type action types like EDITING or FULLSCREEN

@poffdeluxe poffdeluxe added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Sep 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@poffdeluxe poffdeluxe added chore loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Sep 6, 2019
@ThomThomson
Copy link
Contributor

Closing this for the time being because we are currently unable to prioritize Canvas refactoring efforts. We can re-open this down the line if priorities change.

@ThomThomson ThomThomson closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Canvas impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

4 participants