Files
crosspoint-reader-mod/chat-summaries/2026-02-20_17-32-summary.md
cottongin dfbc931c14 mod: Phase 1 - bring forward mod-exclusive files with ActivityManager migration
Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch:

Activities (migrated to new ActivityManager pattern):
- Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity
- Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity,
  DictionaryWordSelectActivity, LookedUpWordsActivity
- Bookmark: EpubReaderBookmarkSelectionActivity
- Book management: BookManageMenuActivity, EndOfBookMenuActivity
- OPDS: OpdsServerListActivity, OpdsSettingsActivity
- Utility: DirectoryPickerActivity, NumericStepperActivity

Utilities (unchanged):
- BookManager, BookSettings, BookmarkStore, BootNtpSync
- Dictionary, LookupHistory, TimeSync, OpdsServerStore

Libraries: PlaceholderCover, TableData, ChapterXPathIndexer
Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover
Docs: KOReader sync XPath mapping

Migration changes:
- ActivityWithSubactivity -> Activity base class
- Callback constructors -> finish()/setResult() pattern
- enterNewActivity() -> startActivityForResult()
- Activity::RenderLock&& -> RenderLock&&

These files won't compile yet - they reference mod settings and I18n
strings that will be added in subsequent phases.

Made-with: Cursor
2026-03-07 15:10:00 -05:00

30 lines
1.4 KiB
Markdown

# Fix Text Wrapping and Spacing for Expanded Selected Row
## Task
Improve the expandable selected row feature (from PR #1019 enhancement). Two issues were identified from device testing:
1. Character-level wrapping broke words mid-character (e.g., "Preside / nt"), resulting in unnatural line breaks.
2. Poor vertical spacing -- text lines clustered near the top of the expanded highlight area with large empty space at the bottom.
## Changes Made
### `src/components/themes/BaseTheme.cpp`
- Rewrote `wrapTextToLines` with 3-tier break logic:
1. Preferred delimiters: " -- ", " - ", en-dash, em-dash (breaks at last occurrence to maximize line 1)
2. Word boundaries: last space or hyphen that fits
3. Character-level fallback for long unbroken tokens
- Extracted `truncateWithEllipsis` helper to reduce duplication
- Fixed expanded row rendering: text lines vertically centered in 2x row height area, extension baseline-aligned with last text line
### `src/components/themes/lyra/LyraTheme.cpp`
- Same `wrapTextToLines` rewrite and `truncateWithEllipsis` helper
- Same vertical centering for expanded row text lines
- Icon also vertically centered in expanded area
- Extension baseline-aligned with last text line instead of fixed offset
### `mod/prs/MERGED.md`
- Updated PR #1019 mod enhancement section to reflect the new wrapping strategy and spacing improvements
## Follow-up Items
- Device testing to verify improved wrapping and spacing visually