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
Angular: Add type support for Angular's input signals #26413
Angular: Add type support for Angular's input signals #26413
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 607e2bf. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
d30c517
to
8181266
Compare
fd040d1
to
762a61f
Compare
@valentinpalkovic compodoc 1.1.24 has been released 👏 for @vogloblinsky. I just tried Angular disabled = input(false, { transform: booleanAttribute }); Compodoc JSON ( "propertiesClass": [
{
"name": "disabled",
"defaultValue": "input(false, { transform: booleanAttribute })",
"deprecated": false,
"deprecationMessage": "",
"type": "",
"optional": false,
"description": "",
"line": 15
},
... Storybook Thank you so much. |
Closes #25784
What I did
Support the new signal-based input function in Angular 17.2 and upwards in Storybook's helper types as
StoryObj
orStoryFn
. I also ensured that TypeScript doesn't complain in Angular versions that don't support this feature.Please be aware, that controls might not reflect the proper types when Signals are used. For component and property analysis, we are relying on compodoc. There is a PR, which adds signal-based input support, but the change isn't released yet. In the meantime, you would have to manually set the
argTypes
as described here: https://storybook.js.org/docs/api/arg-typesChecklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
src/stories/frameworks/angular_angular-cli-prerelease/signal/button.stories.ts
size
argument gets properly inferredDocumentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-26413-sha-81812663
. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-26413-sha-81812663 sandbox
or in an existing project withnpx storybook@0.0.0-pr-26413-sha-81812663 upgrade
.More information
0.0.0-pr-26413-sha-81812663
valentin/add-input-support-for-angular
81812663
1710166666
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=26413