Filter and order glosses/definitions by project analysis languages#4181
Filter and order glosses/definitions by project analysis languages#4181
Conversation
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
imnasnainaec
left a comment
There was a problem hiding this comment.
- Revert the changes to
fontContext - Remove the
languagesprop from bothSenseCardContentandSenseCardText - Move the
analysisLangs = useAppSelectorout ofDragSenseand into bothSenseCardTextandSensesTextSummary - Update tests accordingly
- Revert the changes to
package-lock.json
…ve languages prop Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Done in 9177e4b. Here's a summary of the changes:
|
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe pull request removes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/WordCard/SenseCardText.tsx`:
- Around line 40-45: The mapping in getSenseInLanguages (and the similar block
at 54-62) can produce blank rows or render nothing when the analysis-language
list is empty; update getSenseInLanguages to first handle a null/empty languages
argument by returning an empty array, then map languages to
getSenseInLanguage(sense, l) but filter out any resulting SenseInLanguage
entries that have no gloss/definition/text (e.g., both gloss and definition
empty or whitespace) before returning so SenseCardText only receives non-empty
rows; apply the same guard+filter logic to the other language-mapping block
referenced (lines 54-62) so empty analysis-language state and empty-language
rows are not rendered.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/components/WordCard/SenseCard.tsxsrc/components/WordCard/SenseCardText.tsxsrc/components/WordCard/SensesTextSummary.tsxsrc/components/WordCard/index.tsxsrc/goals/MergeDuplicates/MergeDupsStep/MergeDragDrop/DragSense.tsxsrc/goals/MergeDuplicates/MergeDupsStep/SenseCardContent.tsxsrc/goals/ReviewEntries/ReviewEntriesTable/Cells/EditCell/tests/EditSensesCardContent.test.tsx
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4181 +/- ##
==========================================
- Coverage 74.95% 65.94% -9.01%
==========================================
Files 302 246 -56
Lines 11090 6249 -4841
Branches 1394 791 -603
==========================================
- Hits 8312 4121 -4191
+ Misses 2378 1870 -508
+ Partials 400 258 -142
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fontContext.ts,fontContext.test.ts,package-lock.json,SidebarDragSense.tsxSenseCardTextandSensesTextSummaryuseuseAppSelectorwithshallowEqualforanalysisLangslanguagesprop fromSenseCardContent,SenseCardText,SenseCard,WordCardanalysisLangsselector fromDragSenseEditSensesCardContent.test.tsxwith ReduxProviderarraysEqualwithshallowEqualinDragSenseand deleted the localarraysEqualfunctionWordCard/index.tsx,SenseCard.tsx,SensesTextSummary.tsxOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
This change is
Summary by CodeRabbit
Refactor
Tests