From 95d4003045e4451181831c93ecdcdcce8140aee7 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Wed, 11 Feb 2026 23:56:35 +0100 Subject: [PATCH] Fixed so that messages auto expand the description (#1650) --- module/applications/dialogs/deathMove.mjs | 1 - module/applications/dialogs/downtime.mjs | 6 +++++- module/data/fields/actionField.mjs | 5 ++++- system.json | 2 +- templates/ui/chat/action.hbs | 2 +- templates/ui/chat/deathMove.hbs | 2 +- templates/ui/chat/downtime.hbs | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index a9141158..69ff758e 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -200,7 +200,6 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV description: game.i18n.localize(this.selectedMove.description), result: result, open: autoExpandDescription ? 'open' : '', - chevron: autoExpandDescription ? 'fa-chevron-up' : 'fa-chevron-down', showRiskItAllButton: this.showRiskItAllButton, riskItAllButtonLabel: this.riskItAllButtonLabel, riskItAllHope: this.riskItAllHope diff --git a/module/applications/dialogs/downtime.mjs b/module/applications/dialogs/downtime.mjs index 9a9a9ddb..4c01c2a9 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -196,6 +196,9 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV .filter(x => x.testUserPermission(game.user, 'LIMITED')) .filter(x => x.uuid !== this.actor.uuid); + const autoExpandDescription = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance) + .expandRollMessage?.desc; + const cls = getDocumentClass('ChatMessage'); const msg = { user: game.user.id, @@ -216,7 +219,8 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV actor: { name: this.actor.name, img: this.actor.img }, moves: moves, characters: characters, - selfId: this.actor.uuid + selfId: this.actor.uuid, + open: autoExpandDescription ? 'open' : '' } ), flags: { diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index 4cadeac4..89c3c287 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -262,6 +262,9 @@ export function ActionMixin(Base) { } async toChat(origin) { + const autoExpandDescription = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance) + .expandRollMessage?.desc; + const cls = getDocumentClass('ChatMessage'); const systemData = { title: game.i18n.localize('DAGGERHEART.CONFIG.FeatureForm.action'), @@ -290,7 +293,7 @@ export function ActionMixin(Base) { system: systemData, content: await foundry.applications.handlebars.renderTemplate( 'systems/daggerheart/templates/ui/chat/action.hbs', - systemData + { ...systemData, open: autoExpandDescription ? 'open' : '' } ), flags: { daggerheart: { diff --git a/system.json b/system.json index b753b540..96636bab 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.7.0", + "version": "1.7.1", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/ui/chat/action.hbs b/templates/ui/chat/action.hbs index 65bb0762..2854795c 100644 --- a/templates/ui/chat/action.hbs +++ b/templates/ui/chat/action.hbs @@ -1,5 +1,5 @@