Dalamud icon indicating copy to clipboard operation
Dalamud copied to clipboard

Fix plugin entries staying open across tabs

Open attickdoor opened this issue 3 years ago • 7 comments

Current behavior: Plugin listing at index i will be open on all tabs if opened on any tabs. Fix: Push ID of current tab before drawing.

attickdoor avatar Sep 21 '21 19:09 attickdoor

Did you test this? Because the issue is actually caused by the openPluginCollapsibles list being shared across tabs (I was lazy).

An easy way to fix this would be to call Clear() on the list whenever tabs are switched.

goaaats avatar Sep 21 '21 19:09 goaaats

the quick fix is to probably change openPluginCollapsibles to be internalName + some other identifier

daemitus avatar Sep 21 '21 19:09 daemitus

or internalName+version, and append to the dictionary on update so it stays open.

daemitus avatar Sep 21 '21 19:09 daemitus

An easy way to fix this would be to call Clear() on the list whenever tabs are switched.

I think having persistence between tabs is a good idea.

or internalName+version, and append to the dictionary on update so it stays open.

Right now I'm doing internalName + version, though this introduces a minor edge case where an installed dev plugin can also exist in other tabs, causing it to mirror its state on both tabs. If that's acceptable then I'll push again.

attickdoor avatar Sep 21 '21 19:09 attickdoor

I guess the general issue is "a plugin that can exist in multiple tabs at the same time will have its state mirrored", but I can't see a good way around that with the information available to the function.

attickdoor avatar Sep 21 '21 20:09 attickdoor

In the pending pr I've got open, I'm passing the plugin in too, so we could conditionally add in the dll file path, and other stuff to differentiate between dev, normal, available and installed

On Tue, Sep 21, 2021, 4:01 PM attick @.***> wrote:

I guess the general issue is "a plugin that can exist in multiple tabs at the same time will have its state mirrored", but I can't see a good way around that with the information available to the function.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/goatcorp/Dalamud/pull/581#issuecomment-924339776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMTBFNFSJZIPIKOOWVTATUDDQARANCNFSM5EPM7VSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

daemitus avatar Sep 21 '21 20:09 daemitus

That would work. I don't think it'd be particularly worth it to pass that data in just to fix the entries being open, but if you're using it for something else then I'll gladly make use of it. I suppose I'll wait until your PR is merged.

attickdoor avatar Sep 21 '21 20:09 attickdoor

Given that this PR seems to have gone stale, I think it makes sense to close it for now. If this is still a problem and/or we still want this in the future, feel free to reopen it.

KazWolfe avatar Sep 12 '23 16:09 KazWolfe