feat: detect ElvUI loot conflict and offer to disable (#147)#148
feat: detect ElvUI loot conflict and offer to disable (#147)#148
Conversation
Adds Core/ElvUICompat.lua which detects whether ElvUI's loot window or group-loot roll frames are enabled alongside DragonLoot's matching features. On detection, prompts the user via StaticPopup to disable the ElvUI modules and reload. Dismissal is persisted per-profile scoped by conflict signature so re-enabling an ElvUI feature later re-prompts. Bumps AceDB schema to 3 to backfill the new profile sub-table.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change introduces ElvUI loot conflict detection and resolution. A new Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 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. 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 `@DragonLoot/Core/ElvUICompat.lua`:
- Around line 214-251: The StaticPopup frame stores a stale self.accepted flag
between pooled shows which can prevent OnHide from persisting dismissals; update
the StaticPopupDialogs["DRAGONLOOT_ELVUI_CONFLICT"] definition to reset that
flag when the popup is shown (add an OnShow that sets self.accepted = nil or
false) or otherwise clear self.accepted right before calling StaticPopup_Show;
ensure the reset occurs regardless of data so OnAccept (which sets self.accepted
= true) and OnHide (which checks it) behave correctly for each new display of
the popup and still call ns.ElvUICompat.Disable and ReloadUI as before.
🪄 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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 57268df5-476a-4bee-977f-9ba268d0e48f
📒 Files selected for processing (6)
.luacheckrcDragonLoot/Core/Config.luaDragonLoot/Core/ElvUICompat.luaDragonLoot/Core/Init.luaDragonLoot/DragonLoot.tocDragonLoot/Locales/enUS.lua
Addresses CodeRabbit: reset self.accepted on StaticPopup OnShow so pooled frame reuse cannot carry stale accept state into a later dismissal path. Also updates Config_spec tests to assert schemaVersion == 3 and re-seeds the iconSize migration test at v3 so the FillMissingDefaults skip path is exercised as originally intended.
Closes #147
Type of change
Summary
Adds a new
Core/ElvUICompat.luamodule that detects when ElvUI's loot window (E.private.general.loot) or group-loot roll frames (E.private.general.lootRoll) are active alongside DragonLoot. On detection, shows a StaticPopup offering to disable the ElvUI modules andReloadUI(). Dismissal is persisted per-profile inprofile.elvuiCompat, scoped by conflict signature so later re-enables of an ElvUI module re-prompt.Design notes
M:LoadLoot/M:LoadLootRoll) are only checked at Initialize - runtime flag flips don't undo hooks.ReloadUI()is required.E.privatetoElvPrivateDBautomatically on logout - no direct SavedVariable mutation.ScheduleTimerso ElvUI finishes its own Initialize first.CURRENT_SCHEMAfrom 2 to 3 so existing profiles backfill the newelvuiCompatsub-table viaFillMissingDefaults.Testing
luacheck .clean (only pre-existing Libs/ warnings)Checklist
Summary by CodeRabbit
New Features
Chores