wix-incubator / vscode-glean

The extension provides refactoring tools for your React codebase
MIT License
1.46k stars 56 forks source link

Why can't I export this component? #120

Closed njoppi2 closed 3 years ago

njoppi2 commented 3 years ago

Screenshot from 2020-09-26 12-59-00

For some weird reason the options to extract this component ↑ don't show up when I click the light bulb. However, if I select this component ↓, then the option shows up, why is that?

Screenshot from 2020-09-26 13-02-10

borislit commented 3 years ago

@njoppi2 thanks for the issue! Sorry for late response. Been away for a while. Can you pls paste the code snippet that causes the issues?

njoppi2 commented 3 years ago

No problem, just to clarify a little more, the only options that appear to me when I select this text is "Extract to constant in enclosing scope" and "Extract to function in module scope" Here's the select text that didn't work:

          <PriceEditingContainer>
            <ButtonContainer>
              <Button kind="available" onClick={() => exportConnectorsPrice(user?.authToken)} visual="secondary" grayBorder={true} textSize={12}><DownArrow />Download da planilha</Button>
            </ButtonContainer>
            <ButtonContainer>
              <Button kind="available" visual="primary" onClick={() => {}} grayBorder textSize={12}>
                <UpArrow />Upload da planilha
                <HiddenInput
                  onChange={({ target: { validity, files } }) =>
                    validity.valid && files && setSheetFile(files[0])
                  }
                />
              </Button>
            </ButtonContainer>
          </PriceEditingContainer>
lauridskern commented 3 years ago

I have the same issue

borislit commented 3 years ago

:tada: This issue has been resolved in version 5.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: