-
Notifications
You must be signed in to change notification settings - Fork 478
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
fix(addon-doc): DocAPIItem
throws error for signal-based output handlers
#10292
base: main
Are you sure you want to change the base?
Conversation
Failed tests ❌Before (main) ← Diff → After (local)tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium-retry2/dropdown-mobile-with-select.diff.png(updated for commit 499ac55) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10292 +/- ##
=======================================
Coverage 65.77% 65.77%
=======================================
Files 1241 1241
Lines 16232 16232
Branches 2382 2343 -39
=======================================
Hits 10676 10676
- Misses 5242 5311 +69
+ Partials 314 245 -69
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Visit the preview URL for this PR (updated for commit 499ac55): https://taiga-previews-demo--pr10292-doc-api-item-error-demo-69uc3ogo.web.app (expires Sat, 01 Feb 2025 10:44:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 73dddc3c665194f3e11f18c16aeb71af4c289c37 |
BundleMonUnchanged files (5)
No change in files bundle size Unchanged groups (1)
Final result: ✅ View report in BundleMon website ➡️ |
@@ -71,7 +71,7 @@ export class TuiDocAPIItem<T> implements OnInit { | |||
@Output() | |||
public readonly valueChange = new EventEmitter<T>(); | |||
|
|||
public ngOnInit(): void { | |||
public ngAfterViewInit(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or should it be constructor? Since it's a snapshot that doesn't change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, i'll investigate it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this function also uses input properties – constructor
is not an option
taiga-ui/projects/addon-doc/components/api/api-item.component.ts
Lines 59 to 60 in 499ac55
@Input() | |
public name = ''; |
taiga-ui/projects/addon-doc/components/api/api-item.component.ts
Lines 94 to 95 in 499ac55
private parseParams(params: Params): void { | |
const name = this.clearBrackets(this.name); |
Reproduction
Add the following code to any API documentation page:
Open http://localhost:3333/components/any/API?debug=42
It throws