-
Notifications
You must be signed in to change notification settings - Fork 22
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
Enable your extension to run on VS Code for the web #39
base: master
Are you sure you want to change the base?
Conversation
Thanks.
When I try packaging I also get this error: I'm the maintainer, not the author, of this extension, so I'm out of my depth on all this. Please advise. |
Thanks, @tanhakabir, and I hope my follow-up questions make sense.
|
No worries! I was out on vacation but can help you today! |
Thank you. Please see my earlier questions for where I need more guidance. I'm sorry that it will be basic things about the environment, but at least they should be easy to resolve, as you've clearly done the hard work already. |
No worries! I addressed the error and warning you had posted |
Many thanks. This now builds correctly. I can't yet see any code changes that would trigger this, but I've tried it on an Intel and an M1 Mac, and both are exhibiting this effect. |
I then noticed that this new build was then ignoring all highlights that I set up under various keywords. So I then reverted the only change of yours it could be, though it seemed very unlikely to be a problem, and that did fix the problem . I'm not sufficiently familiar with JS to know why you wanted to make this change -- can you explain please? And any idea why this would in fact then ignore the keywords? Thanks, @tanhakabir. |
I have now tried to follow the instructions you linked to to test this in web mode using @vscode/test-web However, I got this error: |
@jgclark Hmm I can't seem to repro the colors issue you mentioned. I see this for the and nothing highlighted for numbers: In regards to why I set So I used
For this specific issue, I'm not sure. Would you be able to create an issue here to get more help? https://github.com/microsoft/vscode-test-web |
Thanks for your help, @tanhakabir. |
@jgclark The |
Thank you, @alkatar21. As you can see I'm finally getting back to the overdue changes on this. As it looks like you're still interested in moving this forward would you please drop me a line at [email protected] so I could check one detail with you? Thanks. |
I wrote you and maybe @elazarcoh can also help, as he at least knows js? |
@alkatar21 Thanks -- but haven't received any emails (and have checked spam). |
I can help, though I can't promise to be fast to respond. I'm fairly busy these days. |
@jgclark I sent you another email. I clicked on the email, so there should be no typo in there from my side. The subject of the email is I can try to check PRs for this project and merge as long as I am sure they are ok. But like @elazarcoh I'm fairly busy these days. |
@elazarcoh and @alkatar21 I have picked this up again, as I have a few days holiday. I released some smaller pending updates yesterday, but all the discussed issues and PRs aren't ready for one reason or another. I've looked at the line referred to several times above, and when I change it to what you've suggested, it still highlights the wrong things, as it then only produces You emailed me @alkatar21, but I've checked again and I can't see the message, sorry. |
I see it's working on the web (using https://github.com/microsoft/vscode-test-web). Object.keys(keywords).forEach((v) => { // <--- need to uncomment this and commnet/remove the next line
// keywords.forEach((v) => { |
Many thanks for picking this up again so quickly. Glad it's working for you.
I still don't understand how it can fail for me but be OK for you and others. But never mind, please go ahead and create and commit a VSIX for this and I will try to test that and give feedback. |
Sorry, it doesn't. None of my highlights then work, and instead it does the same thing as I showed in a screenshot on "Sep 28, 2021" above, with same analysis as yesterday. With difficulty I managed to sometimes get the debugging view, and I could see that one of the variables (I forget if it was This difference in behaviour is rather bizarre. So I've attached the part of my settings file that's relevant for you to try on your system. |
Alright. I noticed something incoherent with the configuration of the extension. "todohighlight.keywords": {
"type": "array",
// ...
},
"default": {
"TODO:": {
"text": "TODO:",
"color": "#fff",
"backgroundColor": "#ffbd2a",
"overviewRulerColor": "rgba(255,189,42,0.8)"
},
"FIXME:": {
"text": "FIXME:",
"color": "#fff",
"backgroundColor": "#f06292",
"overviewRulerColor": "rgba(240,98,146,0.8)"
}
}
} Note that the type of the config is "array", but the default is "object". I pushed a fix for it, along with a vsix. |
@elazarcoh I think this PR was not rebased to the current master? Because that was fixed in #62. |
@jgclark I have tried it again with subject |
Commit test v2.1.0 for unwanted numeral colour by @tanhakabir
Don't merge yet. Something got messed up with all the rebase. |
Thanks. Have found it this time, and have invited you as a collaborator ... sorry it's taken so long! |
I think I'll make another PR for it. This one has too many conflicting commits to the master, and it makes the rebase easy to fail. |
Thanks, @elazarcoh, that sounds like a good idea. I did get as far as finding the
Should I just discard these changes? |
Opened a new PR #73 |
Hey @jgclark! 👋
I'm part of the VS Code team and we recently launched VS Code for the web with github.dev! You can read the full guide for extension authors creating and migrating extensions here: Web Extensions
In hopes to help you migrate I helped make the changes necessary to make your extensions work on the web.
The changes I made:
os
withos-browsersify
browser
entry point to yourpackage.json
to link to the web-friendly compiled extension.gitignore
and.vscodeignore
You can test your extension with a launch configuration or
vscode-test-web
. Learn more on the docs.