Fix description line breaks and disabled-field readability

Ticket descriptions are plain text — renderDescriptionView() now always
uses nl2br instead of parseMarkdown(), preventing markdown from mangling
single newlines into run-on paragraphs.

Override base.css opacity:0.45 on disabled .editable-metadata selects
(Priority, Category, Type) so they remain legible at full contrast on
dark/OLED screens in read mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 19:36:10 -04:00
parent 1d721eecb4
commit 72d5061867
2 changed files with 12 additions and 2 deletions
+11
View File
@@ -284,3 +284,14 @@ kbd {
margin-bottom: 0.6rem;
}
.ticket-description-view p:last-child { margin-bottom: 0; }
/* ── Disabled metadata selects (read mode) ───────────────────── */
/* base.css sets opacity:0.45 on :disabled — override for read- */
/* only display fields so they remain legible on dark/OLED screens */
.editable-metadata:disabled,
.editable-metadata[disabled] {
opacity: 1;
color: var(--text-secondary, #7fa3bf);
cursor: default;
pointer-events: none;
}
+1 -2
View File
@@ -88,9 +88,8 @@ function renderDescriptionView() {
var raw = textarea.value || '';
if (!raw.trim()) {
viewDiv.innerHTML = '<p class="lt-text-muted lt-text-sm"><em>No description provided.</em></p>';
} else if (typeof parseMarkdown === 'function') {
viewDiv.innerHTML = parseMarkdown(raw);
} else {
// Ticket descriptions are plain text — preserve line breaks, never run markdown.
viewDiv.innerHTML = lt.escHtml(raw).replace(/\n/g, '<br>');
}
}