fix: description unreadable in dark mode / OLED — swap disabled textarea for lt-markdown div

Root cause: disabled textarea gets opacity:0.45 + color:var(--text-muted) from
base.css, making it near-invisible on OLED (true-black background).

Fix:
- TicketView: add #ticketDescriptionView (div.lt-markdown) alongside the textarea;
  textarea is now hidden by default (style="display:none"), view div is shown
- ticket.js: renderDescriptionView() renders raw text via parseMarkdown() or nl2br;
  showDescriptionView() / showDescriptionEdit() swap between them;
  toggleEditMode() calls showDescriptionEdit() when entering edit, and
  renderDescriptionView() + showDescriptionView() when returning to read mode
- ticket.css: .ticket-description-view sets full-contrast text-primary/secondary
  colors, min-height, and line-height for comfortable reading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 18:10:39 -04:00
parent cfb88d9c88
commit 1d721eecb4
3 changed files with 63 additions and 3 deletions
+7 -1
View File
@@ -320,12 +320,18 @@ include __DIR__ . '/layout_header.php';
<div class="lt-section-body">
<div class="lt-form-group">
<label class="lt-sr-only lt-label" for="ticketDescription">Description</label>
<!-- Read view: shown when not editing — uses lt-markdown for readable typography -->
<div id="ticketDescriptionView"
class="lt-markdown ticket-description-view"
aria-label="Ticket description"></div>
<!-- Edit view: shown only when editing -->
<textarea id="ticketDescription"
class="lt-input lt-textarea editable"
data-field="description"
disabled
rows="18"
aria-label="Ticket description"><?= htmlspecialchars($ticket['description'] ?? '') ?></textarea>
style="display:none"
aria-label="Ticket description (edit)"><?= htmlspecialchars($ticket['description'] ?? '') ?></textarea>
</div>
</div>
</div>