Skip to content

[ReviewEntries > Cells] Don't require function for non-editable cells#4259

Open
imnasnainaec wants to merge 1 commit intomasterfrom
review-entries-table-cells-readonly
Open

[ReviewEntries > Cells] Don't require function for non-editable cells#4259
imnasnainaec wants to merge 1 commit intomasterfrom
review-entries-table-cells-readonly

Conversation

@imnasnainaec
Copy link
Copy Markdown
Collaborator

@imnasnainaec imnasnainaec commented Apr 10, 2026

src/components/DataEntry/DataEntryTable/NewEntry/VernDialog.tsx uses both DomainsCell and PartOfSpeechCell, which was overlooked in #4217.


This change is Reviewable

Summary by CodeRabbit

  • Refactor
    • Internal code structure improvements to review entry table components. No changes to end-user functionality or interface.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

Refactored cell component prop interfaces by extracting read-only properties into a new ReadonlyCellProps interface. The base CellProps now extends ReadonlyCellProps while retaining mutable operations. All cell components that exclusively use read-only properties updated to accept ReadonlyCellProps instead.

Changes

Cohort / File(s) Summary
Interface Definition
src/goals/ReviewEntries/ReviewEntriesTable/Cells/CellTypes.ts
Created new ReadonlyCellProps interface with word: Word property and updated CellProps to extend it, removing direct word property while keeping delete and replace methods.
Cell Component Updates
src/goals/ReviewEntries/ReviewEntriesTable/Cells/DefinitionsCell.tsx, DomainsCell.tsx, GlossesCell.tsx, NoteCell.tsx, PartOfSpeechCell.tsx, VernacularCell.tsx
Updated function signatures to accept ReadonlyCellProps instead of CellProps for components that only read word properties without using delete/replace operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

frontend, goal: ReviewEntries, 🟨Medium

Suggested reviewers

  • jasonleenaylor

Poem

🐰 With types cleaned up and interfaces bright,
The cells now know what's read, what's right!
Extract the word, let delete stay near,
Separation of concerns—hip-hip, hooray cheer! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main refactoring: separating read-only properties into a new interface to eliminate function requirements for non-editable cells.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review-entries-table-cells-readonly

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@imnasnainaec imnasnainaec changed the title Don't require function for non-editable cells [ReviewEntriesTable > Cells] Don't require function for non-editable cells Apr 10, 2026
@imnasnainaec imnasnainaec changed the title [ReviewEntriesTable > Cells] Don't require function for non-editable cells [ReviewEntries > Cells] Don't require function for non-editable cells Apr 10, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.79%. Comparing base (89f76ce) to head (e18fc88).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4259      +/-   ##
==========================================
- Coverage   75.94%   66.79%   -9.15%     
==========================================
  Files         303      246      -57     
  Lines       11352     6274    -5078     
  Branches     1403      787     -616     
==========================================
- Hits         8621     4191    -4430     
+ Misses       2330     1824     -506     
+ Partials      401      259     -142     
Flag Coverage Δ
backend ?
frontend 66.79% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant