From 4fb53d159570a1e2ef7b67fc49b546cd62f652d5 Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Thu, 6 Aug 2026 16:23:02 -0400 Subject: [PATCH] Fix display of module to be the correct module It was previously displaying the module property of the parent of the item being displayed, not the module of the item --- app/components/class-field-description.gjs | 7 +++--- .../class-field-description-test.gjs | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/app/components/class-field-description.gjs b/app/components/class-field-description.gjs index 595dd691..d99c2b67 100644 --- a/app/components/class-field-description.gjs +++ b/app/components/class-field-description.gjs @@ -49,7 +49,7 @@ export default class ClassFieldDescription extends Component { {{svgJar "link" width="20px" height="20px" aria-hidden="true"}} - {{#if @model.module}} + {{#if @field.module}}
Module: @@ -57,9 +57,10 @@ export default class ClassFieldDescription extends Component { @route="project-version.modules.module" @models={{array @model.projectVersion.compactVersion - @model.module + @field.module }} - >{{@model.module}} + data-test-module + >{{@field.module}}
{{/if}} diff --git a/tests/integration/components/class-field-description-test.gjs b/tests/integration/components/class-field-description-test.gjs index 5f7d8a2b..d5700619 100644 --- a/tests/integration/components/class-field-description-test.gjs +++ b/tests/integration/components/class-field-description-test.gjs @@ -28,6 +28,30 @@ module('Integration | Component | class field description', function (hooks) { assert.dom(findAll('.args')[0]).hasText('param1, param2, param3'); }); + test('shows module link from field.module', async function (assert) { + const type = 'method'; + const field = { + name: 'myMethod', + module: '@ember/component', + }; + const model = { + projectVersion: { compactVersion: '6.0' }, + project: { id: 'ember' }, + }; + + await render( + , + ); + + assert.dom('[data-test-module]').hasText('@ember/component'); + }); + test('parameter props are displayed', async function (assert) { const type = 'method'; const field = {