Skip to content

Comments

Add translation history UI for Translation Tab#905

Closed
mircealungu wants to merge 4 commits intomasterfrom
feature/translation-history
Closed

Add translation history UI for Translation Tab#905
mircealungu wants to merge 4 commits intomasterfrom
feature/translation-history

Conversation

@mircealungu
Copy link
Member

Summary

  • Add getTranslationHistory() API method
  • Implement TranslateHistory component showing recent searches with timestamps
  • Update Translate component to handle navigation from history (auto-search)
  • Clicking a history item navigates back and triggers search for that word

Dependencies

Requires API PR: zeeguu/api#490

Test plan

  • Navigate to /translate/history, verify list shows recent searches
  • Click a history item, verify it navigates to /translate and searches
  • Verify empty state shows when no history exists

🤖 Generated with Claude Code

- Add getTranslationHistory() API method
- Implement TranslateHistory component showing recent searches
- Update Translate component to handle navigation from history
- Clicking history items triggers search for that word

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
🔨 Latest commit 112dc34
🔍 Latest deploy log https://app.netlify.com/projects/voluble-nougat-015dd1/deploys/6994bc8923de480008e414e3
😎 Deploy Preview https://deploy-preview-905--voluble-nougat-015dd1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

mircealungu and others added 3 commits February 17, 2026 19:21
- Extract res.data from apiGet response in getTranslationHistory
- Add eslint-disable for intentional empty deps array in useEffect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract search logic into performSearch(word) function
- Call performSearch directly from history navigation useEffect
- Remove formRef since form submission is no longer needed for auto-search

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use formatDistanceToNow from date-fns instead of custom formatTimeAgo
- Reuse styles from Translate.sc.js (TranslationCard, NoResults, etc.)
- Reduced from 173 to 93 lines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mircealungu
Copy link
Member Author

Superseded by #907 (simplified approach without meaning_id)

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.

1 participant