refactor: stabilize init, UI, and macro flow; schema-driven options; …#91
Draft
tuxx wants to merge 2 commits intoollidiemaus:mainfrom
Draft
refactor: stabilize init, UI, and macro flow; schema-driven options; …#91tuxx wants to merge 2 commits intoollidiemaus:mainfrom
tuxx wants to merge 2 commits intoollidiemaus:mainfrom
Conversation
…env/constants - Init and DB safety - Hardened clean-install path: `getHealingSpells()` falls back to `ham.defaults.activatedSpells` when `HAMDB` is nil; options now refresh via `ham.refreshOptions()` on load/reset. - Normalized event/debounce usage with `ham.defer`. - Macro architecture - Split build vs apply: `ham.buildMacro()`, `ham.buildBandageMacro()`, `ham.applyMacro(name, code)`. - Extracted MegaMacro integration into `Core/Macro.lua` (`checkAddonReady`, `apply`). - Macro item/spell string building uses helpers and `table.concat`. - Env/constants - Centralized env checks via `ham.env`; added event constants (`ham.EVT_*`) and slot IDs. - Replaced magic strings/numbers in event registration and tinker slots. - UI and UX - Fixed stray icons: frames are now children of settings content, guarded by panel init. - Added tooltip helpers; unified icon retrieval with `ham.getSpellTexture`/`ham.getItemIcon`. - Schema-driven options UI: generates behavior and item toggles from schema; reset updates all via registry. - `getSpellName` used for spell labels. - Potions/Bandages data cleanup - Consolidated lists by environment (retail/classic/wrath/cata/mop) with `ham.getEnvKey()` and `ham.copyList()`; applied context filters (BG rules, options) centrally. This reduces duplication, hardens startup, and keeps UI artifacts scoped to the settings panel.
Contributor
Author
|
Started refactoring some stuff, checking if i can do some more refactoring. Let me know what u think @ollidiemaus 👍 |
Owner
|
I haven’t had a lot of time to check it out but was the merge from main really fine ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…env/constants
Init and DB safety
getHealingSpells()falls back toham.defaults.activatedSpellswhenHAMDBis nil; options now refresh viaham.refreshOptions()on load/reset.ham.defer.Macro architecture
ham.buildMacro(),ham.buildBandageMacro(),ham.applyMacro(name, code).Core/Macro.lua(checkAddonReady,apply).table.concat.Env/constants
ham.env; added event constants (ham.EVT_*) and slot IDs.UI and UX
ham.getSpellTexture/ham.getItemIcon.getSpellNameused for spell labels.Potions/Bandages data cleanup
ham.getEnvKey()andham.copyList(); applied context filters (BG rules, options) centrally.This reduces duplication, hardens startup, and keeps UI artifacts scoped to the settings panel.