# WayBook

## [v1.26.20](https://github.com/Hrudrak-waybook/WayBook/tree/v1.26.20) (2026-08-14)
[Full Changelog](https://github.com/Hrudrak-waybook/WayBook/compare/v1.26.5...v1.26.20) [Previous Releases](https://github.com/Hrudrak-waybook/WayBook/releases)

- Fold the layout constants onto one table  
    Forty-two file-scope constants become fields on a single K table, taking  
    the main chunk from 193 locals to 152 and leaving 48 spare against Lua's  
    limit of 200.  
    Purely a rename: 136 references rewritten, none left bare, every value  
    unchanged. BINDING\_NAME\_* stay bare globals - the keybinding UI reads them  
    by name.  
    The 105 local functions are deliberately left alone. Grouping them would  
    reclaim more slots than anything will plausibly need and carries far more  
    risk on a published addon.  
- Ignore status lines when tagging, and get back under Lua's local limit  
    "100% Threat" was being tagged. That line appears on the tooltip while you  
    are in combat with the unit and sat in the same slot the subtitle is read  
    from. There is no localized global for it on this client, so it is matched  
    by the percent sign, which survives translation. Rejected from the faction  
    slot too, since which of the two it landed in is not distinguishable from  
    the symptom.  
    Adding that one helper pushed the main chunk to 201 file-scope locals,  
    one past Lua's hard limit of 200, and the file stopped compiling  
    altogether - which in game is a silent failure to load. The nine auto-tag  
    helpers are now fields on a single AutoTag table: 193 locals, seven spare.  
- Read the faction by tooltip position, not the reputation list  
    Kik'tik tagged Flight Master but not Klaxxi. His tooltip reads "The  
    Klaxxi" exactly, with no stray whitespace, so the match string was never  
    the problem: the reputation list only enumerates rows that are visible,  
    and a faction under a collapsed header in the reputation pane is simply  
    absent from it. Gina Mudclaw worked only because Tillers happened to sit  
    under an expanded one.  
    The level line is the spine of an NPC tooltip - name and optional subtitle  
    above it, faction on the line straight after. Reading that position works  
    whatever the reputation pane is doing, and tags factions never encountered  
    at all. The reputation-list match survives as a fallback for a tooltip  
    with no level line.  
    Also noted while probing: C\_Reputation.GetNumFactions does not exist on  
    this client even though C\_Reputation does, and GetFactionDataByIndex now  
    has a GetFactionInfo fallback to match.  
- Strip the article from faction tags, and tag the NPC's role  
    "The Tillers" now tags as "Tillers", matching how the faction is actually  
    referred to and lining up with tags already defined by hand.  
    The subtitle becomes a tag too, with the faction removed from it first, so  
    "Tillers Quartermaster" tags as "Quartermaster" while "Flight Master" comes  
    through whole. The faction is removed by plain find rather than pattern,  
    since names like "Shado-Pan" contain pattern-magic characters, and longest  
    form first so "The Tillers Quartermaster" is not left holding a stray  
    "The". Leftover punctuation is trimmed, so "Tillers' Quartermaster" does  
    not come back as "' Quartermaster".  
    Line 2 is only read as a subtitle when it is not the level line, detected  
    through the game's own TOOLTIP\_UNIT\_LEVEL format rather than a hardcoded  
    word.  
- Auto-tag the target's reputation faction  
    No API maps an NPC to its reputation faction, but the tooltip carries it -  
    Gina Mudclaw's reads name / Tillers Quartermaster / Level 90 / The Tillers.  
    A hidden scanning tooltip reads the target's lines and matches them against  
    the faction names the player's own reputation list returns.  
    Matching rather than reading a line number, because an NPC without a  
    subtitle shifts every line up and a hostile one has no faction line at all.  
    Matching against a known set is also what keeps a subtitle or creature type  
    from becoming a junk tag. Line 1 is skipped so an NPC named after its own  
    faction cannot tag itself off its title.  
    A faction the player has not encountered yet produces no tag rather than a  
    wrong one.  
- Drop the faction auto-tag, keep Rare and Elite  
    UnitFactionGroup only answers for NPCs closely allied with Alliance or  
    Horde and returns nil for everything else, so it tagged a minority of  
    waypoints and silently skipped the rest. A tag whose absence means nothing  
    is worse than no tag. Rare and Elite come from UnitClassification and are  
    reliable on any targetable NPC, so they stay.  
- Auto-tag Rare, Elite and faction from the selected target  
    A waypoint created from a target now picks up tags read off that target:  
    Rare and Elite from UnitClassification, and Alliance/Horde/Neutral from  
    UnitFactionGroup. Normal classification adds nothing, since tagging  
    everything ordinary as ordinary says nothing.  
    Inline in AddTargetWaypoint rather than on a hook, so it only ever fires  
    when you deliberately add a waypoint from a target. Arrival, clicking a  
    row, and every other creation path are untouched.  
    Faction is checked against a known set instead of used as returned, so an  
    unexpected value cannot define a junk tag that then lingers in the picker.  
    Tags go through DefineTag for the usual case-insensitive dedup, and are  
    applied before ScrollToWaypoint so the group it opens is the one the  
    waypoint actually lands under.  
- Keep child windows open when collapsing, add Edit's Close button  
    Collapsing to the bar no longer drags Options, Export, Share and Edit down  
    with the list. A collapse is the list getting out of the way, not the user  
    closing anything, and taking a half-finished window with it made the bar  
    unusable for anything but browsing. Closing the main window by hand still  
    cascades, which is what the 1.24.1 behaviour was for.  
    The Edit window gains a Close button centred under the new-tag box. It is  
    positioned by RefreshChips along with everything else below the chip area,  
    so it follows however many rows the chips wrapped onto, and the frame's  
    floor grew to match.  
- Stop the collapse bar closing the windows over a dropdown  
    The collapse watcher polled the six WayBook frames for IsMouseOver, but  
    the tag picker opens into Blizzard's shared DropDownList frames, which are  
    parented to UIParent rather than to the Edit window. Moving the mouse onto  
    the list read as leaving the interface entirely, so everything collapsed  
    mid-selection.  
    The same gap covered the delete confirmation, which uses the shared  
    StaticPopups. Both are now polled alongside WayBook's own frames.  
    This is the 1.26.1 bug one level further out: there the missed frames were  
    children inside the windows, here they are siblings beside them.  
- Grey out the Tags column while grouping by tag  
    Mirrors what Group by Zone already does to the Zone column: SyncTagColumn  
    stashes the checkbox's state in tagColumnPreGroup, switches it off, and  
    hands it back untouched when grouping changes.  
    This was deliberately absent on the reasoning that a multi-tagged  
    waypoint's other tags were still new information when only its first one  
    named the header. That stopped being true in 1.22.1, when grouping by tag  
    became many-to-many - a waypoint now appears under a header for every tag  
    it owns, so the badges repeat the headers exactly. Refresh has suppressed  
    them since then; the checkbox now agrees.  
    Also corrected the Tags tooltip, which still said ctrl-click manages a  
    row's tags. That moved to right-click in 1.24.0.  
- Tab between the Edit window's fields  
    EditBoxes do not chain to each other on their own. Label, Note,  
    Coordinates and the new-tag box now form a wrapping ring, with Shift-Tab  
    walking it backwards.  
    Moving focus fires each box's own OnEditFocusLost, so tabbing out of a  
    field commits it the same way clicking away already did.  
- Fix the Edit window layout broken by the Coordinates field  
    RefreshChips positioned "Define a new tag:" from a hardcoded -186, the  
    chip area's old y. Moving the chip area to -230 for the Coordinates field  
    left that literal behind, so the chips drew below the label instead of  
    above it and the frame fell back to its minimum height with dead space  
    underneath.  
    The value is now a single CHIP\_AREA\_Y constant used by both the chip  
    area's own anchor and everything positioned beneath it, so the two cannot  
    drift apart again.  
- Group-by row on the main window, and editable coordinates  
    Group by None/By Zone/By Tag now sit under the search box, with a  
    sort-direction arrow at the right of the same row. Options keeps its own  
    copies; both sets re-sync through RefreshOptions and the new  
    RefreshMainControls, so clicking either updates the other. The frame grew  
    420 -> 446, exactly the height the new row takes, so the list area is  
    unchanged.  
    The Edit window gains a Coordinates field between Note and Tags. Editing  
    it moves the waypoint, which is the same remove-then-add problem as a  
    rename because TomTom keys on map, x, y AND title - so MoveWaypoint  
    mirrors RenameWaypoint, carrying the note, tags, visit history and the  
    arrow across and returning the current uid on every path. Input outside  
    0-100, or that is not two numbers, is refused rather than clamped.  
    Everything below Tags moved down 44, and the frame's floor with it.  
- Confirm and scroll to a waypoint added from a target  
    Add Waypoint with a target selected now prints "Saved <name>." and the  
    list scrolls the new row into view.  
    ScrollToWaypoint records a uid rather than a row index, since where a  
    waypoint lands depends on the current sort, grouping and search, none of  
    which are known when it is created. Refresh captures the row's own  
    accumulated y offset during layout, because variable-height rows mean  
    there is no index-times-height shortcut.  
    Forces the containing group open first, since a new waypoint can land  
    inside a collapsed one and have no row at all. Does nothing while the  
    list window is closed.  
- Trim seven chat messages  
    Removed the lines that narrate something you just watched happen: arrow  
    set, arrow cleared, no arrow set, both waypoint-saved messages, renamed,  
    and list window recentered.  
    What stays is errors that explain why nothing happened, the delete  
    message carrying its /way undo line, the arrival visit count, the  
    column-forced-back-on notice, and the restore-defaults confirmation.  
    Chat output goes from 17 places to 10.  
- Close the tag dropdown when you click away from it  
    This client's FrameXML never wires up the GLOBAL\_MOUSE\_DOWN handler that  
    closes a dropdown on an outside click, which is why every dropdown library  
    installed here reimplements it. The event itself is available, so WayBook  
    registers its own listener rather than embedding a library or clobbering  
    UIDropDownMenuDelegate's shared OnEvent script.  
    Scoped to while the Edit window is open. Also closes any stray list when  
    the Edit window itself hides.  
