Skip to content

Add sorting to enchant, corrupt, and implicit popups#9848

Open
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:feature/sort-special-modifier-lists
Open

Add sorting to enchant, corrupt, and implicit popups#9848
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:feature/sort-special-modifier-lists

Conversation

@mcagnion
Copy link
Copy Markdown
Contributor

@mcagnion mcagnion commented May 12, 2026

Description of the problem being solved:

Follow-up to #9785. The sort dropdown introduced there only covered the Add Modifier popup. The three other special-modifier popups (Enchant, Corrupt, Add Implicit) still presented an unsorted list. This PR extends the same Sort by: dropdown to those popups so the same sort affordance is available everywhere mods are picked from a generated list.

Defaults are preserved: when sort is set to Default, each popup behaves exactly as before. The data.powerStatList transform handling co-authored in #9785 is reused.

The Enchant popup is also guarded against a stale selection index that could previously crash the app when the source dropdown landed on an empty enchantment list (would surface as Item.lua:1118 on tooltip hover).

Steps taken to verify a working solution:

  • busted spec suite passes; the only failure is the pre-existing flaky TestTradeQueryCurrency_spec.lua: GetTotalPriceString aggregates prices, unrelated to this change.
  • In-game: opened Enchant (Harvest), Corrupt (Corrupted and Scourge sources), Add Implicit (Searing Exarch and Delve), and the existing Add Modifier popup. Verified each list reorders, the selection survives a re-sort, and no popup crashes.
  • Confirmed the existing Add Modifier popup behaves the same as before.

After screenshot:

after-corrupt-popup-sort after-enchant-popup-sort after-implicit-popup-exarch-sort

Follow-up to PathOfBuildingCommunity#9785: extend Sort by: dropdown to the three remaining
special-modifier popups. Also guards enchantItem against an empty-list
index that crashed Item.lua:1118 via tooltipFunc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mcagnion mcagnion marked this pull request as ready for review May 12, 2026 17:37
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.

1 participant