FormidableLabs / FormidableLabs/react-live
Support inline compilation errors
- Dominant language
- TypeScript
- Stars
- 4.6k
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
The `LiveError` component is useful for displaying compilation errors. But the `LiveEditor` component could be even more useful if it showed inline errors. For example:
### Current UI

### Potential UI

This support could probably be added in such a way that is not dependent on a specific compiler/toolchain. For example, `LiveEditor` could expose an additional prop `errors` that looked something like this:
```js
type errors = Array<{
message: string,
rowNumber: number,
columnNumber?: number
}>
```
This issue is just being opened for discussion and is a follow-up from facebook/react/issues/11094 and reactjs/reactjs.org/issues/10
Contributor guide
Research direction
Start by locating the LiveEditor and LiveError components and reviewing the linked React and reactjs.org issues for context. Define how the proposed errors prop maps messages to inline positions and confirm the expected UI before implementing; done means LiveEditor can display compiler-independent inline errors with the documented shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100