Skip to content

feat: add AceConfig options UI for overlay positioning (#40)#41

Merged
Xerrion merged 1 commit intomasterfrom
feat/40-options-ui
Apr 29, 2026
Merged

feat: add AceConfig options UI for overlay positioning (#40)#41
Xerrion merged 1 commit intomasterfrom
feat/40-options-ui

Conversation

@Xerrion
Copy link
Copy Markdown
Owner

@Xerrion Xerrion commented Apr 29, 2026

Description

Adds an AceConfig-3.0 options panel for the action-bar damage overlay, replacing the text-argument /phd config handler. Users get a Blizzard-integrated UI with anchor dropdown, offset/font sliders, abbreviate toggle, and reset button - no more memorizing keys and valid anchor values.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Refactor (non-breaking change that improves code quality)
  • Documentation update
  • Breaking change (fix or feature that would cause existing functionality to change)

Related Issues

Closes #40

Testing

  • Luacheck passes (luacheck .) - 0 warnings / 0 errors across 78 files
  • Tested in-game manually - pending reviewer/owner smoke test
  • WoW version(s) tested on: TBC Anniversary (primary target)

In-game verification still needed:

  • /phd config opens the panel
  • Settings persist across /reload
  • Reset button restores defaults
  • Other slash subcommands (state, spell, help) unchanged

Screenshots

None yet - panel screenshots to be added after in-game smoke test.

Changes

  • New Core/Options.lua - AceConfig schema bound to db.profile.overlay; reset button uses ns.DB_DEFAULTS
  • Core/Init.lua - exposes ns.DB_DEFAULTS, registers Options in OnInitialize, /phd config now opens the GUI, removes obsolete VALID_ANCHORS text-arg parser
  • PhDamage.toc - loads Core/Options.lua after Core/Init.lua
  • Libs/embeds.xml - includes AceGUI-3.0.xml and AceConfig-3.0.xml (Registry/Cmd/Dialog come transitively; libs were already embedded via pkgmeta external, just not loaded)
  • .luacheckrc - adds Settings and InterfaceOptionsFrame_OpenToCategory to read_globals

Checklist

  • My code follows the project's code style (4-space indent, 120 char lines)
  • I have tested my changes in-game
  • Luacheck reports no warnings
  • My commits follow conventional commit format

Summary by CodeRabbit

  • New Features

    • Added a graphical options panel for overlay configuration, accessible via /phd config.
    • Configuration panel includes controls for anchor position, offsets, font size, number abbreviation toggle, and reset to defaults.
  • Improvements

    • Migrated configuration from manual slash-command arguments to a user-friendly interface panel.

Replaces the text-argument /phd config handler with an AceConfig-3.0 panel registered via AceConfigDialog:AddToBlizOptions. Settings bind to db.profile.overlay and re-render via ns.ActionBar.ApplySettings on every change. Includes a Reset to Defaults button driven by ns.DB_DEFAULTS.

Closes #40
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac444395-aed5-4d36-a0c7-abf21ea85d4f

📥 Commits

Reviewing files that changed from the base of the PR and between ff210d3 and d5d8007.

📒 Files selected for processing (5)
  • .luacheckrc
  • Core/Init.lua
  • Core/Options.lua
  • Libs/embeds.xml
  • PhDamage.toc

📝 Walkthrough

Walkthrough

This PR implements an AceConfig-driven options UI for overlay positioning, replacing the manual text-argument slash-command parser. The changes embed AceGUI and AceConfig libraries, create a new Core/Options.lua module that registers an options panel with Blizzard's interface, and update Core/Init.lua to initialize and open this panel when users run /phd config.

Changes

Cohort / File(s) Summary
Configuration & Library Setup
.luacheckrc, Libs/embeds.xml, PhDamage.toc
Added global symbols for LuaCheck validation, embedded AceGUI-3.0 and AceConfig-3.0 libraries, and registered Core/Options.lua in the load order.
Core Initialization
Core/Init.lua
Replaced manual slash-command argument parsing with AceConfig-driven UI flow; exports DB_DEFAULTS to namespace; conditionally registers options panel on init and routes /phd config to open the panel.
Options UI Module
Core/Options.lua
New module providing AceConfig options table with anchor dropdown, offset/font sliders, abbreviate-numbers toggle, and reset action; implements getters/setters that persist changes to profile and trigger ApplySettings(); registers panel with Blizzard interface and provides Open() method.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add AceConfig options UI for overlay positioning (#40)' directly and clearly describes the main change: adding an AceConfig-driven options UI for overlay positioning.
Linked Issues check ✅ Passed All requirements from #40 are met: anchor dropdown, X/Y offset sliders (-50..50), font-size slider (6..32), abbreviate-numbers toggle, Reset button, db.profile.overlay binding, ApplySettings() invocation, and /phd config opens the panel.
Out of Scope Changes check ✅ Passed All changes directly support the #40 objective of replacing text-arg /phd config with an AceConfig UI. No extraneous modifications detected beyond the scope of adding the options panel.

✏️ 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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@Xerrion Xerrion merged commit 690d9ce into master Apr 29, 2026
3 checks passed
@Xerrion Xerrion deleted the feat/40-options-ui branch April 29, 2026 08:44
Xerrion added a commit that referenced this pull request Apr 29, 2026
Documents the new /phd config slash command and AceConfig options panel from PR #41, adds a Configuration section, introduces the 4-layer architecture (Core/Engine/Data/Presentation), notes the busted test suite for contributors, and corrects the slash-command table.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add options UI for overlay positioning

1 participant