-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix importing for touch-bar-manager #329
Fix importing for touch-bar-manager #329
Conversation
Pull Updates
Calling the import function returns a module object, so I added a destructuring assignment to extract the function.
@aminya, do you have any preference regarding the remaining problem? |
I looked into a solution for the second part of this problem, and apparently, the
However, the relationship between a package being considered "loaded" and its service provider functions being called doesn't appear to be well defined, as The solution that I settled on as a temporary measure for myself was to remove the conditional loading for the |
I'll take a look tonight. Sorry I missed this PR. |
This fixes the issue for me too, I was also having an issue on line 18 of I am also still having an issue where the touchbar icons don't load unless I reload just the toolbar package I'm using because by the time the TouchBarManager has been loaded in ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the fix in this pull request has helped out a few people. If this pull request should be merged as is, I can take it out of draft mode so that it can be merged. Otherwise, I will leave this in draft mode until the problem with |
It might be worth also considering just loading the touch bar buttons from the tool bar manager when the touch bar manager becomes available, so the touch bar manager would have access to the buttons array from the tool bar manager |
@suda Would you like to transfer this repository to @atom-community, so we can expedite the process of maintenance? |
@suda Any news? |
I need to email @suda. We should ask him to give more people access to the repository. |
Hey @aminya I agree, we should transfer this package to @atom-community. Are the necessary steps for the transfer written down somewhere? |
This fixes an error when importing the
touch-bar-manager
script where the module object was imported but the constructor function was not extracted.However, there still exists a problem where
provideToolBar
can be called beforeuseTouchBar
returns, so something has to be done about that. One option to fix this is reverting the conditional loading oftouch-bar-manager
(the edits to tool-bar.js in d172cce). Another option would be to tie theprovideToolBar
function to the completion of theuseTouchBar
function, but I don't know how to do that without makingprovideToolBar
async, which changes the API.Fixes #325