FrancoisMentec / PoE-Impact-Trading

A browser extension that show you the impact an item has on your build.
55 stars 6 forks source link

Feature idea: Allow users to generate impact for a selected item #11

Closed tamaroth closed 2 years ago

tamaroth commented 2 years ago

Hi,

I've come to realization, that it would be great if there was an option to have the impact be disabled by default and then each item would have a button to dynamically load its impact.

Reasoning: I often find myself that I search for items with specific parameters and after the result is loaded, I sort the items by one of its properties (instead of the default price). This basically resets the loading process. Then I start browsing from the top until I find something that I might be interested in. If it's an item that is further down the list, I have to wait quite long for the impact to show up. I was thinking that it would be great if there was an option to have it disabled by default and then each item that is listed would have a button that would load the impact for that specific button, this way we wouldn't need to needlessly load impact for all the items on the page.

FrancoisMentec commented 2 years ago

Hi, your comment made me realize pob.party had been updated so my extension is back in business, so happy about that ^^ So I totally understand what you want, and I encountered those issues myself in the past. I'll add a switch that saves its state across the tabs so you don't have to disable it every time on every tab, I'll add a load impact button for each item individually if it's clicked when the impact is disabled it'll just compute the impact for the item, but if it's enabled, it'll jump the item on top of the stack. I hope I'll be able to do that by the end of next week, but my schedule is pretty tight right now. Maybe in the train this WE, but no promise.

tamaroth commented 2 years ago

Thanks, that sounds like a great solution. No pressure, take your time. Thanks for developing such a useful tool!

FrancoisMentec commented 2 years ago

@tamaroth So I implemented the button to compute the impact for a specific item only if automatic computation isn't enabled. If automatic computation is enabled it isn't available, it would require reworking the way I stack input events in pob.party. I've also made a few improvements like storing the state of automatic computation so you don't have to disable it every time you open a new tab if you don't want it. Also, I added an item filter (more detail in the README), and a few improvements like clearing the stack when a new search is made (can't believe I wasn't doing it).

Also impact computation is much faster on Chrome if pob.party is visible, but it's always as fast on firefox (firefox isn't up to date, I've lost my credentials and I have 15 times fewer users over there). I believe chrome is doing some kind of optimization that slows down pob.party if not visible, but I have no idea how to prevent it.

Anyway, if you encounter any bugs or you got feedback, don't hesitate to share.

tamaroth commented 2 years ago

Hey, thanks a lot. Just tried it, works like a charm!

As for slowing down, I think it comes mostly to the fact that Chrome likes to put tabs to sleep when they're not focused. But I'm not certain if this can be somehow manipulated with.

Again, thanks for blazing fast implementation, you're doing a great job!