Skip to content

Feature/implement v2#18

Merged
MaheeGamage merged 2 commits into
mainfrom
feature/implement-v2
Jun 21, 2026
Merged

Feature/implement v2#18
MaheeGamage merged 2 commits into
mainfrom
feature/implement-v2

Conversation

@MaheeGamage

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 21, 2026 19:13
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
finnish-learner Ready Ready Preview, Comment Jun 21, 2026 7:13pm

@MaheeGamage
MaheeGamage merged commit 928197e into main Jun 21, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements “quiz card example sentence” support by reading an optional Example column from the user’s Google Sheet and rendering it under the revealed answer, while refactoring the Reader’s interactive translation surface into a reusable TranslatableText component so the quiz can reuse identical hover/touch + selection translation behavior.

Changes:

  • Added KnowledgeItem.example and wired Google Sheets reading of the optional Example column (read-only).
  • Extracted TranslatableText (tokenization + TranslatableWord wiring + selection popup) and refactored the Reader page to use it.
  • Updated the quiz UI to show the example sentence after reveal, with Reader-style translation interactions.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/vocab-test/types.ts Adds example: string | null to the quiz knowledge item model.
src/modules/vocab-test/components/QuizSession.tsx Renders the example sentence under the revealed answer using TranslatableText.
src/modules/vocab-test/adapters/GoogleSheetsKnowledgeRepository.ts Reads the optional Example column from the sheet into KnowledgeItem.
src/modules/reader/index.ts Exports the new TranslatableText component from the reader module API.
src/modules/reader/components/TranslatableText.tsx New reusable interactive-text component (tokenization + hover/touch + selection translation popup).
src/modules/reader/components/SelectionTranslationPopup.tsx Adds configurable scopeSelector for selection scoping.
src/app/page.tsx Refactors Reader view to render via TranslatableText and removes the page-level selection popup.
src/app/api/quiz/result/route.ts Updates the server-side KnowledgeItem construction to include example: null.
.project/tasks/task-012_quiz-card-example.md Documents the task/implementation plan and completion notes for the feature.
.project/overview.md Updates project overview wording about pending tasks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 43 to 45
const lastRaw = String(row[lt] ?? '').trim();
const exampleRaw = ex === undefined ? '' : String(row[ex] ?? '').trim();
return {
Comment on lines +89 to +94
targetLang={targetLang}
translationMode={translationMode}
isInputMode={false}
scopeSelector="[data-translatable-text]"
onTranslated={(range) => onTranslatedRange?.(range)}
onSelectionTranslated={onWordTranslated}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants