-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
refactor(editor): Add typed event bus (no-changelog) #10367
Conversation
/** | ||
* Creates a new event bus to be used with the `FormInputs` component. | ||
*/ | ||
export const createFormEventBus = createEventBus<FormEventBusEvents>; |
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.
considering that we have so many other instances of createEventBus
, do we plan to create a typed alias for each of them? if not, perhaps we should remove this, and use createEventBus<FormEventBusEvents>()
instead of createFormEventBus()
?
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.
I think it makes sense to have an aliased create function for cases where it's used for a common component. For example for the FormInputs
and for modals. I could move this to the FormInputs
component file so it's closer to usage.
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.
I still think that once we migrate all other event buses to be typed, creating aliases for each would seem too verbose. but we can talk about that after we finish porting over the rest of the code.
/** | ||
* Creates a new event bus to be used with the `FormInputs` component. | ||
*/ | ||
export const createFormEventBus = createEventBus<FormEventBusEvents>; |
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.
I still think that once we migrate all other event buses to be typed, creating aliases for each would seem too verbose. but we can talk about that after we finish porting over the rest of the code.
✅ All Cypress E2E specs passed |
Test summaryRun details
Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud |
* master: (98 commits) feat(core): Allow overriding npm registry for community packages (#10325) feat(core): Upgrade DB drivers (no-changelog) (#10370) fix(editor): Fix bug causing workflow debugging to not work in new canvas (no-changelog) (#10384) fix: Fix issue with some errors not being handled correctly (no-changelog) (#10371) fix(core): Filter out prototype and constructor lookups in expressions (#10382) fix(editor): Connect up new project viewer role to the FE (#9913) refactor(core): Move queue recovery to scaling service (no-changelog) (#10368) fix(core): Account for owner when filtering by project ID in `GET /workflows` in Public API (#10379) fix(editor): Fix rendering of SVG icons in public chat on iOS (#10381) fix: Require mfa code to disable mfa (#10345) ci: Disable turbo cache when running tests for coverage collection (no-changelog) (#10380) refactor(editor): Add typed event bus (no-changelog) (#10367) refactor(core): Remove unused constants in Redis channels (no-changelog) (#10369) fix(editor): Revert change that hid swagger docs in the ui (#10350) fix(Okta Node): Add missing codex file (no-changelog) (#10372) fix(core): Fix worker shutdown errors when active executions (#10353) refactor(core): Rename ActiveWebhooks to LiveWebhooks (no-changelog) (#10355) fix(n8n Form Trigger Node): Fix issue preventing v1 node from working (#10364) feat(editor): Upgrade markdown-it to address AIKIDO-2024-10034 (no-changelog) (#10358) ci: Upgrade axios to address CVE-2024-39338 (no-changelog) (#10365) ... # Conflicts: # packages/design-system/package.json
Got released with |
Summary
Extracted from #10345
Add possibility to type the event bus and add a new
FormEventBus
.As a follow-up add types to all current usages.
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)