VSCodeVim / VSCodeVim/Vim

vim-surround: changing/deleting a shorthand React Fragment tag doesn't do anything

Open
#4,561 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
Trying to modify a React Fragment shorthand tag using dst or cst results in nothing changing (after being prompted in the case of cst).

To Reproduce
Example code:

function SurroundTest() {
  return (
    <>
      Fragment {/* `dst` and `cst` don't work here, but `yst` does */}

      <div>
        Div {/* `dst` and `cst` do work here */}
      </div>
    </>
  )
}

Expected behavior
The Fragment tag should be deleted in the case of dst and modified in the case of cst.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.12.4
  • VSCode version: 1.42.1
  • OS Version: Windows_NT x64 10.0.19041

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

No source files or tests are named. Reproduce the JSX example in VSCode and trace the vim-surround handling for React Fragment shorthand with dst, cst, and yst. Done means dst deletes the Fragment tag and cst replaces it, while existing element-tag behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.