Skip to content

Commit

Permalink
fix: layout overflowing in case of long unbroken lines
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jun 30, 2021
1 parent 720946e commit 4d4f15c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/JSONEditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
position: relative;
display: flex;
flex-direction: row;
overflow: hidden;

&.focus {
box-shadow: $outline-shadow;
Expand Down
1 change: 1 addition & 0 deletions src/components/modes/treemode/TreeMode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
flex-direction: column;
position: relative;
background: $white;
overflow: hidden;

&:not(.visible) {
visibility: hidden;
Expand Down
18 changes: 9 additions & 9 deletions tools/develop-svelte/src/DevelopApp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
{
"<button onclick=alert('oopsie!!!')>test xss</button>": "xss?"
}
]
],
"long line": "longline".repeat(20) // TODO: neatly handle long lines without breaking spaces
}
const schema = {
Expand Down Expand Up @@ -165,10 +166,10 @@
<div class="left">
<p>
<label>
<input type="checkbox" bind:checked={$showTreeEditor} /> Show tree editor
<input type="checkbox" bind:checked={$showTreeEditor} /> Show tree editor
</label>
</p>
<div class="editor" style="height: {height}">
<div class="tree-editor" style="height: {height}">
{#if $showTreeEditor}
<JSONEditor
bind:text
Expand Down Expand Up @@ -244,21 +245,20 @@
.columns {
display: flex;
gap: 20px;
width: 100%;
max-width: 1200px;
}
.columns .left,
.columns .right {
flex: 1;
min-width: 0;
}
/*.editor {*/
/* max-width: 800px;*/
/* height: 400px;*/
/*}*/
.tree-editor {
}
.code-editor {
max-width: 800px;
/*height: 400px;*/
}
.data {
Expand Down

0 comments on commit 4d4f15c

Please sign in to comment.