Add support for selecting league for Timeless Jewel search #7028
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.
Fixes #6906
Description of the problem being solved:
Adds a trade league dropdown to the timeless jewel search. Given the user does not interact with the dropdown, the current behavior is kept and we create the trade url without the league name which defaults to the current base league. The dropdown is setup to show this same league on load so as to avoid confusion. Once any value is selected, that league specifically is added to the url.
The realm is hardcoded to PC, which is the same behavior we have today, but we need to supply a realm to get leagues. A lot of this code is similar to what's in TradeQuery.lua (~line 350) but I wasn't sure if there was a clean way to strip that out to reuse. I have it sorting to have Affliction be at index 1, and maybe we'd also like that for the Trade popup in the ItemsTab.
I also added "Solo" in the filter in TradeQueryRequests so "Solo Self-Found" is not shown for this dropdown nor the Trade for Items popup.
Considerations:
It makes a call out for realms every single time you open the timeless jewel search, maybe it should be moved somewhere in TreeTab to happen only once?Steps taken to verify a working solution:
After screenshot: