feat(task): Create CampaginErrorDialog Component#670
Open
brain-frog wants to merge 9 commits intowebex:nextfrom
Open
feat(task): Create CampaginErrorDialog Component#670brain-frog wants to merge 9 commits intowebex:nextfrom
brain-frog wants to merge 9 commits intowebex:nextfrom
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
cmullenx
reviewed
Apr 9, 2026
| import {withMetrics} from '@webex/cc-ui-logging'; | ||
| import './campaign-error-dialog.style.scss'; | ||
|
|
||
| const CampaignErrorDialog: React.FunctionComponent<CampaignErrorDialogProps> = ({errorType, isOpen, onClose}) => { |
Contributor
There was a problem hiding this comment.
doesnt momentum have a dialog you can use? and can you make a generic dialog that accepts props and then use that here? That way if we need another one we don't have to do this again
Contributor
Author
There was a problem hiding this comment.
It does! However the momentum-design package has not been updated in 11 months and the changes necessary to use the newer version are large enough that they should be their own story.
I'd be happy to take that story as well.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
COMPLETES # https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7665
This pull request addresses
The cc-components package needs a reusable error dialog component to display campaign-related errors (accept failed, skip failed, remove failed) to agents in a consistent, accessible manner.
by making the following changes
Adding a new CampaignErrorDialogComponent to cc-components with support for three error types: ACCEPT_FAILED, SKIP_FAILED, and REMOVE_FAILED
Implementing the dialog using the native HTML element with modal behavior
Adding proper keyboard support (Escape key to close)
Exporting the component and its types from cc-components package
Adding comprehensive unit tests for rendering, user interactions, and accessibility
Vidcast: https://app.vidcast.io/share/dda6e277-f63e-4252-b5f4-ff604d4e2383?playerMode=vidcast
Change Type
The following scenarios were tested
The CampaignErrorDialogComponent:
renders the dialog element correctly
renders the correct title for ACCEPT_FAILED error type ("Can't accept contact")
renders the correct title for SKIP_FAILED error type ("Can't skip contact")
renders the correct title for REMOVE_FAILED error type ("Can't remove contact")
renders the error message
renders the OK button
calls showModal when isOpen changes to true
calls close when isOpen changes to false
calls onClose when OK button is clicked
calls onClose when Escape key is pressed
does not call onClose when other keys are pressed
has proper dialog structure (uses DIALOG element)
has heading element for title
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.