bring back a button to create new words from an empty search#2348
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughEntriesList.svelte now integrates view-service translations and enables search-driven entry creation. The component imports useViewService and the pt helper, instantiates a viewService instance, and updates the entry creation handler to accept an optional headword parameter. Empty-state and virtual-list rendering are refactored to use view-specific text and display a "create entry for search" button as a final list item when appropriate. ChangesView-aware entry creation and search-driven button
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
C# Unit Tests165 tests 165 ✅ 12s ⏱️ Results for commit 2e54d34. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/viewer/src/project/browse/EntriesList.svelte`:
- Around line 108-111: The inline create-entry buttons bypass disableNewEntry
and indexArray always reserves a terminal CTA slot; update the logic so creation
UI is fully gated by disableNewEntry and no extra slot is reserved when creation
is disabled. Specifically: change the indexArray computation (uses
entryLoader?.totalCount and skeletonRowCount) to subtract the terminal CTA slot
when disableNewEntry is true so no extra index is reserved; and wrap rendering
of all creation controls (the FAB and the inline create-entry buttons) with a
check on disableNewEntry so they do not render when disableNewEntry is true. Use
the existing symbols disableNewEntry, indexArray, entryLoader, and
skeletonRowCount to locate and modify the code paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7c17677e-f085-48e8-96c5-24de6db19d5b
📒 Files selected for processing (1)
frontend/viewer/src/project/browse/EntriesList.svelte
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
ed6c8c0 to
2e54d34
Compare






I was looking throught some feedback and someone mentioned wanting to create missing entries from search. We had that feature before we adopted shadcn, so I brought it back.
Search with no results:

Search with results:

the create button is included inline so when the list scrolls it'll be at the bottom.
After I implemented this however, it did feel a bit redundant to have both the add button, and the create button for the search. We could just make the add button use the search for the headword, but I don't think that would be very obvious that this is what would happen.