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

Emmet: Wrap with abbreviation in jsx not producing className #67098

Closed
wenfangdu opened this issue Jan 25, 2019 · 9 comments · Fixed by #68326
Closed

Emmet: Wrap with abbreviation in jsx not producing className #67098

wenfangdu opened this issue Jan 25, 2019 · 9 comments · Fixed by #68326
Assignees
Labels
emmet Emmet related issues feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@wenfangdu
Copy link
Contributor

Version: 1.30.2 (user setup)
Commit: 61122f8
Date: 2019-01-07T22:54:13.295Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.17134

Should produce className not class
Steps to Reproduce:
vscbug2

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Jan 25, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the emmet Emmet related issues label Jan 25, 2019
@octref octref added the feature-request Request for new features or functionality label Jan 25, 2019
@octref octref added this to the Backlog milestone Jan 25, 2019
@octref
Copy link
Contributor

octref commented Jan 25, 2019

Context here is React actually uses className instead of class.

@Vinnl
Copy link

Vinnl commented Jan 29, 2019

Note that it did support this behaviour before, and regular Emmet expansions in JSX files do generate className instead of class. In other words: it does look more like a bug than a feature request to me.

(Not sure how much it matters, but just mentioning it to be sure.)

@octref octref added bug Issue identified by VS Code Team member as probable bug feature-request Request for new features or functionality and removed feature-request Request for new features or functionality bug Issue identified by VS Code Team member as probable bug labels Jan 29, 2019
@octref
Copy link
Contributor

octref commented Jan 29, 2019

I see the problem — completion expands to className, but wrapping doesn't.

@burtek
Copy link

burtek commented Feb 6, 2019

Any progress on that? @octref

@octref
Copy link
Contributor

octref commented Feb 6, 2019

Contribution welcome, otherwise I'll get to this when I have time: https://github.com/Microsoft/vscode/blob/master/extensions/emmet/src/abbreviationActions.ts#L33-L35

@octref octref added help wanted Issues identified as good community contribution opportunities good first issue Issues identified as good for first-time contributors labels Feb 6, 2019
@ramya-rao-a
Copy link
Contributor

The link @octref shared is the right place to start for the Wrap with abbreviation feature.

https://github.com/Microsoft/vscode/blob/master/extensions/emmet/src/abbreviationActions.ts#L582 is where one should set a breakpoint to see what is the syntax being returned from the getExpandOptions call. The syntax property should jsx here for emmet to use className and not class

@mattkwiecien
Copy link
Contributor

@ramya-rao-a I'd love to tackle this one if you don't mind.

@mattkwiecien
Copy link
Contributor

@octref Solved and in open PR #68326

@octref octref modified the milestones: Backlog, February 2019 Feb 13, 2019
@octref octref added the verification-needed Verification of issue is requested label Feb 13, 2019
@mjbvz mjbvz added the verified Verification succeeded label Feb 25, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
emmet Emmet related issues feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
7 participants