Fix crash inside JSX Closing tag#6006
Conversation
There was a problem hiding this comment.
What does "all" mean? Something is getting filtered out and this parameter name doesn't convey it well
There was a problem hiding this comment.
I agree on naming. not sure what is the best name. What I try to convey is that the boolen control whether you will add all global symbols from all the files into the completions list or not. This doesn't make sense for JSX opening tag
|
After some though, I've realized that this sort of thing is potentially obstructive to the way that users might write code. For instance, let's say I have var x =
<div>
<span>
</Let's say I'm actually simply intent on closing my I think you should consider giving completions for all containing open tags who don't have an appropriate corresponding closing tag. That means that for: <div>
<span>
<a>
</ span
</ div>It might be the case that the We should discuss this a bit tomorrow. |
This seems like an odd state to be in. @bowdenk7 - Maybe we can get some people writing JSX in our next usability study so we can see what order people actually go in. That could be very informative. |
|
@DanielRosenwasser yes. I don't think I got what you trying to say in the last part of the comment Also to clarify, this behavior is only when you don't have react.d.ts. |
|
We only show the closing tag element when you don't have a valid JSX namespace? That seems fine then. I'm mainly trying to avoid a scenario where you have someone with extremely weird typing habits (like myself) where they end up fighting the editor. |
|
@DanielRosenwasser yep, this behavior is only trigger when we don't have valid JSX name. |
Conflicts: src/services/services.ts
|
@DanielRosenwasser @RyanCavanaugh @sandersn Any more comments? |
|
We're exposing this in our API, so we should discuss this with @mhegazy in a meeting, but other than that 👍 |
|
👍 |
Fix issue #5953 by giving its associated opening tag. Initially, the PR tried to address preventing adding the global symbols that is not in jSX into the opening tag. However, doing so cause some inconsistent so the change is rolled back.