Add sorting to enchant, corrupt, and implicit popups#9848
Open
mcagnion wants to merge 1 commit into
Open
Conversation
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>
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.
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. Thedata.powerStatListtransform 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:1118on tooltip hover).Steps taken to verify a working solution:
TestTradeQueryCurrency_spec.lua: GetTotalPriceString aggregates prices, unrelated to this change.After screenshot: