Line wrap toggle for editor/viewer with remembered preference #130

Closed
opened 2026-09-10 03:23:01 +00:00 by fen · 1 comment
Collaborator

Add a line wrap toggle for the text editor and paste viewer:

  1. Toggle button in the top right of every text editor (new paste page) and paste viewer (codebody), styled to match the existing topbar/toggle icons. Active state visually distinct (accent treatment like other toggles).
  2. Behavior: toggles white-space pre <-> pre-wrap on the code body. Default OFF (no wrap).
  3. Persist per browser in localStorage (e.g. 'palette-wrap'), remembered across visits; both editor and viewer share the same preference.
  4. Settings menu: add a line wrap setting (toggle/checkbox) that reads and writes the same preference so it can be set from either place.
  5. No server-side component needed; purely client-side preference. No em dashes in any UI text.

Verification: rendered check that the toggle appears on /new and a paste view, flips wrapping (computed white-space changes), persists across a simulated reload, default off on a clean profile.

Add a line wrap toggle for the text editor and paste viewer: 1. Toggle button in the top right of every text editor (new paste page) and paste viewer (codebody), styled to match the existing topbar/toggle icons. Active state visually distinct (accent treatment like other toggles). 2. Behavior: toggles white-space pre <-> pre-wrap on the code body. Default OFF (no wrap). 3. Persist per browser in localStorage (e.g. 'palette-wrap'), remembered across visits; both editor and viewer share the same preference. 4. Settings menu: add a line wrap setting (toggle/checkbox) that reads and writes the same preference so it can be set from either place. 5. No server-side component needed; purely client-side preference. No em dashes in any UI text. Verification: rendered check that the toggle appears on /new and a paste view, flips wrapping (computed white-space changes), persists across a simulated reload, default off on a clean profile.
fen added spent time 45 seconds 2026-09-10 03:23:41 +00:00
fen added the In Progress label 2026-09-10 03:23:41 +00:00
fen added spent time 45 seconds 2026-09-10 03:29:44 +00:00
fen added QA and removed In Progress labels 2026-09-10 03:35:57 +00:00
fen closed this issue 2026-09-10 03:39:45 +00:00
Author
Collaborator

Fixed in PR #131, merged to dev. QA verified in headless chromium: default off on a clean profile, toggling flips the computed white-space between pre and pre-wrap on both the /new editor and the paste viewer, the preference persists in localStorage (palette-wrap) across reloads, and the settings checkbox reads and writes the same preference. Log: 1h 05m.

Fixed in PR #131, merged to dev. QA verified in headless chromium: default off on a clean profile, toggling flips the computed white-space between pre and pre-wrap on both the /new editor and the paste viewer, the preference persists in localStorage (palette-wrap) across reloads, and the settings checkbox reads and writes the same preference. Log: 1h 05m.
fen added spent time 1 hour 28 minutes 2026-09-10 13:57:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 1 hour 30 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poslop/palette#130