Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret block "Reveal" button is non-functional in MultiEditor #2678

Open
MaxPat931 opened this issue Dec 22, 2023 · 2 comments · May be fixed by #4985
Open

Secret block "Reveal" button is non-functional in MultiEditor #2678

MaxPat931 opened this issue Dec 22, 2023 · 2 comments · May be fixed by #4985
Assignees
Labels
bug Functionality which is not working as intended
Milestone

Comments

@MaxPat931
Copy link
Contributor

Clicking Reveal silently fails in Item Description with multieditor

RevealYourself.webm

Also, should the Reveal button display when an Item is expanded as well as in the Item Sheet?

Some tables do give Observer access to all their party's actors, so there may be an instance where a player wants to hide information about an Item or Feature from the other players, but still be able to easily reveal it later on

@kgar
Copy link
Contributor

kgar commented Dec 26, 2023

I have encountered this as well.

Here is where secrets.js is unable to find [data-edit] and cannot trigger the callback to toggle Reveal/Hide:

image

image

Here is a sample of what the DOM looks like where the secrets code is checking:

image

@Fyorl Fyorl added the bug Functionality which is not working as intended label Dec 30, 2023
@Fyorl Fyorl added this to the D&D5E 4.1.0 milestone Oct 1, 2024
@arbron arbron modified the milestones: D&D5E 4.1.0, D&D5E 4.2.0 Nov 11, 2024
@arbron arbron self-assigned this Jan 11, 2025
@arbron
Copy link
Collaborator

arbron commented Jan 11, 2025

The reveal secret button is also locked whenever the sheet is locked, so it currently doesn't work either for items without the multi-editor.

arbron added a commit that referenced this issue Jan 11, 2025
Fixes the issues with reveal buttons for secret blocks for items
and actors that use multiple description editors. This required
overriding `_getSecretContent` and `_updateSecret` to look for
`data-target` in addition to `data-edit`. The locking code was
also modified to avoid disabling the secret button when the sheets
are in play mode.

There is a still a bug with the PC sheet and the item sheets with
only a single description (like classes), which don't retain the
secret state if the play/edit toggle is changed immediately after
changing the secret state. This appears to be because when it
submits `FormDataExtended` is fetching old data from the editor
instances on the sheet.

Closes #2678
@arbron arbron modified the milestones: D&D5E 4.2.0, D&D5E 4.3.0 Jan 20, 2025
arbron added a commit that referenced this issue Jan 21, 2025
Fixes the issues with reveal buttons for secret blocks for items
and actors that use multiple description editors. This required
overriding `_getSecretContent` and `_updateSecret` to look for
`data-target` in addition to `data-edit`. The locking code was
also modified to avoid disabling the secret button when the sheets
are in play mode.

There is a still a bug with the PC sheet and the item sheets with
only a single description (like classes), which don't retain the
secret state if the play/edit toggle is changed immediately after
changing the secret state. This appears to be because when it
submits `FormDataExtended` is fetching old data from the editor
instances on the sheet.

Closes #2678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants