From 695aff9112baaf75b5ca01f356abba1438b8d2bf Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Sat, 16 May 2020 15:13:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=86=20Text=20selection=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- assets/editor.js | 2 +- assets/feedback.js | 9 +++++---- assets/light.css | 13 +++++++------ assets/treeview.css | 6 +++--- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index df6b4ec8be..5f6b7fb160 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ In the example below, changing the parameter `A` and running the first cell will
### HTML interaction -Lastly, here's _**one more feature**_: Pluto notebooks have a `@bind` macro to create a **live bond between an HTML object and a Julia variable**. Combined with reactivity, this is a very powerful feature! +Lastly, here's _**one more feature**_: Pluto notebooks have a `@bind` macro to create a **live bond between an HTML object and a Julia variable**. Combined with reactivity, this is a very powerful tool! @bind macro screencap @@ -71,7 +71,7 @@ julia> ] (v1.0) pkg> add Pluto ``` -_Adding the first package to Julia can take up to 30 minutes - hang in there!_ +_Using the package manager for the first time can take up to 15 minutes - hang in there!_ To run the notebook server: ```julia diff --git a/assets/editor.js b/assets/editor.js index fcb705ea4a..3249aebf94 100644 --- a/assets/editor.js +++ b/assets/editor.js @@ -141,7 +141,7 @@ function createCodeMirrorInsideCell(cellNode, code) { cm.on("blur", (cm, e) => { if (document.hasFocus()) { - cm.setSelection({ line: 0, ch: 0 }) + cm.setSelection({ line: 0, ch: 0 }, { line: 0, ch: 0 }, {scroll: false}) if (!cellNode.classList.contains("code-differs") && cellNode.remoteCode == "") { requestDeleteRemoteCell(cellNode.id) } diff --git a/assets/feedback.js b/assets/feedback.js index 8ba1ebd541..c61b07c85e 100644 --- a/assets/feedback.js +++ b/assets/feedback.js @@ -134,13 +134,14 @@ setTimeout(() => { }), 5000) .then(function () { message = "Submitted. Thank you for your feedback! 💕" - console.log(message); - alert(message); + console.log(message) + alert(message) + feedbackform.querySelector("#opinion").value = "" }) .catch(function (error) { message = "Whoops, failed to send feedback 😢\nWe would really like to hear from you! Please got to https://github.com/fonsp/Pluto.jl/issues to report this failure:\n\n" - console.error(message); - console.error(error); + console.error(message) + console.error(error) alert(message + error) }) diff --git a/assets/light.css b/assets/light.css index 2524d2dfe1..08f1e12745 100644 --- a/assets/light.css +++ b/assets/light.css @@ -159,6 +159,7 @@ cell:hover>celloutput>div::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .15); } +cell.error > celloutput > div > pre, cell.inline-output>celloutput>div>pre { margin: 0px; display: flex; @@ -456,14 +457,14 @@ cell.running>trafficlight { background: repeating-linear-gradient( -45deg, hsla(20, 20%, 80%, 1), hsla(20, 20%, 80%, 1) 8px, hsla(20, 20%, 80%, .1) 8px, hsla(20, 20%, 80%, .1) 16px) !important; background-size: 4px 22.62741699797px; /* 16 * sqrt(2) */ - animation: 2s linear 0s infinite running scrollbackground; + animation: 2000s linear 0s infinite running scrollbackground; } cell.running.error>trafficlight { background: repeating-linear-gradient( -45deg, hsl(0, 100%, 71%), hsl(0, 100%, 71%) 8px, hsla(12, 71%, 47%, 0.33) 8px, hsla(12, 71%, 47%, 0.33) 16px) !important; background-size: 4px 22.62741699797px; /* 16 * sqrt(2) */ - animation: 2s linear 0s infinite running scrollbackground; + animation: 2000s linear 0s infinite running scrollbackground; } @keyframes scrollbackground { @@ -471,7 +472,7 @@ cell.running.error>trafficlight { background-position-y: 0px; } 100% { - background-position-y: 22.62741699797px; + background-position-y: 22627.41699797px; /* 16 * sqrt(2) */ } } @@ -542,19 +543,19 @@ Based on "Paraíso (Light)" by Jan T. Sott: } .cm-s-default div.CodeMirror-selected { - background: #b9b6b0; + background: #d9dfef; } .cm-s-default .CodeMirror-line::selection, .cm-s-default .CodeMirror-line>span::selection, .cm-s-default .CodeMirror-line>span>span::selection { - background: #b9b6b0; + background: #d9dfef; } .cm-s-default .CodeMirror-line::-moz-selection, .cm-s-default .CodeMirror-line>span::-moz-selection, .cm-s-default .CodeMirror-line>span>span::-moz-selection { - background: #b9b6b0; + background: #d9dfef; } .cm-s-default .CodeMirror-gutters { diff --git a/assets/treeview.css b/assets/treeview.css index e43c1cfd03..63b3b63769 100644 --- a/assets/treeview.css +++ b/assets/treeview.css @@ -15,11 +15,11 @@ jltree { jltree::before { display: inline-block; - content: " "; - background-size: 1em 1em; + content: ""; + background-size: 100%; height: 1em; width: 1em; - background-position-y: .2em; + margin-bottom: -.1em; opacity: .5; cursor: pointer; background-image: url(https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.0.0/src/svg/caret-down-outline.svg);