arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
108 stars 14 forks source link

Tooltip reformatting (interaction with other addons) #1087

Open halfreak opened 6 years ago

halfreak commented 6 years ago

I wouldn't really call this a bug report, just trying to understand what's happening and maybe find a solution if at all possible. So I'm attaching two screenshots just to illustrate what I'm talking about. Yes, I know my UI is a mess and my tooltips are even more so, it's all WIP.

So, the issue is when I'm hovering over mini-lists in All The Things (in this case it's profession mini-list for cooking) the tooltips first show addons' info in a certain order, and then, after like half a second, the order changes and the last bit cuts out. So from ATT(1) -> TSM -> Auctionator -> AI -> ATT(2) it becomes TSM -> ATT(1) -> Auctionator -> AI I assume it happens when AI redraws the tooltip to show item count, although it happens even when that setting is turned off. I've tested it with just ATT and AI enabled, and it still cuts off that last bit of tooltip info. Although I cannot blame AI for everything, as I've seen TSM and ATT switch places when hovering over items in default bags with AI disabled. It happens in a split second, a lot faster than in my example, but you can notice it, and nothing seems to cut out, as tooltip border remains constant in size. Well, I'm at a loss. Sorry, I can't be of more help investigating this issue, I haven't played for three years and completely forgotten what little I knew about Lua and WoWApi.

Not that this is a major issue, nothing game breaking, but there is some valuable info in some of these ATT tooltips that gets cuts off, like level and quest requirements or comments on how to obtain something.

Well, even if it can't be solved, I love AI and going to use it. Thanks a lot, live long and prosper!

P.S. Come to think of it, one more question. Is it impossible to completely prevent AI from redrawing tooltips but at the same time preserve its ability to show them in bags? Well, I guess not, or it would already have been implemented. Have to be some custom frames related dark voodoo. Ah, just tell me it's impossible, I'll be fine with it.

wowscrnshot_080718_144632 wowscrnshot_080718_144635

arkayenro commented 6 years ago

AI will only force a redraw if the tooltip was static. if it, or its owner, already has an TooltipUpdate function then it exits and relies on those existing functions to update it instead.

if the order of the text changes without AI loaded then the tooltip is already being refreshed / has TooltipUpdate functions and i shouldnt be reloading it, just adding the itemcount to it and leaving it at that

what happens if you disable TSM? do you lose the ATT(2) that ends up underneath AI?

arkayenro commented 6 years ago

note that the default tooltip update timer value is 0,2 seconds

halfreak commented 6 years ago

Just tried a clean setup with only ATT and AI installed. It still happens. I guess, maybe the guys from ATT are doing something very special with their tooltips? Very strange indeed. Here's a couple more screenshots with a more obvious example.

wowscrnshot_080818_140116 wowscrnshot_080818_140118

arkayenro commented 6 years ago

after looking at their code i think this is whats happening;

the issue is that my code has seen the SetHyperlink and that the tooltip and its owner has no TooltipUpdate function set to it sends a SetHyperlink in 0.5 seconds to refresh it

their RowOnEnter code doesnt run as you didnt enter a row, i just set a hyperlink. its like you moused over that item in your bags so you just get the first section of ATT info added, along with everyone elses info added. the bottom section of ATT text isnt added for moused over items, only from rows

the way around it is for them to set a tooltipUpdate value (how often to update the tooltip) and a TooltipUpdate function in the owner (the row) that points to RowOnEnter

alternatively they could just use an empty function, not update the tooltip, and arkinv would leave it alone

halfreak commented 6 years ago

Great, thanks for the answer, it all starts to make sense now. I'll try to contact ATT team with a reference to this thread.

Lucetia commented 6 years ago

Just to chime in as he made a post on our github. The issue at hand was actually caused by the put out on August 6th

r762 | arkayenro | 2018-08-06 15:24:27 +0000 (Mon, 06 Aug 2018) | 4 lines Changed paths: M /trunk/ArkInventory.lua M /trunk/ArkInventory.toc M /trunk/ArkInventoryUpgrades.lua M /trunk/Modules/ArkInventoryConfig/ArkInventoryConfig.lua M /trunk/VersionHistory.txt

Many users in our discord noticed the tooltip breaking all of a sudden and it was narrowed down to that specific update. Once they reverted the issue was solved. Even using past versions of ATT the issue still persisted so it was something to do with tooltip updates in the r762 version that caused a breakage. One of our users found this thread https://github.com/arkayenro/arkinventory/issues/1079 reported by others were it was breaking various addons and seems there was an attempt to fix it and not sure if your commits after that fixed it. I pulled the latest version (3.08.10) from Twitch just now and the problem is still there. From what I've seen it started with 3.08.08

halfreak commented 6 years ago

Well, as I've already said in ATT's thread, I won't be pushing this any further. It's perfectly understandable if neither you nor Lucetia want to make changes to provide compatibility. It's your work, it's your vision and I respect that.

Darkloke commented 6 years ago

I would like to add something regarding tooltips... Is it possible to integrate both AI and TSM price tooltips for battle pets. For now only one of them works in the same time, so if i want to check if i already have a such pet (and what level) while buying from AH - i am enabling AI tooltip. If i want to check their price through TSM - i need to disable AI one.

arkayenro commented 6 years ago

i posted the fix for ATT in the other thread, its one line so it shouldnt be difficult

arkayenro commented 6 years ago

Is it possible to integrate both AI and TSM price tooltips for battle pets.

i dont touch the blizzard battlepet tooltip because its not a tooltip, its a custom frame they built for it. adding a frame to it is convoluted if there are multiple mods doing the same thing, you have to code for conflicts and work out whos already there and where you need to place your frame with your info in relation to them

for my custom battlepet tooltip i did add a function that can be hooked by other mods if they want to add stuff to it, but its up to them if they want to add it or not

ArkInventory.API.CustomBattlePetTooltipReady

Calesta commented 6 years ago

Seems to be happening with other addons as well. When I have Outfitter equipped, the AI tooltips appears a second after hovering over an icon but they are often on the border of the tooltip or below.

text outside tooltip

Do we need to post in other addon threads like some did with ATT above? Does that help or just cause more headaches?

arkayenro commented 6 years ago

i've got outfitter enabled and dont have any issues with it. what exactly are you mousing over and where?

Calesta commented 6 years ago

The screenshot above are my currently equipped gloves. Hovering over them in the character pane.

Calesta commented 6 years ago

I can't say for sure it's Outfitter but when I turned it off to reduce the number of equipment sets listed, the tooltip seems just fine.

arkayenro commented 6 years ago

whats odd about that tooltip is that outfitter is in between the durability and price, i thought those were part of he base tooltip, which typically means you cant get in between

its a standard tooltip though and i double checked and it refreshes by itself, so im not touching it for that purpose so that issue appears to be an outiftter one

Calesta commented 6 years ago

Thanks Arkayenro for the response. I created a thread over on the Outfitter project page with hopes that it will be read, investigated, and perhaps addressed.

Sabrejack commented 6 years ago

I have another addon interaction. If Angry World Quests, Pawn, and ArkInventory are all in use, and you mouseover a loot item in the AWQ sidebar on the world map, after a short moment an extra blank line will be added after the word "Rewards," which pushes the Pawn info off the frame. Is this a related issue?

arkayenro commented 6 years ago

possibly but i would have thought pawn would update the tooltip size

is it on items that you dont have so theres no item count for it?

Sabrejack commented 6 years ago

I don't have these items, but I haven't tried on a duplicate yet. I've also discovered I get one blank line for each Pawn scale I have enabled on the tooltip. It doesn't happen with just AWQ and Pawn. It also doesn't happen with just Pawn and ArkInventory, if for example I mouseover blizz's quest numbers on the map itself.

Edit: I had the chance to see one that's already in my inventory and the extra lines still happen.