Skip to content
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

Bracketed properties completions #42580

Closed
gushuro opened this issue Jan 31, 2018 · 5 comments
Closed

Bracketed properties completions #42580

gushuro opened this issue Jan 31, 2018 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@gushuro
Copy link
Contributor

gushuro commented Jan 31, 2018

Testing #42370

In some cases only the properties without special characters (emojis, whitespaces, etc) show up as suggestions.

Example:

const z = {
    'a': 4,
    'ad ver ti sing ': 3,
    '😁': true,
    ' whitespace': false,
    'hasemoji': '   πŸƒ”    πŸ€±πŸ€΄πŸ‡πŸ€Έ',
    'has white space': true,
    'ending whitespace  ': true,
    321: 4,
    "name": function (arg) {
        this["ending whitespace  "] = false;
        console.log("hello world");
    }
}

When typing z. I've seen the following behaviors, depending on where in the code I'm writing:

  • All the properties show up as suggestions
  • Only the properties that don't need bracket accesors show up. If I start writing one of them, they appear.

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 31, 2018

Do you possibly have multiple definitions of z in your workspace? What happens if you run Go To Definition in on z in the case where you don't get the proper suggestions?

@mjbvz mjbvz added typescript Typescript support issues javascript JavaScript support issues info-needed Issue requires more information from poster labels Jan 31, 2018
@gushuro
Copy link
Contributor Author

gushuro commented Jan 31, 2018

I don't have multiple definitions of z, just one.
If I run Go To Definition, the cursor goes to the definition as expected

const |z = {
...

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 31, 2018

I can't repo this using just the definition. Please share the entire file

@gushuro
Copy link
Contributor Author

gushuro commented Jan 31, 2018

const z = {
    'a': 4,
    'ad ver ti sing ': 3,
    '😁': true,
    ' whitespace': false,
    'hasemoji': '   πŸƒ”    πŸ€±πŸ€΄πŸ‡πŸ€Έ',
    'has white space': true,
    'ending whitespace  ': true,
    321: 4,
    "name": function (arg) {
        this["ending whitespace  "] = false;
        console.log("hello world");
        this["😁"] = false;
    },
    '😎': function () {
        console.log('πŸ˜‡πŸ˜')
    },
    'Γ±Β΄': function () {
        console.log("enie");
    }
};

z['😎']();
let a = z["has white space"];
z["Γ±Β΄"]();

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jan 31, 2018
@mjbvz mjbvz added this to the January 2018 milestone Jan 31, 2018
@mjbvz mjbvz closed this as completed in 454b25c Jan 31, 2018
@gushuro gushuro added the verified Verification succeeded label Feb 1, 2018
@maciejw
Copy link

maciejw commented Feb 10, 2018

can you extend this to TSX/JSX also? with with we will have intellisense on aria-* properties in react.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants