-
Notifications
You must be signed in to change notification settings - Fork 183
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
code block will not collapse if using optional chaining WITH backtick literals #212
Comments
@DarylBerryhill Thanks for reporting the issue. Can you check if the issue is reproducible in https://phcode.dev/ It looks like it should be fixed once phoenix migration is complete in brackets. |
Chrome wont let me into that website.Briefly it gives the error message phcode.dev normally uses encryption to protect your information. When Chrome tried to connect to phcode.dev this time, the website sent back unusual and incorrect credentials...... |
That is quite strange. Does it happen in other browsers too? |
yes, Microsoft Edge Version 103.0.1264.62 (Official build) (64-bit) gives the same error. To be complete here is the full complete error message. _Your connection isn't private You can't visit phcode.dev right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later._ |
The main issue looks fixed in phcode.dev. so it will be fixed with Phoenix/Brackets 3.0 release Will investigate the the https issue. We host our site in GitHub Pages, so im not sure how the https issue occurs but would help us to decode the issue if we know more of the network details (Like is this on a work network/ public network). |
strangely the website seems to be working now in both chrome and edge. I am connecting from my work MaxVision domain. When I get home I'll try it using Starlink internet. Also tried the website using my phone over 5G using Chrome V103. It does come up pretty quick. A popup says browser not supported. Switching Chrome settings to desktop mode, still using the phone, phcode.dev comes up quickly without error. I don't think its intended to be used on a phone but maybe on a tablet would be useful for quick edits. Personally I'm lost without a triple display. |
Thanks for the update. It is most likely a transient network issue with corp firewall. Phoenix is in development right now, hopefully will be released by October. The unsupported dialogue can be dismissed in mobiles/tablets for now, it is just that tablet browsers dont yet allow opening local folders for edits. But a cloud based version for quick edits could be something we will look at in the future. |
**** Possible Solution ****This temporary fix that user @tkutlic commented in Github Brackets issue #107 seems to fix the code collapsing problem.
|
Description
the use of Optional Chaining operator '?' AND backtick literals causes code blocks unable to collapse. No down arrow to the right of line number. The affecting code block is orange color. Commenting out EITHER enables code block collapsing again.
Code snippet
`
// code block will not collapse if using optional chaining WITH backtick literals
// the use of Optional Chaining operator '?' AND backtick literals causes code blocks unable to collapse
// commenting out EITHER enables code block collapsing again.
let arr = [" one ", " two "];
// removing the option chaining operator '?' enables block collapsing
// we are using option chaining in case 'arr' length is less than 2 elements
let str = arr[1]?.trim();
// by using the backtick literal strings AND optional chaining above,
// prevents ALL code blocks below not to collapse
console.log(`value is: ${str} `);
// this code block doesn't collapse
if (1)
{
console.log( " this code block wont collapse");
}
// The class code block won't collapse
// in addition, the color syntax is not correct. This was mentioned in Bracket github issue #201
class test
{
static testProp = 0;
static testMethod() {}
}
`
Steps to Reproduce
Expected behavior:
The IF code block and CLASS code block should collapse using the down arrow to the right of the line number.
Actual behavior:
there is no down arrow when BOTH optional chaining AND backtick literals are present. The code is orange
Versions
OS: Windows 10 x64 10.0.19044 21H2 build 19044.1826
Brackets version:
Release 2.1 build 2.1.2-17937 (master 167640b)
build timestamp: Wed Jul 06 2022 18:43:26 GMT+0530
The text was updated successfully, but these errors were encountered: