Configure Workflow Step Dialog
Atlassian products often involve complex workflows to manage tasks, issues, and projects. Users frequently need to configure individual steps within these workflows to align with their specific processes. This problem focuses on building a robust and accessible modal dialog that allows users to configure the properties of a WorkflowStep.
Building such a dialog is critical for providing a seamless user experience, ensuring data integrity, and allowing users to customize their workflows effectively. It tests your ability to manage UI state, handle user input, and implement essential accessibility features for interactive components.
Your primary task is to implement the WorkflowStepConfigDialog component and integrate it into the provided App component. The dialog should facilitate the configuration of a WorkflowStep object.
WorkflowStepConfigDialog: Complete the WorkflowStepConfigDialog component to display and allow editing of WorkflowStep properties.initialConfig provided via props.WorkflowStep:
name (via a text input).assigneeType (via a dropdown/select input with options: INDIVIDUAL, ROLE, UNASSIGNED).onSave prop with the updated WorkflowStep configuration and then close the dialog.WorkflowStep.<input type="text">, <select>) for editing the properties.Esc key should close the dialog.Tab key presses should cycle focus only through elements inside the dialog.WorkflowStepConfigDialog.name, assigneeType) are pre-filled with the current WorkflowStep data from App's state.name and assigneeType fields within the dialog.WorkflowStep in App's state remains unchanged.WorkflowStep in App's state with the new values from the form.Esc key closes the dialog.Tab cycles focus only among interactive elements within the dialog; focus does not escape to the main page content.Constraints
styles.css; focus on functionality and component structure rather than pixel-perfect styling.WorkflowStep is provided in App.tsx.WorkflowStep is being configured at a time.WorkflowStep interface and initial data are immutable for the purpose of the initialConfig prop; internal form state should manage changes before saving.required).WorkflowStepConfigDialog is encapsulated and how props are used for control and data flow.useState and useEffect hooks for managing form and modal state.Esc key, tab trapping) for modal dialogs.Loading editor...