Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

[BUG] Pop-up settings working properly? #67

Closed UnoriginalDM closed 2 years ago

UnoriginalDM commented 2 years ago

Hello, the settings for the pop-up "Display separate pop-up for Portrait and Token art" and "Disable prompt between Portrait and Token art select" have slightly confusing descriptions and may have an issue.

Current Operation:

  1. When both settings are off, after selecting an image from the Token Variant window the token image is updated to the new image while the portrait stays the same. Only the Token Variant pop-up comes up there are no other prompts. (I believe this is the intended operation)

image

  1. When "Display separate pop-up for Portrait and Token art" is on only, a pop-up appears asking if you would like to set the portrait art as the same the token after you select a token from the Token Variant art selection. Pressing accept, both the token and portrait image is updated. (I believe this is not the intended operation. In the past I could of sworn that two token variant selection windows would appear stacked on top of one another. The first would be the portrait selection and the next would be token selection) EDIT: I noticed that you changed up the code a bit from early versions and this looks to be operating as intended. After you decline the pop-up asking "Portrait -> Token, Apply the same art to the token?" another selection window appears to set the token image.

image

  1. When both "display separate pop-up for Portrait and Token art" and Disable prompt between Portrait and Token art select" are on, it only sets the portrait art and does not update the token image. (I believe this is not the intended operation, it should update both right) image
Aedif commented 2 years ago

Yes it's a bit confusing...

You need to understand that these settings are relevant in two situations: Actor creation, and Token creation.

When neither of the settings are enabled and an automatic pop-up is triggered during Actor creation both the Portrait and the Token image will be set to one and the same. When the automatic pop-up is triggered during Token creation only the token image will be changed. This seemed like the most sensible setup to me.

Display separate pop-ups for Portrait and Token art will make sure that the user always gets the option to select BOTH the Portrait and the Token image. Whether the automatic pop-up is shown during Actor creation or Token creation the user will first be shown a Portrait select window:

image

and once the image is selected, the user will then be shown a Token select window:

image

All the prompt between these two windows does is gives the user the options to skip the 'Select Token Art' and apply the same image that the user just selected in the 'Select Portrait Art' window.

Disable prompt between Portrait and Token art select just removes the prompt meaning that the 'Select Token Art' window will never be skipped.

(1) and (2) are behaving as expected.

(3) With both settings on you should get both 'Select Portrait Art' and 'Select Token Art':

https://user-images.githubusercontent.com/7693704/173094045-7e5247c6-5b8d-445c-a169-c7668a4808a7.mp4

UnoriginalDM commented 2 years ago

Ah okay I see now so what is happening when I have both of the options checked. After I select the portrait, the token pop-up window does come up but closes right away. This occurring in a fresh world with no other mods.

https://user-images.githubusercontent.com/77896718/173195546-69e7b8ba-0276-48d6-88dd-768ddc5e78ba.mp4

Aedif commented 2 years ago

Mind running the following in the console and showing me the output?:

game.modules.get("token-variants").api.TVA_CONFIG

You could also use the export button.

This will include all of your settings.

Also what's your foundry version?

UnoriginalDM commented 2 years ago

I am on ver 9 build 269 token-variants-settings.zip

game.modules.get("token-variants").api.TVA_CONFIG {debug: false, disableNotifs: false, searchPaths: Array(1), forgeSearchPaths: {…}, parsedSearchPaths: Map(5), …} actorDirectoryKey: "Control" algorithm: exact: false fuzzy: true fuzzyArtSelectPercentSlider: true fuzzyLimit: 50 fuzzyThreshold: 0.3

compendiumMapper: autoDisplayArtSelect: true cache: false diffImages: false incKeywords: true missingOnly: false showImages: true syncImages: false

debug: false disableNotifs: false enableStatusConfig: false excludedKeywords: "and,for" forgeSearchPaths: tempUser: {paths: Array(0), apiKey: ''}

hud: alwaysShowButton: false displayAsImage: false enableSideMenu: false imageOpacity: 50 includeWildcard: false updateActorImage: false

imgurClientId: "" keywordSearch: true parsedExcludedKeywords: Array(2) 0: "and" 1: "for" length: 2

parsedSearchPaths: Map(5) [[Entries]] 0: {"data" => Array(1)} 1: {"s3" => Map(0)} 2: {"rolltable" => Array(0)} 3: {"imgur" => Array(0)} 4: {"forgevtt" => Array(0)} size: 5

permissions: hud: {1: true, 2: true, 3: true, 4: true} hudFullAccess: {1: false, 2: false, 3: true, 4: true} image_path_button: {1: false, 2: false, 3: true, 4: true} popups: {1: false, 2: false, 3: true, 4: true} portrait_right_click: {1: false, 2: false, 3: true, 4: true}

popup: characterDisable: false disableAutoPopupOnActorCreate: false disableAutoPopupOnTokenCopyPaste: false disableAutoPopupOnTokenCreate: false npcDisable: false twoPopups: true twoPopupsNoDialog: true vehicleDisable: false

randomizer: actorCreate: false characterDisable: false diffImages: false keywords: false linkedActorDisable: true npcDisable: false popupOnDisable: false representedActorDisable: false shared: false syncImages: false tokenCopyPaste: false tokenCreate: false tokenName: true vehicleDisable: false

runSearchOnPath: false searchFilters: generalFilterExclude: "" generalFilterInclude: "" generalFilterRegex: "" portraitFilterExclude: "" portraitFilterInclude: "" portraitFilterRegex: "" tokenFilterExclude: "" tokenFilterInclude: "" tokenFilterRegex: ""

searchPaths: Array(1) 0: {text: 'Vtt-Storage/tokens/Top-Down/Forgotten-Adventures', cache: true} length: 1

staticCache: false tilesEnabled: false tokenConfigs: Array(0) length: 0

worldHud: disableIfTHWEnabled: false displayOnlySharedImages: false includeKeywords: false includeWildcard: true updateActorImage: false useNameSimilarity: false

Aedif commented 2 years ago

Weird... I'm unable to reproduce this. Are you running foundry on a browser by any chance? If so could you tell me what browser it is?

UnoriginalDM commented 2 years ago

I am. I use firefox and chrome. The issue happens on both of them. Very weird.

The server is run out of Molten-Hosting.

Aedif commented 2 years ago

Sorry I just can't reproduce this. The only thing I can think of is if perhaps you're double-clicking, or for some resons the browser or the mouse you're using is performing double-clicks?

UnoriginalDM commented 2 years ago

Yeah, it is very weird. I have tried my server on another computer and also have switched mice. Not sure why it keeps happening, if I figure it out I will keep you posted.

Aedif commented 2 years ago

Ah, Decided to give it another go and I think I reproduced it. Still don't know what is causing it but I can at least start testing things out.

Seems like performing a search before selecting an image is important to cause the bug.

Aedif commented 2 years ago

Found the culprit.

Try updating to release 2.9.1. The issue should be resolved.

UnoriginalDM commented 2 years ago

Issue fixed! Thank you very much.