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

Hover on a react prop doesn't always point to the right type #385

Open
bsansouci opened this issue Jan 19, 2020 · 5 comments
Open

Hover on a react prop doesn't always point to the right type #385

bsansouci opened this issue Jan 19, 2020 · 5 comments

Comments

@bsansouci
Copy link
Contributor

Here's a screenshot of what I mean. I'm hovering over paddingBottom inside the call to ReactDOMRe.Style.make and the highlight is wrong and the type is also wrong.

Screen Shot 2020-01-19 at 3 34 46 PM

@MoOx
Copy link
Contributor

MoOx commented Apr 3, 2020

Same kind of problem

image

Here I am trying to hover my c variable and the plugin seems totally lost track of what I want to do.
What triggered me is that an entire jsx block is being highlighted, and it shouldn't be the case.

In other "non-jsx" places, this it totally working as expected. Only the thing I have the cursor on is highlighted

image

I recently started to become annoyed by this when doing a screencast (lol) I was like "now we can see what type is this var" and the effect was no good 😂

Every time I want to tackle something in this repo, I feel so dump. I don't even know how to look at.
Can somebody point me in the right direction to start working on this?

@jaredly? or maybe @anmonteiro - sorry I just looked at top 2 contributors haha

@MoOx
Copy link
Contributor

MoOx commented Apr 3, 2020

I discussed about this with @bloodyowl and he told me that maybe the jsx ppx was the culprit because of some code locations being somehow not correct. Poke @rickyvetter

This is also causing lots of various issue, like cmd+click being broken (always bringing you to react.createElement reason definition) & autocomplete completely lost & broken too.

@cristianoc
Copy link
Contributor

This is likely a question for the JSX ppx. @rickyvetter

@MoOx
Copy link
Contributor

MoOx commented Apr 28, 2020

It seems there is a know issue on react-react reasonml/reason-react#429

@rickyvetter
Copy link

Hey folks. Most recent version of BuckleScript (I believe >7.1.1) has a bunch of PPX changes that will make this better. There are still a couple known problems that I'm working on, if you have specific cases to report please make an issue on https://github.com/reasonml/reason-react and include BuckleScript version and ReasonReact version. This will help greatly in getting a repro and being able to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants