-
Notifications
You must be signed in to change notification settings - Fork 0
fix: since search only supports joins, show them all and only enable … #134
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
Conversation
…risk.user_transactions.txn_join
WalkthroughThe changes involve modifications to the Changes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
frontend/src/lib/components/NavigationBar/NavigationBar.svelte (2)
205-205
: Consider tracking the TODO in the issue trackerThe TODO comment about enabling functionality for all joins should be tracked formally to ensure it's not forgotten.
Would you like me to create a GitHub issue to track this enhancement? This would help in planning the implementation of support for all joins.
207-207
: Consider extracting the hardcoded join name to a constantThe hardcoded string
'risk.user_transactions.txn_join'
should be extracted to a named constant for better maintainability and to avoid typos.+ const ENABLED_JOIN = 'risk.user_transactions.txn_join'; <CommandItem - disabled={entity.name !== 'risk.user_transactions.txn_join'} + disabled={entity.name !== ENABLED_JOIN}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
frontend/src/lib/components/NavigationBar/NavigationBar.svelte
(1 hunks)
🔇 Additional comments (2)
frontend/src/lib/components/NavigationBar/NavigationBar.svelte (2)
204-214
: Implementation aligns well with PR objectives
The changes effectively implement the requirements:
- Shows all search results as joins
- Correctly restricts clickable items to only risk.user_transactions.txn_join
- Structure allows for future addition of entityType
The implementation is clean and maintainable.
209-209
: Verify the path construction and entity display
The path construction looks correct using getEntity('joins')
, but let's verify that all search results are properly displayed and routed.
Also applies to: 212-212
✅ Verification successful
The search results show consistent usage of getEntity('joins')
and entity.name
within the NavigationBar component. The path construction is properly handled with encodeURIComponent
for the entity name, and the display of entity names is consistent. The component correctly uses the joins entity's path and icon, while properly displaying the entity name in the UI.
Path construction and entity display are properly implemented
The verification confirms:
- Consistent path construction using
getEntity('joins').path
- Proper URL encoding of entity names
- Consistent entity name display in the UI
- Correct icon usage from the joins entity
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the consistency of join paths and entity handling
# Check for any other usages of getEntity('joins') to ensure consistent path handling
rg "getEntity\('joins'\)" -A 2
# Look for other places where entity names are displayed to ensure consistent formatting
rg "entity\.name" -A 2
Length of output: 1371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and thanks for fixing this. I ran into it while working on the switch to unplugin-icons and regression testing but didn't look into it since it was also an issue on AWS/staging.
Summary
Right now our search endpoint only returns joins. I change the code to account for this by showing all results as a join. I have also only made
risk.user_transactions.txn_join
clickable, since it is the only one to have data.In the future, we should add an
entityType
to search results to categorize them on the frontend.Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
model
variable withentity
.