-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Reset Workflow Button in Edit Contentlet Sidebar Workflow Section (…
…#30767) ### Proposed Changes * Allow resetting a contentlet if the sub-action for that. This pull request includes several changes to the `core-web` library, focusing on enhancing the `dot-edit-content-form` and `dot-edit-content-sidebar-workflow` components. The most important changes include the addition of new render modes, modifications to form value handling, and updates to the workflow component structure and functionality. ### Enhancements to `dot-edit-content-form`: * Added new render modes to the `DotRenderMode` enum in `dot-workflows-actions.service.ts`. * Updated the `changeValue` output type to handle various data types, including `string[]` and `Date`. * Introduced a new computed property `$formFields` to filter out certain fields from the form. * Refactored the `initializeFormListener` method to handle form value changes and emit the processed value. * Simplified the `initializeForm` method to use the new `$formFields` computed property. ### Updates to `dot-edit-content-sidebar-workflow`: * Consolidated workflow-related variables into a single `workflow` object and updated the template to use this object. [[1]](diffhunk://#diff-1e29fca586a864571ecaaf1794485fbb1b5d6a39bac17bcdcb67e44fb8f8e451L1-R3) [[2]](diffhunk://#diff-1e29fca586a864571ecaaf1794485fbb1b5d6a39bac17bcdcb67e44fb8f8e451L16-R13) [[3]](diffhunk://#diff-1e29fca586a864571ecaaf1794485fbb1b5d6a39bac17bcdcb67e44fb8f8e451L26-R58) [[4]](diffhunk://#diff-1e29fca586a864571ecaaf1794485fbb1b5d6a39bac17bcdcb67e44fb8f8e451L61-R67) [[5]](diffhunk://#diff-1e29fca586a864571ecaaf1794485fbb1b5d6a39bac17bcdcb67e44fb8f8e451L84-R90) * Introduced new interfaces `WorkflowSelection` and `DotWorkflowState` to manage workflow selection and state. [[1]](diffhunk://#diff-3465f2dbecb29cf855c8f271b85d396eff6ac9c64b1c1440147cdca68392b1d0L10-R27) [[2]](diffhunk://#diff-3465f2dbecb29cf855c8f271b85d396eff6ac9c64b1c1440147cdca68392b1d0L36-R54) * Added an output event `onResetWorkflow` to handle workflow resets. * Updated the workflow component to use the new `workflowSelection` and `resetWorkflowAction` inputs. ### General improvements: * Removed the unused `SlicePipe` import from `dot-edit-content-sidebar.component.ts`. [[1]](diffhunk://#diff-7de680fdc62a1bf1fd1243d8fcf077fee3a7e08ed213d2821b2eb53b2d9248feL1) [[2]](diffhunk://#diff-7de680fdc62a1bf1fd1243d8fcf077fee3a7e08ed213d2821b2eb53b2d9248feL44-R43) * Updated the `dot-edit-content-sidebar.component.html` to use the new workflow structure and properties. [[1]](diffhunk://#diff-96315ade336a88f5f2f51d7a64dec588aa9fa44384539792c69e1a3346eaa5d0L3-L13) [[2]](diffhunk://#diff-96315ade336a88f5f2f51d7a64dec588aa9fa44384539792c69e1a3346eaa5d0L26-R20) These changes enhance the flexibility and maintainability of the form and workflow components, ensuring better data handling and user experience. ### Checklist - [x] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable) ### Additional Info ** any additional useful context or info ** ### Screenshots Contenttype with 2 Workflows (1 resettable and 1 not) https://github.com/user-attachments/assets/e1da7a1e-886c-4270-a98a-4d3ce062a47c Contenttype with 1 resettable Workflow https://github.com/user-attachments/assets/7d0be90b-ba6a-4dad-ba2c-75abb3758d0b
- Loading branch information
Showing
23 changed files
with
1,070 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.