Core Loot Manager DKP & EPGP & SK

Core Loot Manager DKP & EPGP & SK

1M Downloads

Remove the 'Okay' button when submitting a bid.

Chalos-Atiesh opened this issue · 5 comments

commented

Is your request related to a problem? Please describe.
The user has to click two buttons to submit a bid. Two clicks increases the chances the user will forget to click the 'Okay' or 'Bid' buttons leading to missed bids and items.

Describe the solution you'd like
The Blizz LUA API supports OnTextChanged callbacks for EditBox:SetCallback('OnTextChanged', ...). Adopt that for the bid text box.
https://wowwiki-archive.fandom.com/wiki/UIOBJECT_EditBox

Describe alternatives you've considered
It's a fairly simple and straightfoward adoption. I don't think alternatives are necessary.

Additional context
It can be done like so. Instead of having the callback bound to the 'Okay' button it is just set as a callback.
https://github.com/Chalos-Atiesh/GuildTradeskills/blob/46dd5eab87fc896bc7ced05e163c33f7d0f8f84a/Modules/Search.lua#L915

commented

CLM uses ACE3 as base GUI library. This is a known limitation and will be changed if we will be able to move out of it one day.

So your suggestion is to add additional callback and auto-store the value after any edit?

commented

It's been a minute since I wrote that but ACE3 supports callbacks as well.
https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0
local AceGUI = LibStub('AceGUI-3.0') local editBox = AceGUI:Create('EditBox') editBox:SetCallback('OnTextChanged', function(widget, event, value) -- Do things. end)
I don't think storing it is necessary. Just a simple input validation for the callback should be enough. Though I think EditFields can even be input restricted to only numeric characters. When the user hits the 'Bid' button you can grab the value directly from the EditBox.

commented

Rather than using the callback on the "Okay" button to store the bid value, remove the Okay button and use the onChange event instead. If the concern is making a validation call on each key press rather than just once on button click, a debounce of 300ms can be used. I'm sure @Chalos-Atiesh or I would be willing to do a merge request if that helps.

commented

The blocker here is the fact that I used AceConfig for the UI.

But given the fact that my feature backlog is nearly non-existent and this is a huge QoL change I think I will rework the Bidding UI to use AceGUI and address those pain-points.

Thanks for bringing my attention to this. I will prioritise it quite high.

commented

I see! That would make it more difficult lol
After giving this some more thought I'm not sure that a callback or debouncer is necessary if all that's happening is the value being tossed into storage. If that's the case then the value could just be grabbed directly from the EditBox when the user hits the Bid button.