From 9afaa3dc60d3754cd96c65dd4840ca2db5770e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Mon, 20 Jul 2026 23:29:50 +0200 Subject: [PATCH] fixes in ux --- static/js/note.js | 2 +- static/js/pad.js | 2 +- static/note.html | 2 +- static/pad.html | 2 +- static/styles.css | 6 ++++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/static/js/note.js b/static/js/note.js index d0c408f..9870591 100644 --- a/static/js/note.js +++ b/static/js/note.js @@ -24,7 +24,7 @@ function renderGutter(){ const lines=editor.value.split("\n"); owners=owners.slice(0,lines.length); while(owners.length{const owner=owners[i]||"";return `
${i+1}
`;}).join(""); + gutter.innerHTML=lines.map((_,i)=>`
${i+1}
`).join(""); const style=getComputedStyle(editor), lineHeight=parseFloat(style.lineHeight)||29, paddingTop=parseFloat(style.paddingTop)||24; ownerLabels.style.setProperty("--editor-line-height",`${lineHeight}px`); ownerLabels.innerHTML=lines.map((_,i)=>{ diff --git a/static/js/pad.js b/static/js/pad.js index 2795573..59022fe 100644 --- a/static/js/pad.js +++ b/static/js/pad.js @@ -24,7 +24,7 @@ function renderGutter(){ const lines=editor.value.split("\n"); owners=owners.slice(0,lines.length); while(owners.length{const owner=owners[i]||"";return `
${i+1}
`;}).join(""); + gutter.innerHTML=lines.map((_,i)=>`
${i+1}
`).join(""); const style=getComputedStyle(editor), lineHeight=parseFloat(style.lineHeight)||29, paddingTop=parseFloat(style.paddingTop)||24; ownerLabels.style.setProperty("--editor-line-height",`${lineHeight}px`); ownerLabels.innerHTML=lines.map((_,i)=>{ diff --git a/static/note.html b/static/note.html index 11fd302..d31ab02 100644 --- a/static/note.html +++ b/static/note.html @@ -1,5 +1,5 @@ __NOTE_TITLE__ · RustPad
__WORKSPACE_TITLE__

__NOTE_TITLE__

Connecting…
-
Editor
Markdown preview
0 characters · 0 words
Changes are saved automatically
+
Editor
Markdown preview
0 characters · 0 words
Changes are saved automatically

What should we call you?

Your name will be shown next to changes and remembered on this device.

Protected workspace

Back
diff --git a/static/pad.html b/static/pad.html index 9c93292..14e6b44 100644 --- a/static/pad.html +++ b/static/pad.html @@ -1,5 +1,5 @@ __PAD_TITLE__ · RustPad
RustPad

__PAD_TITLE__

Connecting…
-
Editor
Markdown preview
0 characters · 0 words
Changes are saved automatically
+
Editor
Markdown preview
0 characters · 0 words
Changes are saved automatically

What should we call you?

Your name will be shown next to changes and remembered on this device.

Protected note

Back
diff --git a/static/styles.css b/static/styles.css index 8463f97..8d444ff 100644 --- a/static/styles.css +++ b/static/styles.css @@ -209,7 +209,7 @@ dialog::backdrop { background: rgba(4,6,9,.82); } /* Collaborative editor additions */ .editor-shell { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 0; overflow: hidden; background: #0d1015; } .line-gutter { width: 62px; overflow: hidden; padding: 24px 8px 24px 0; border-right: 1px solid var(--border); color: var(--muted-2); font: 400 17px/1.72 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; user-select: none; } -.line-gutter div { height: 1.72em; padding-right: 8px; border-right: 3px solid var(--owner, transparent); } +.line-gutter div { height: 1.72em; padding-right: 8px; } .hide-line-numbers .editor-shell { grid-template-columns: 0 minmax(0, 1fr); } .hide-line-numbers .line-gutter { width: 0; padding: 0; border: 0; } .editor-shell textarea { padding-left: 18px; } @@ -276,7 +276,7 @@ dialog::backdrop { background: rgba(4,6,9,.82); } /* Editor display preferences and author overlay */ .editor-shell { position: relative; } .owner-labels { z-index: 4; top: 0; bottom: 0; height: auto; } -.owner-line { position: absolute; right: 0; left: 0; height: var(--editor-line-height, 31px); border-left: 3px solid var(--owner); background: linear-gradient(90deg, color-mix(in srgb, var(--owner) 8%, transparent), transparent 24%); } +.owner-line { position: absolute; right: 0; left: 0; height: var(--editor-line-height, 31px); border-left: 3px solid var(--owner); background: transparent; } .owner-label { z-index: 1; transform: translateY(2px); } .editor-controls { display: inline-flex; align-items: center; gap: 7px; } .editor-controls label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .72rem; } @@ -291,3 +291,5 @@ dialog::backdrop { background: rgba(4,6,9,.82); } .compact-editor textarea, .compact-editor .preview { padding-top: 14px; padding-bottom: 14px; font-size: calc(var(--editor-font-size, 18px) - 2px); line-height: 1.45; } .workspace textarea, .workspace .preview { font-size: var(--editor-font-size, 18px); } @media (max-width: 900px) { .editor-controls { order: 3; width: 100%; } .editor-toolbar { flex-wrap: wrap; } } + +.editor-shell textarea { white-space: pre; overflow: auto; overflow-wrap: normal; word-break: normal; }