Closed mattavery closed 8 months ago
Hmm, this feature may have regressed based on a change to the codepen API. I'll try to take a look and see what is going on. Apologies for the issue!
I just tried this out and everything seemed to work great for me. And I tried a few various languages just to double check.
Could you let me know which kind of swing you were seeing this failure with? And also, what OS/browser you're using? I confirmed that I'm using the latest CodePen APi correctly, but I want to confirm that I'm not missing some edge case. Thanks!
I don't believe the React/Vue/Svelte templates currently support CodePen export, so if that's what you're using, then I could see that failing.
I'm on a Mac OS 14.3.1, and am a newbie to VS Code. I had a simple swing with an index.html, style.css and script.js
I have an account on CodePen.io and was logged in. I've actually been using codepen for years - and am excited to use vs code + codeswing to do the same thing!
On Sat, Feb 17, 2024 at 1:52 PM Jonathan Carter @.***> wrote:
I just tried this out and everything seemed to work great for me. And I tried a few various languages just to double check.
Could you let me know which kind of swing you were seeing this failure with? And also, what OS/browser you're using? I confirmed that I'm using the latest CodePen APi correctly, but I want to confirm that I'm not missing some edge case. Thanks!
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950399028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHP32RNYLXFIUPHGHRXLYUERAPAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGM4TSMBSHA . You are receiving this because you authored the thread.Message ID: @.***>
Hmm ok. I'm also on macOS and I've tried an HTML/JS/CSS template with both Safari and Chrome, and it works beautifully. Out of curiosity, if you sign out of CodePen and try to export a swing from VS Code, does that work?
I just logged out of codepen, same thing - and I tried two different chrome profiles. How can I send the command to safari instead? I keep just getting "codepen.io/pen/define" sent to the location bar. Is it maybe some sort of configuration issue I have to do in VS Code? Again
On Sat, Feb 17, 2024 at 2:58 PM Jonathan Carter @.***> wrote:
Hmm ok. I'm also on macOS and I've tried an HTML/JS/CSS template with both Safari and Chrome, and it works beautifully. Out of curiosity, if you sign out of CodePen and try to export a swing from VS Code, does that work?
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950497655, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHP26LT3NTENOGGU7MZTYUEYZFAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGQ4TONRVGU . You are receiving this because you authored the thread.Message ID: @.***>
If I go to "https://codepen.io/pen/define" manually, even when logged out, I get an empty codepen setup with the html/css/js windows and the preview window. When VSCode sends the command I just get a blank window with "Bad Request" on the page. [image: image.png]
On Sat, Feb 17, 2024 at 3:02 PM Matthew Head @.***> wrote:
I just logged out of codepen, same thing - and I tried two different chrome profiles. How can I send the command to safari instead? I keep just getting "codepen.io/pen/define" sent to the location bar. Is it maybe some sort of configuration issue I have to do in VS Code? Again - I'm a newbie at it - first day!
On Sat, Feb 17, 2024 at 2:58 PM Jonathan Carter @.***> wrote:
Hmm ok. I'm also on macOS and I've tried an HTML/JS/CSS template with both Safari and Chrome, and it works beautifully. Out of curiosity, if you sign out of CodePen and try to export a swing from VS Code, does that work?
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950497655, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHP26LT3NTENOGGU7MZTYUEYZFAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGQ4TONRVGU . You are receiving this because you authored the thread.Message ID: @.***>
That CodePen URL is expected, but it seems like there's something erroring out when I send that endpoint the swing data. Could you try a brand new HTML/CSS/JS swing that has no code in it? I just want to confirm whether or not there's an issue with the code formatting when posting it to CodePen.
Also, is it possible you have any Chrome extensions that might be blocking anything?
ah - yeah - a fresh basic codeswing switched over to codepen just fine. maybe my page is too complicated?
On Sat, Feb 17, 2024 at 3:07 PM Jonathan Carter @.***> wrote:
That CodePen URL is expected, but it seems like there's something erroring out when I send that endpoint the swing data. Could you try a brand new HTML/CSS/JS swing that has no code in it? I just want to confirm whether or not there's an issue with the code formatting when posting it to CodePen.
Also, is it possible you have any Chrome extensions that might be blocking anything?
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950510878, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHP2B26PR5KZ5ICXLZV3YUEZ2ZAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGUYTAOBXHA . You are receiving this because you authored the thread.Message ID: @.***>
If you're comfortable sharing the code with me, I'd love to take a look and see what might be going wrong. It might just be a character that I need to URL encode or something. And if you want to try to narrow it down, maybe try a blank swing and just test exporting with your HTML, JS and CSS separately? Since I'm guessing the issue is with just one of your files.
I've been going thru and adding my functions one by one - and of course the last function I have makes it send the bad request. Everything else works as expected - so I'll start debugging. Thanks for being so responsive - I'll let you know how it goes!
On Sat, Feb 17, 2024 at 3:20 PM Jonathan Carter @.***> wrote:
If you're comfortable sharing the code with me, I'd love to take a look and see what might be going wrong. It might just be a character that I need to URL encode or something. And if you want to try to narrow it down, maybe try a blank swing and just test exporting with your HTML, JS and CSS separately? Since I'm guessing the issue is with just one of your files.
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950529153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHPZSBIP77I7YG4BWLL3YUE3KBAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGUZDSMJVGM . You are receiving this because you authored the thread.Message ID: @.***>
I've narrowed it down to " " It works if I don't include those non-breaking space markers.
On Sat, Feb 17, 2024 at 3:25 PM Matthew Head @.***> wrote:
I've been going thru and adding my functions one by one - and of course the last function I have makes it send the bad request. Everything else works as expected - so I'll start debugging. Thanks for being so responsive - I'll let you know how it goes!
On Sat, Feb 17, 2024 at 3:20 PM Jonathan Carter @.***> wrote:
If you're comfortable sharing the code with me, I'd love to take a look and see what might be going wrong. It might just be a character that I need to URL encode or something. And if you want to try to narrow it down, maybe try a blank swing and just test exporting with your HTML, JS and CSS separately? Since I'm guessing the issue is with just one of your files.
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950529153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHPZSBIP77I7YG4BWLL3YUE3KBAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGUZDSMJVGM . You are receiving this because you authored the thread.Message ID: @.***>
Even if the line is commented out, it doesn't seem to want to digest  
On Sat, Feb 17, 2024 at 3:36 PM Matthew Head @.***> wrote:
I've narrowed it down to " " It works if I don't include those non-breaking space markers.
On Sat, Feb 17, 2024 at 3:25 PM Matthew Head @.***> wrote:
I've been going thru and adding my functions one by one - and of course the last function I have makes it send the bad request. Everything else works as expected - so I'll start debugging. Thanks for being so responsive - I'll let you know how it goes!
On Sat, Feb 17, 2024 at 3:20 PM Jonathan Carter @.***> wrote:
If you're comfortable sharing the code with me, I'd love to take a look and see what might be going wrong. It might just be a character that I need to URL encode or something. And if you want to try to narrow it down, maybe try a blank swing and just test exporting with your HTML, JS and CSS separately? Since I'm guessing the issue is with just one of your files.
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1950529153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHPZSBIP77I7YG4BWLL3YUE3KBAVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGUZDSMJVGM . You are receiving this because you authored the thread.Message ID: @.***>
Alright great, thanks for narrowing it down. I've got a fix and can publish an update later this evening.
This is fixed in 0.0.23, so if you update from the marketplace, you should be good to go. Thanks!
Awesome, thanks for the update!
On Sun, Mar 3, 2024 at 11:34 AM Jonathan Carter @.***> wrote:
This is fixed in 0.0.23, so if you update from the marketplace, you should be good to go. Thanks!
— Reply to this email directly, view it on GitHub https://github.com/lostintangent/codeswing/issues/88#issuecomment-1975273907, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQHP2MMJS4ELIXDP7WT7LYWN3N7AVCNFSM6AAAAABDNSL4Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGI3TGOJQG4 . You are receiving this because you authored the thread.Message ID: @.***>
When I try to "Export to CodePen" - my browser opens up to "https://codepen.io/pen/define" and the window just has the text "Bad Request".
Do I have to configure codeswing to use my codepen account or something for this to work?