[AddOn] crafty - profession name filter

[AddOn] crafty - profession name filter

by Bit » Mon Feb 15, 2016 4:11 am

Everyone who's used the default interface for professions will know that it is very very bad and the most obvious shortcoming is the lack of a name filter.

There's a vanilla addOn, cg_crafty, that adds such a filter and I've been using it for years. Unfortunately the thing is terribly clumsy so I've finally decided to make some improvements:

The results automatically update as you type.
The matching is fuzzy (like aux' old autocomplete)
The first entry in the list (best match) is automatically selected.
Left clicking the "name" button will rotate between search modes.
Left clicking the link button will link the mats for the selected entry to party or /r if not in a party.
Right clicking the link button will open a popup for entering a character name or channel.
The availability count is properly updated.
Cleaned up code, removed all dependencies.

Image

As always, the code is on github: https://github.com/shirsig/crafty
Last edited by Bit on Sat Mar 19, 2016 2:54 pm, edited 11 times in total.
Bit
Sergeant Major
Sergeant Major
 

Re: [AddOn] crafty - profession name filter

by Altoholic » Tue Feb 16, 2016 9:40 am

Just when i was searching for exactly that <3
Altoholic
Sergeant
Sergeant
 

Re: [AddOn] crafty - profession name filter

by modernist » Tue Feb 16, 2016 10:59 pm

this is great. one suggestion — can you add an option so the edit box isn't automatically active upon opening the panel? finding it breaks the flow of linking enchant mats/talking in chat, and i have to fumble to hit escape
modernist
Sergeant Major
Sergeant Major
 

Re: [AddOn] crafty - profession name filter

by Bit » Wed Feb 17, 2016 12:00 am

Well, you could just delete line 261 in the current version but I hope there is a better solution.

I could prevent it only from stealing focus from the ChatFrameEditBox, but I'm not sure if that's always desirable.

edit: actually it probably is, so I've done that now

Don't you usually have to search first anyway? What exactly is your flow that it's breaking (like really step by step)?
Last edited by Bit on Wed Feb 17, 2016 12:07 am, edited 1 time in total.
Bit
Sergeant Major
Sergeant Major
 

Re: [AddOn] crafty - profession name filter

by Roadblock » Wed Feb 17, 2016 12:06 am

I haven't looked at the code but I believe clearing focus on enter if it's an empty search box would make for the most intuitive usage.
Astaldo @ Nostalrius PvE (Alliance)
Addons I've posted on Forum
User avatar
Roadblock
Senior Sergeant
Senior Sergeant
 

Re: [AddOn] crafty - profession name filter

by modernist » Wed Feb 17, 2016 12:17 am

Bit wrote:Well, you could just delete line 261 in the current version but I hope there is a better solution.

I could prevent it only from stealing focus from the ChatFrameEditBox, but I'm not sure if that's always desirable.

edit: actually it probably is, so I've done that now

Don't you usually have to search first anyway? What exactly is your flow that it's breaking (like really step by step)?


A large number of my tradeskill transactions revolve around the top 8 or so recipes in the scroll frame, and I'll usually need to link said recipe in chat to the prospective buyer. The flow would be something like

Invite > "hey" > meet > open tradeskill > link +30 sp recipe in chat > trade items > enchant

between 4 and 5 add several seconds of me adding "/p okay you need..." to this searchbar before swearing and clicking escape to un-focus it.

This might also extend to doing a search and then trying to link the result to chat, depending on whether the search box loses focus upon hitting return. Can't test whether this is the case right now though
modernist
Sergeant Major
Sergeant Major
 

Re: [AddOn] crafty - profession name filter

by Bit » Wed Feb 17, 2016 12:21 am

Roadblock wrote:I haven't looked at the code but I believe clearing focus on enter if it's an empty search box would make for the most intuitive usage.

But it would be inconsistent not to try and craft the selection then. Plus it's sometimes useful to craft with enter even without having done a search.

@modernist
The focus steal prevention should now solve this issue if you open the chat before the craft or the slash exception I've added if you wanna do "/p" after opening the craft.
By the way, you can use the "link" button to link the mats more conveniently or now with the new feature I've just added shift-enter to link the selection.
Last edited by Bit on Wed Feb 17, 2016 3:21 am, edited 2 times in total.
Bit
Sergeant Major
Sergeant Major
 

Re: [AddOn] crafty - profession name filter

by Bit » Wed Feb 17, 2016 1:12 am

Made another small addition. To summarize:
  • No more focus stealing if the chat editbox is opened
  • Typing slash in the searchbox will open the chat editbox and put a slash in it
  • Hitting shift-enter in the searchbox will link the mats of the selection (to party or if not in a party then to /r)


edit: decided to remove auto focus after all (very annoying when walking around)
Changed enter to simply clear focus like escape.
Improved the link button (left click will directly link to party or /r now, only right click will open the menu)

If you liked the shortcuts/auto focus just stay with the last version.
Bit
Sergeant Major
Sergeant Major
 


Return to Addons & macros