-
Notifications
You must be signed in to change notification settings - Fork 2
add assign dialog #13
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
Conversation
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.
Pull Request Overview
This PR adds an "Assign Workflow" dialog functionality that allows users to assign workflows to content types. The implementation includes a complete workflow assignment interface with proper form handling, validation, and feedback mechanisms.
- Adds a new AssignWorkflow dialog component with content type selection and assignment logic
- Updates the workflow data structure to include assignable content types
- Implements backend support for retrieving assignable content types (those not already assigned to the workflow)
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workflow.ts | Adds TypeScript interfaces for assignable types and dialog props |
| AssignWorkflow.tsx | New React component implementing the assignment dialog with form handling |
| ActionsToolbar.tsx | Integrates the assign dialog into the workflow toolbar |
| workflow.ts (actions) | Updates API endpoint path for workflow assignment |
| workflow.py | Adds assignable_types to workflow serialization |
| base.py | Implements backend logic to get assignable content types |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } catch (error: any) { | ||
| toast.error( | ||
| <Toast | ||
| error | ||
| title={intl.formatMessage(messages.error)} | ||
| content={error.message || 'An unknown error occurred.'} |
Copilot
AI
Aug 25, 2025
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.
Using 'any' type for error handling is not recommended. Consider using a more specific error type or 'unknown' type for better type safety.
| } catch (error: any) { | |
| toast.error( | |
| <Toast | |
| error | |
| title={intl.formatMessage(messages.error)} | |
| content={error.message || 'An unknown error occurred.'} | |
| } catch (error: unknown) { | |
| let errorMessage = 'An unknown error occurred.'; | |
| if ( | |
| error && | |
| typeof error === 'object' && | |
| 'message' in error && | |
| typeof (error as { message?: unknown }).message === 'string' | |
| ) { | |
| errorMessage = (error as { message: string }).message; | |
| } | |
| toast.error( | |
| <Toast | |
| error | |
| title={intl.formatMessage(messages.error)} | |
| content={errorMessage} |
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
@Manas-Kenge Did you make any changes for the sidebar tabs here? Also please remove the icon you are using for assign - it's misleading |
This PR was opened before working on the sidebar, that's why you can't see it. As for the icon which one should I use? |
|
If it was working before than why you did have to use spectrum? |
|
What do you mean when you say use spectrum? |
|
If the sidebar was working with volto components and styling before, why did you change it? ( I think you mentioned it to me earlier the reason but please re-iterate , maybe it has slipped from my mind) |
|
When this PR was opened, I hadn't started working on the sidebar yet. Since these changes are in different git branches, you can't see the updates from one branch in the other. That's why you're seeing the volto sidebar here instead of the spectrum sidebar. |


No description provided.