-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
adding weekly stats to reselling search #505
Conversation
WalkthroughThe pull request introduces several enhancements across multiple files, primarily focusing on expanding the data structure related to item sales metrics in the game. New entries have been added to the Changes
Possibly related PRs
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 (
|
Quality Gate failedFailed conditions |
Deploying saddlebag-with-pockets with Cloudflare Pages
|
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/components/FFXIVResults/FullScan/Results.tsx (2 hunks)
- app/redux/localStorage/ffScanOrderHelpers.ts (1 hunks)
- app/utils/items/wowItems.ts (6 hunks)
Additional comments not posted (9)
app/utils/items/wowItems.ts (7)
2503-2503
: LGTM: New item added correctlyThe addition of 'Lethargy Root' with ID '3777' follows the existing pattern and fits well within the surrounding context.
28755-28758
: LGTM: New items added correctlyThe additions of 'Half-Eaten Fish' (ID '220439') and 'Desecrated Arathi Tinderbox' (ID '220443') follow the existing pattern and fit well within the surrounding context.
29064-29064
: LGTM: New item added correctlyThe addition of 'Sticky Sweet Treat' with ID '222748' follows the existing pattern and fits well within the surrounding context.
29107-29109
: LGTM: Duskthread Lining entries added with quality levelsThe additions of 'Duskthread Lining' entries with different quality levels (IDs '222871', '222872', '222873') follow the existing pattern and are consistent with similar items in the map.
29852-29852
: LGTM: New item added correctlyThe addition of 'Extra Large Bag of Popped Pebbles' with ID '228453' follows the existing pattern and fits well within the surrounding context.
Line range hint
2503-29852
: Overall assessment: Changes look good, with one minor queryThe additions and modifications to the
wowItemsMap
are consistent and well-structured. They expand the item database, which aligns with the PR objective of "adding weekly stats to reselling search".As a final step, I recommend:
- Addressing the query about the ID gap between '225728' and '225744'.
- Double-checking that all new items are correctly named and categorized.
#!/bin/bash # Description: Verify the consistency of new items # Test 1: Check for any duplicate item names. Expect: No results. echo "Checking for duplicate item names:" rg --type typescript -o "'.+': '.+'" app/utils/items/wowItems.ts | sort | uniq -d # Test 2: Verify that all new item IDs are unique. Expect: No results. echo "Checking for duplicate item IDs:" rg --type typescript -o "'[0-9]+'" app/utils/items/wowItems.ts | sort | uniq -d # Test 3: Check for any items with non-numeric IDs. Expect: No results. echo "Checking for non-numeric IDs:" rg --type typescript "'.+': '.+'" app/utils/items/wowItems.ts | rg -v "'[0-9]+': '.+'"
29623-29631
: LGTM: New equipment items added correctlyThe additions of multiple new equipment items (IDs '225720' to '225744') follow the existing pattern and fit well within the surrounding context.
However, there's a gap in the ID sequence between '225728' and '225744'. Can you confirm if this is intentional or if there are missing items?
app/redux/localStorage/ffScanOrderHelpers.ts (1)
18-26
: LGTM! New sorting options added successfully.The additions to the
defaultSortOrder
array align well with the PR objective of adding weekly stats to reselling search. The new entries provide more granular sorting options for users, which is beneficial. The naming convention is consistent, and the entries are logically grouped.To ensure these changes are properly integrated, please run the following script to check if these new sorting options are being used elsewhere in the codebase:
This will help identify if there are any areas in the codebase that might need to be updated to handle these new sorting options.
Verification successful
Verified: New sorting options are utilized appropriately.
- Found usage in
app/components/FFXIVResults/FullScan/Results.tsx
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usage of new sorting options in the codebase # Test: Search for usage of new sorting options echo "Searching for usage of new sorting options:" rg --type typescript --type javascript -i "(regionWeeklyMedianNQ|regionWeeklyAverageNQ|regionWeeklySalesAmountNQ|regionWeeklyQuantitySoldNQ|regionWeeklyMedianHQ|regionWeeklyAverageHQ|regionWeeklySalesAmountHQ|regionWeeklyQuantitySoldHQ)" # Test: Check for any TODO comments related to sorting or weekly stats echo "Checking for related TODO comments:" rg --type typescript --type javascript -i "TODO.*sort|TODO.*weekly"Length of output: 557
Script:
#!/bin/bash # Description: Check for usage of new sorting options in the codebase # Test: Search for usage of new sorting options echo "Searching for usage of new sorting options:" rg --type ts --type js -i "(regionWeeklyMedianNQ|regionWeeklyAverageNQ|regionWeeklySalesAmountNQ|regionWeeklyQuantitySoldNQ|regionWeeklyMedianHQ|regionWeeklyAverageHQ|regionWeeklySalesAmountHQ|regionWeeklyQuantitySoldHQ)" # Test: Check for any TODO comments related to sorting or weekly stats echo "Checking for related TODO comments:" rg --type ts --type js -i "TODO.*sort|TODO.*weekly"Length of output: 2716
app/components/FFXIVResults/FullScan/Results.tsx (1)
78-98
: LGTM: New entries incvsFileList
are correctly added and consistently namedThe additional entries for regional weekly statistics are appropriately added to the
cvsFileList
array, enhancing CSV export capabilities.
columnHelper.accessor('regionWeeklyMedianNQ', { | ||
header: 'Region Weekly Median NQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklyAverageNQ', { | ||
header: 'Region Weekly Average NQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklySalesAmountNQ', { | ||
header: 'Region Weekly Sales Amount NQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklyQuantitySoldNQ', { | ||
header: 'Region Weekly Quantity Sold NQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklyMedianHQ', { | ||
header: 'Region Weekly Median HQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklyAverageHQ', { | ||
header: 'Region Weekly Average HQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklySalesAmountHQ', { | ||
header: 'Region Weekly Sales Amount HQ', | ||
cell: (info) => info.getValue().toLocaleString() | ||
}), | ||
columnHelper.accessor('regionWeeklyQuantitySoldHQ', { | ||
header: 'Region Weekly Quantity Sold HQ', | ||
cell: (info) => info.getValue().toLocaleString() |
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.
Consider refactoring column definitions to reduce code duplication
The new column accessors added to columnHelper
have repetitive structures. To improve maintainability and reduce potential for errors, consider programmatically generating these columns.
Summary by CodeRabbit
New Features
Improvements