main ← fix-support-local-dates-in-poll-options
merged 12:30PM - 18 Dec 25 UTC
This change enables local dates to render properly in poll options and improves …how dates are displayed in the rich editor.
What changed:
- Rich editor now displays localized, human-friendly dates (e.g., "Today at 2:30 PM") instead of raw date strings ("2021-01-01 12:00:00") by using LocalDateBuilder
- Poll options can now include local dates that are properly decorated and interactive
- Added keyboard shortcut (Cmd/Ctrl+Shift+.) to insert current date markup in poll option inputs
- Extracted reusable utilities: formatLocalDate for rendering and generateCurrentDateMarkup for BBCode generation
How it works:
- New NULL_HELPER export in decorated-html provides a null-safe helper object for contexts without a post/model, allowing HTML decorators to work in poll options
- New Ember modifiers (decorate-cooked-content, decorate-poll-option) apply decorators to poll content
- Tests updated to verify data attributes rather than text content, since formatted dates vary by timezone
Internal ref - t/155024
**BEFORE/AFTER (markdown editor)**
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 22" src="https://github.com/user-attachments/assets/ff9fbb2b-0f1b-41b7-b0fc-b59c73ed4e32" />
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 42" src="https://github.com/user-attachments/assets/6b07beab-e864-4319-b97b-fe7abe2180e6" />
**BEFORE/AFTER (rich text editor)**
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 12 00 05" src="https://github.com/user-attachments/assets/0f0e1a4b-0829-4e0e-94ac-90f16c4e52d5" />
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 52" src="https://github.com/user-attachments/assets/d8db2e7a-c110-41bd-9fbf-b4af0f5de2c5" />