Reader: visible text selection in every theme; highlights follow across translations
Build and Push Docker Image / build-and-push (push) Failing after 19s
Build and Push Docker Image / build-and-push (push) Failing after 19s
Selection - Selected text uses a per-theme colour (it was nearly invisible on Dark) - The colour picker also appears on touch screens after dragging the selection handles, and sits below the selection there so the system menu doesn't cover it Highlights - Each highlight remembers its translation and whether it covers the whole verse - In another translation the same words are found again (ignoring case and punctuation); whole-verse highlights cover the whole verse; when the wording differs, the verse gets a small colour dot instead of marking the wrong words - Older highlights are checked against their saved words instead of trusted - Server keeps the new fields Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aabd4267b8
commit
a0971eab29
9 files changed
+189
-38
No files matched your search
@@ -58,3 +58,15 @@ test('the database keeps one row per user and updatedAt only moves forward', asy
|
||||
expect(saved.highlights).toHaveLength(1);
|
||||
expect(db.getReaderMarks('u2').updatedAt).toBe(0); // other users are untouched
|
||||
});
|
||||
|
||||
test('a highlight keeps the translation it was made in and whether it covers the whole verse', async () => {
|
||||
const { cleanMarks } = await import('./readerMarks.js');
|
||||
const base = { id: 'a', book: 'JHN', chapter: 3, verse: 16, startOffset: 0, endOffset: 40, color: '#fef08a', text: 'For God so loved' };
|
||||
const out = cleanMarks({ highlights: [
|
||||
{ ...base, translation: 'BSB', whole: true },
|
||||
{ ...base, id: 'b', translation: 'not a code!!', whole: 'yes' },
|
||||
] }).highlights;
|
||||
expect(out[0]).toMatchObject({ translation: 'BSB', whole: true });
|
||||
expect(out[1].translation).toBeUndefined();
|
||||
expect(out[1].whole).toBeUndefined();
|
||||
});
|
||||
Reference in new issue
Block a user