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

Some clickDispatchAction not working #18

Closed
ProLoser opened this issue Mar 6, 2018 · 3 comments
Closed

Some clickDispatchAction not working #18

ProLoser opened this issue Mar 6, 2018 · 3 comments

Comments

@ProLoser
Copy link

ProLoser commented Mar 6, 2018

This is my config:

exports.configuration = [{
  type: 'button',
  label: 'Project',
  clickDispatchAction: 'tree-view:toggle'
}, {
  type: 'button',
  label: 'Diagnostics',
  clickDispatchAction: 'diagnostics:toggle-table',
}, {
  type: 'button',
  label: 'Outline',
  clickDispatchAction: 'outline-view:toggle',
}, {
  type: 'button',
  label: 'Git',
  clickDispatchAction: 'github:toggle-git-tab',
}];

The diagnostics:toggle-table and outline-view:toggle commands are throwing errors. I have Atom-IDE installed and enabled and calling those commands directly or through the palette works fine.

@inakineitor
Copy link
Owner

inakineitor commented Mar 31, 2018

While testing I have tried overriding the checks for diagnostics and for outline-view, but nothing happens when I click the buttons. Could you please post an image of the error and an image of the proper functioning of the two commands. Are these packages part of Atom, or have you installed them?

@ProLoser
Copy link
Author

They are part of atom ide https://atom.io/packages/atom-ide-ui https://ide.atom.io/

@inakineitor
Copy link
Owner

I found the problem. It the cause was that the package atom-ide-ui has many sub-packages. I have fixed it and added a way to use these kinds of packages.
You have to use the click function like so:

{
  type: 'button',
  label: 'Diagnostics',
  click: () => {
    dispatchAction('diagnostics:toggle-table', 'workspace', true);
  },
  backgroundColor: '#4899a8'
}

For it to work, there must be a third argument in dispatchAction with the value true

I will publish the new update shortly.

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

2 participants