chore(Wizard): updated API for WizardBody and docs for footer by thatblindgeye · Pull Request #10637 · patternfly/patternfly-react

@thatblindgeye

thatblindgeye

onSave,
onClose,
shouldFocusContent = false,
shouldFocusContent = true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlabaj I believe we had said that for v6 we wanted to make this the default, rather than an opt in, correct? If that's still the case then we could remove the example that shows this functionality, as well as update failing integration tests.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is what was discussed for accessibility purposes

@patternfly-build

This was linked to issues

Jun 20, 2024

wise-king-sullyman

/** Props for WizardBody that wraps content by default. Can be set to null for exclusion of WizardBody. */
body?: Omit<Omit<WizardBodyProps, 'children'>, 'children'> | null;
/** Props for WizardBody that wraps content by default. */
body?: Omit<Omit<WizardBodyProps, 'children'>, 'children'>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the prop also be marked as required so that undefined can't be passed / the prop omitted? It sounds that way based on the issue, but I could be misunderstanding.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it being optional should be fine. I'll try locally, but the logic in WizardToggle checks whether body || body === undefined to render the WizardBody wrapping children. We could probably just remove that conditional now,, though, since we should always want the WizardBody wrapper.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, the body prop in WizardStep is for passing an object of WizardBody props in; the prop name isn't exactly descriptive of the actual behavior. May be worth updating the prop to bodyProps instead at some point.

wise-king-sullyman

Eric Olkowski added 4 commits

July 16, 2024 13:59

kmcfaul

This was referenced

Jul 18, 2024