-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(framework): Stop validating controls for non previewed step #6876
fix(framework): Stop validating controls for non previewed step #6876
Conversation
status: 'success', | ||
}, | ||
}, | ||
], |
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.
An empty outputs
should have been supplied for this test, ensuring that a hydration can still occur for skipped steps. This fixes the assertion.
❌ Deploy Preview for novu-stg-vite-dashboard-poc failed. Why did it fail? →
|
// Only set the result when the step is the current step. | ||
// Only evaluate a skip condition when the step is the current step and not in preview mode. | ||
if (!isPreview && stepId === event.stepId) { | ||
const controls = await this.createStepControls(step, event); |
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.
With this change, we ensure step controls are only validated during execution where the controls are guaranteed to be available for the current step being executed.
commit: |
❌ Deploy Preview for novu-stg-vite-dashboard-poc failed. Why did it fail? →
|
return {} as any; | ||
/* | ||
* Return an empty object for results when a step is skipped. | ||
* TODO: fix typings when `skip` is specified to return `Partial<T_Result>` |
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.
just to make sure it doesn't bypass the second PR and results will be supplied if i provide them
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.
Yes, this code branch is only for the non-preview case.
What changed? Why was the change needed?
skip
step logical execution, non-previewed steps were having controls validated. This was a bug as no controls are ever supplied to the non-executed step. This change removes controls validation for non-previewed stepsScreenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer