Skip to content

Commit 2bfddf3

Browse files
johann-sonntagbauerCompuIves
authored andcommitted
fix error overlay (#120)
* fix error overlay Error overlay now uses normal flow and inserts an additional line for error information. So no overlay of text and info caret occur any longer. * remove absolutifyCaret all together and add contributor info :)
1 parent e22f48c commit 2bfddf3

File tree

4 files changed

+12
-46
lines changed

4 files changed

+12
-46
lines changed

β€Ž.all-contributorsrcβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@
8080
"contributions": [
8181
"code"
8282
]
83+
},
84+
{
85+
"login": "johann-sonntagbauer",
86+
"name": "Johann Hubert Sonntagbauer",
87+
"avatar_url": "https://avatars3.githubusercontent.com/u/1239401?v=4",
88+
"profile": "https://github.com/johann-sonntagbauer",
89+
"contributions": [
90+
"bug",
91+
"code"
92+
]
8393
}
8494
]
8595
}

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/KE3TbEZ) [![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors) [![Build Status](https://travis-ci.org/CompuIves/codesandbox-client.svg?branch=master)](https://travis-ci.org/CompuIves/codesandbox-client)
1+
# [CodeSandbox](https://codesandbox.io) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/KE3TbEZ) [![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors) [![Build Status](https://travis-ci.org/CompuIves/codesandbox-client.svg?branch=master)](https://travis-ci.org/CompuIves/codesandbox-client)
22

33
An online code editor with a focus on React.
44

@@ -46,6 +46,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
4646
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
4747
| [<img src="https://avatars0.githubusercontent.com/u/587016?v=3" width="100px;"/><br /><sub>Ives van Hoorne</sub>](http://ivesvh.com)<br />[πŸ’¬](#question-CompuIves "Answering Questions") [πŸ“](#blog-CompuIves "Blogposts") [πŸ›](https://github.com/CompuIves/CodeSandbox/issues?q=author%3ACompuIves "Bug reports") [πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=CompuIves "Code") [🎨](#design-CompuIves "Design") [πŸ“–](https://github.com/CompuIves/CodeSandbox/commits?author=CompuIves "Documentation") [πŸ’‘](#example-CompuIves "Examples") [πŸš‡](#infra-CompuIves "Infrastructure (Hosting, Build-Tools, etc)") [πŸ‘€](#review-CompuIves "Reviewed Pull Requests") [⚠️](https://github.com/CompuIves/CodeSandbox/commits?author=CompuIves "Tests") [πŸ”§](#tool-CompuIves "Tools") | [<img src="https://avatars0.githubusercontent.com/u/887639?v=3" width="100px;"/><br /><sub>Donavon West</sub>](http://donavon.com)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=donavon "Code") | [<img src="https://avatars0.githubusercontent.com/u/5266810?v=3" width="100px;"/><br /><sub>Jeff Allen</sub>](http://www.jeffallen.io/)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=vueu "Code") | [<img src="https://avatars0.githubusercontent.com/u/1089897?v=3" width="100px;"/><br /><sub>Ben Gummer</sub>](https://github.com/bengummer)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=bengummer "Code") | [<img src="https://avatars3.githubusercontent.com/u/154732?v=3" width="100px;"/><br /><sub>James Gillmore</sub>](http://twitter.com/faceyspacey)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=faceyspacey "Code") [πŸ›](https://github.com/CompuIves/CodeSandbox/issues?q=author%3Afaceyspacey "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/9636410?v=4" width="100px;"/><br /><sub>Ade Viankakrisna Fadlil</sub>](https://musify.id)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=viankakrisna "Code") | [<img src="https://avatars1.githubusercontent.com/u/1854763?v=4" width="100px;"/><br /><sub>Tushar Sonawane</sub>](https://twitter.com/tushkiz)<br />[πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=Tushkiz "Code") |
4848
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
49+
| [<img src="https://avatars3.githubusercontent.com/u/1239401?v=4" width="100px;"/><br /><sub>Johann Hubert Sonntagbauer</sub>](https://github.com/johann-sonntagbauer)<br />[πŸ›](https://github.com/CompuIves/CodeSandbox/issues?q=author%3Ajohann-sonntagbauer "Bug reports") [πŸ’»](https://github.com/CompuIves/CodeSandbox/commits?author=johann-sonntagbauer "Code") |
4950
<!-- ALL-CONTRIBUTORS-LIST:END -->
5051

5152
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

β€Žsrc/sandbox/react-error-overlay/components/code.jsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/* @flow */
1111
import type { ScriptLine } from '../utils/stack-frame';
1212
import { applyStyles } from '../utils/dom/css';
13-
import { absolutifyCaret } from '../utils/dom/absolutifyCaret';
1413
import {
1514
codeStyle,
1615
primaryErrorStyle,
@@ -68,7 +67,6 @@ function createCode(
6867
const htmlHighlight = generateAnsiHtml(ansiHighlight);
6968
const code = document.createElement('code');
7069
code.innerHTML = htmlHighlight;
71-
absolutifyCaret(code);
7270
applyStyles(code, codeStyle);
7371

7472
const ccn = code.childNodes;

β€Žsrc/sandbox/react-error-overlay/utils/dom/absolutifyCaret.jsβ€Ž

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
Β (0)