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

Update to current TouchBar Electron API #312

Conversation

thatcomputerguy0101
Copy link
Contributor

On my installation, the touch bar didn't originally work. After looking at the Electron documentation, I noticed that the TouchBar API is still experimental. Comparing the code of this library to a working example, I have determined that the fix is to wrap 'items' within an object when it is passed to the TouchBar constructor. This PR contains that change.

@thatcomputerguy0101
Copy link
Contributor Author

Also, I may be wrong, but I believe this fixes the issue described in #237.

@aminya
Copy link
Member

aminya commented Jul 26, 2020

Thanks for this. I do not have a Mac to test this. If anyone of the other maintainers has they can review this.

@ericcornelissen
Copy link
Contributor

Thanks for this. I do not have a Mac to test this. If anyone of the other maintainers has they can review this.

I don't so I can't test that either. @thatcomputerguy0101, is this the documentation on which the change is based? Did you try if the changes fixes the problem locally? If so, then I would be happy to merge this Pull Request.

Also, I may be wrong, but I believe this fixes the issue described in #237.

Was your problem similar to what is described in that issue? If so I think it is safe to close that issue after this is merged 👍

@thatcomputerguy0101
Copy link
Contributor Author

thatcomputerguy0101 commented Jul 26, 2020

I don't so I can't test that either. @thatcomputerguy0101, is this the documentation on which the change is based? Did you try if the changes fixes the problem locally? If so, then I would be happy to merge this Pull Request.

Yes, the options parameter appears to have changed to an object. I have attached a screenshot of what the touch bar looks like with some buttons after I made this change locally.

Touch Bar Shot 2020-07-26 at 2 20 35 PM

Also, I may be wrong, but I believe this fixes the issue described in #237.

Was your problem similar to what is described in that issue? If so I think it is safe to close that issue after this is merged 👍

After looking at that issue in more detail, I have determined that they are seperate problems. In my case, the touch bar was completely blank instead of just missing icons. Also, I have successfully reproduced that outcome on my own machine after this edit:

Touch Bar Shot 2020-07-26 at 2 33 04 PM

@ericcornelissen
Copy link
Contributor

Alright, thanks for the followup @thatcomputerguy0101. In that case I will leave this for @suda to review, in case they can test this on a Mac with a touch bar.

@jpcranford
Copy link

I'm not @suda, but I can confirm this fully fixes the issue, and by only adding { } around one little thing.

@suda suda merged commit 6496a6a into atom-community:master Oct 15, 2020
@thatcomputerguy0101 thatcomputerguy0101 deleted the thatcomputerguy0101-touchbar-api-patch branch November 30, 2020 01:37
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

Successfully merging this pull request may close these issues.

5 participants