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

Add inline syntax errors to website editor #11094

Closed
gaearon opened this issue Oct 4, 2017 · 6 comments
Closed

Add inline syntax errors to website editor #11094

gaearon opened this issue Oct 4, 2017 · 6 comments

Comments

@gaearon
Copy link
Collaborator

gaearon commented Oct 4, 2017

@tsriram suggested a proof of concept in

I like that. I wonder if we can do it with the new editor.

@bvaughn
Copy link
Contributor

bvaughn commented Oct 4, 2017

We use the LiveEditor from FormidableLabs/react-live for the left hand side of the new editor, so we'd need to either re-implement this component ourselves (not ideal) or add this functionality upstream. Not sure if they'd be interested in the latter, given they already have a LiveError component.

cc @philpl for thoughts 😄

@kitten
Copy link

kitten commented Oct 5, 2017

@bvaughn I’d be super up for it! 😲

The biggest conflict I see is with adding custom transpilers. The implementation of this feature might vary slightly depending on what transpiler is used unfortunately 🤐

Also the site is currently using a fully custom transpiler on top of Babel-standalone.

But once we reconcile these problems, I’m sure it’s not too hard to add

@bvaughn
Copy link
Contributor

bvaughn commented Oct 5, 2017

Maybe there's a custom format we could define that would enable the user to inject error messages with a row and (optional) column number that would be sufficiently compiler-agnostic?

type compilationErrors = Array<{
  message: string,
  rowNumber: number,
  columnNumber?: number
}>

@kitten
Copy link

kitten commented Oct 5, 2017

@bvaughn that'd be great! Could just be added to the Editor without much effort.

Not sure how soon I'll have time for this. Do you mind copying this issue with the suggested API over into an issue on react-live please? :)

@bvaughn
Copy link
Contributor

bvaughn commented Oct 6, 2017

You got it! FormidableLabs/react-live/issues/41

@bvaughn
Copy link
Contributor

bvaughn commented Oct 6, 2017

Moved to reactjs/react.dev/issues/10

@bvaughn bvaughn closed this as completed Oct 6, 2017
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

3 participants