microsoft / microsoft/TypeScript

Rename symbol on a HTML tag inside of JSX globally renames all tags

Open
#7,458 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: JSX/TSX Experience Enhancement Suggestion VS Code Tracked
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

From @xirzec on March 9, 2016 22:24

  1. Open a project that uses TypeScript + JSX (with react.d.ts loaded)
  2. Put the cursor over a common HTML tag like <div>
  3. Hit F2 to rename symbol
  4. Rename the div to something else (like span)

Expected: Just the matching open/close is renamed to <span>
Actual: Every div in every JSX file is now a span and even react.d.ts has had its div attribute in the HTML tag names renamed to span

VS Code version: 0.10.10

Copied from original issue: Microsoft/vscode#3937

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the four-step JSX rename scenario first, using a project with react.d.ts loaded. Then trace the JSX rename handling and verify completion by checking that only the matching opening and closing tags change, while other JSX files and react.d.ts remain untouched.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
compilers, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.