Skip to content

fix: input and output signals are listed in properties#1549

Merged
vogloblinsky merged 2 commits intocompodoc:developfrom
sonallux:fix/input-output-signals
Mar 17, 2025
Merged

fix: input and output signals are listed in properties#1549
vogloblinsky merged 2 commits intocompodoc:developfrom
sonallux:fix/input-output-signals

Conversation

@sonallux
Copy link
Contributor

@sonallux sonallux commented Feb 4, 2025

Currently all input, output and model signals are listed twice in the properties section and in the inputs or outputs section. See this screenshot after running npm run test:simple-doc:

image

This PR fixes this bug by removing the entry in the properties section if it is a input, output or model signal. See this screenshot with this fix applied.

image

If I should add tests for this change, could you please give me an advice where I can find the corresponding test file.

@sonallux
Copy link
Contributor Author

sonallux commented Feb 5, 2025

Hi @vogloblinsky this PR fixes the current issues with input, output and model signals. This is causing issues with the Storybook Controls Addon (see storybookjs/storybook#28412), which gets fixed by this PR.

@vogloblinsky
Copy link
Contributor

Hi,
Is it possible to add a unit test for the signal you added in the fixtures ?
Thanks

@sonallux
Copy link
Contributor Author

sonallux commented Feb 5, 2025

Hi,
Is it possible to add a unit test for the signal you added in the fixtures ?
Thanks

Yes sure, can you give me a hint where I must add the unit test?

@sonallux sonallux force-pushed the fix/input-output-signals branch from ade5312 to ecbf4da Compare February 5, 2025 16:36
@vogloblinsky
Copy link
Contributor

https://github.com/compodoc/compodoc/blob/develop/test/src/cli/cli-generation.spec.ts works with the folder ./test/fixtures/sample-files/where you update one fixture

@sonallux sonallux force-pushed the fix/input-output-signals branch from ecbf4da to 22a3bc7 Compare February 6, 2025 08:01
@sonallux
Copy link
Contributor Author

sonallux commented Feb 6, 2025

https://github.com/compodoc/compodoc/blob/develop/test/src/cli/cli-generation.spec.ts works with the folder ./test/fixtures/sample-files/where you update one fixture

Thank you for the hint. I have added tests.

@sonallux
Copy link
Contributor Author

@vogloblinsky is there anything else needed to get this PR merged?

@rojasjandro89
Copy link

Please someone give some love to this PR before it becomes stale. This is one of the most critical issues with Compodoc now that Angular seems to have embraced signals.

@pburgmer
Copy link

pburgmer commented Mar 3, 2025

I would also love to see it merged and released soon.

@Cybertron01Z
Copy link

@vogloblinsky Sorry to tag you again, but it would be fantastic if this PR could be merged soon 🙂

@vogloblinsky vogloblinsky merged commit f060df5 into compodoc:develop Mar 17, 2025
1 check passed
@vogloblinsky
Copy link
Contributor

Thanks a lot for the PR

@sonallux sonallux deleted the fix/input-output-signals branch March 17, 2025 22:17
@vogloblinsky
Copy link
Contributor

Unit tests are wrong, but may be not in sync with last developments, i will fix that asap.

@sonallux
Copy link
Contributor Author

sonallux commented Apr 1, 2025

Hey @vogloblinsky what is the current progress of this? When can we expect a new release containing this PR?

@lztetreault-dev
Copy link

@vogloblinsky will this be released to NPM soon? We really need this fix for storybook.

@kklimczak
Copy link

I built it locally and linked it to the project with a storybook and works like a charm.
image
image

@rojasjandro89
Copy link

@kklimczak cool!!

does it work with inputs with variable default value and transform functions?
For example: input.required(DEFAULT_VALUE, {transform: booleanAttribute})

@kklimczak
Copy link

@rojasjandro89 Is it valid? In my case DEFAULT_VALUE is false.

I get a type error:
image

@rojasjandro89
Copy link

@kklimczak my bad, we can't specify a initial values in a required input. Can you try removing required?

@kklimczak
Copy link

@rojasjandro89
image

@rojasjandro89
Copy link

Is there any info on when we can expect this to be released?

@mokeev1995
Copy link

mokeev1995 commented May 29, 2025

@vogloblinsky

Hi Vincent,
First of all, thanks a lot for your work on this library - it's been super helpful.

I wanted to ask if you have any plans to publish a new release that includes this fix for Angular signals? At the moment, without this fix, Storybook (which depends on your library) can't properly display fields using Angular signals, and it's causing some trouble in my workflow.

Really appreciate your time and effort - let me know if there's anything I can do to help move this forward.

Best regards,
Andrew

@manbearwiz
Copy link
Contributor

@sonallux unit tests are failing in the develop branch and it looks that started with the merger of this PR. I'm guessing that is the reason this hasn't been released to npm yet. Have you looked at this at all?

@manbearwiz
Copy link
Contributor

@sonallux I might have found the issue. You change this function to assign to deps.propertiesClass instead of deps.properties.

src/app/compiler/angular-dependencies.ts

if (IO.properties) {
-  deps.properties = IO.properties;
+  deps.propertiesClass = properties;
}

sonallux added a commit to sonallux/compodoc that referenced this pull request Jun 17, 2025
Followup fix for bug introduced in compodoc#1549
@manbearwiz
Copy link
Contributor

manbearwiz commented Jul 9, 2025

Unit tests are wrong, but may be not in sync with last developments, i will fix that asap.

@vogloblinsky Now that unit tests are fixed, can we please get a new patch version with this change released to npm?

@rojasjandro89
Copy link

rojasjandro89 commented Aug 8, 2025

We need this fix ... badly

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants