Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: suggest words marking (revisited) #346

Closed
wants to merge 2 commits into from

Conversation

noomorph
Copy link
Collaborator

This pull request includes various changes to improve the handling of word types, update dependencies, and refactor code for better performance and readability. The most important changes include adding new dependencies, updating modal and card components to display word type annotations, refactoring data fetching logic, and enhancing the translation data.

Dependencies and Imports:

  • Added new dependencies @eaterable/rowmap and @eaterable/tsv-parser to package.json.
  • Updated imports in multiple files to use the new annotateWordType utility and the new dependencies. [1] [2] [3]

Modal and Card Components:

  • Updated TranslationsModal to use annotateWordType for displaying word type annotations. [1] [2]
  • Updated ResultsCard to use annotateWordType for displaying word type annotations and removed intelligibility issues logic. [1] [2]

Data Fetching and Processing:

  • Refactored fetchCommunityLinks to use @eaterable/rowmap and @eaterable/tsv-parser for parsing TSV data.
  • Refactored loadTablesData to use async/await for better readability and performance.
  • Overhauled getAllDataFromResults to improve data parsing and preprocessing logic.

Translation Data:

  • Added new translation keys for word type annotations in data.json.

Utility Functions:

  • Removed obsolete utility functions getObjFromTable and parseTsvTable. [1] [2] [3]
  • Added and tested the new annotateWordType utility function. [1] [2] [3]

@coveralls
Copy link

coveralls commented Nov 24, 2024

Pull Request Test Coverage Report for Build 11996183855

Details

  • 4 of 64 (6.25%) changed or added relevant lines in 7 files are covered.
  • 25 unchanged lines in 21 files lost coverage.
  • Overall coverage increased (+0.5%) to 6.499%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/wordType/index.ts 0 1 0.0%
src/components/Modals/TranslationsModal/TranslationsModal.tsx 0 2 0.0%
src/components/ResultsCard/ResultsCard.tsx 0 3 0.0%
src/services/fetchCommunityLinks.ts 0 4 0.0%
src/services/loadTablesData.ts 0 5 0.0%
src/utils/getAllDataFromResults/getAllDataFromResults.ts 0 45 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/Expand/Expand.tsx 1 0.0%
src/components/LineSelector/LineSelector.tsx 1 0.0%
src/utils/getTablePublicUrl/getTablePublicUrl.ts 1 0.0%
src/components/Results/Results.tsx 1 0.0%
src/components/ResultsCard/ResultsCard.tsx 1 0.0%
src/components/Spinner/Spinner.tsx 1 0.0%
src/components/Pages/DictionaryPage/DictionaryPage.tsx 1 0.0%
src/components/Card/Card.tsx 1 0.0%
src/components/Text/Text.tsx 1 0.0%
src/components/Pages/Viewer/ViewerPOSFilterComponent.tsx 1 0.0%
Totals Coverage Status
Change from base Build 11990483180: 0.5%
Covered Lines: 166
Relevant Lines: 2889

💛 - Coveralls

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.

3 participants