Skip to content

Conversation

@akulakum
Copy link
Contributor

@akulakum akulakum commented Dec 16, 2025

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7419

Vidcast Link: https://app.vidcast.io/share/b8c6a7dc-9b23-4f39-8c3c-06ec0ae84763

This pull request addresses

This PR is to consume engage npm packag and expose the digital widget as part of cc-widgets

< DESCRIBE THE CONTEXT OF THE ISSUE >
consumed "@webex-engage/wxengage-conversations": "^1.0.2", added yarnrc t o have cisco repository config and token.

by making the following changes

Created a new package @webex/cc-digital-channels and consumed "@webex-engage/wxengage-conversations": "^1.0.2"

< DESCRIBE YOUR CHANGES >

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@akulakum akulakum added the validated Indicates that the PR is ready for actions label Dec 17, 2025
@@ -0,0 +1,118 @@
import {defineConfig} from 'vite';
Copy link
Contributor

Choose a reason for hiding this comment

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

We have webpack setted up for all the packages, can we reuse that?

},
fallback: {
...baseConfig.resolve?.fallback,
'process/browser': require.resolve('process/browser.js'),
Copy link
Contributor

Choose a reason for hiding this comment

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

These can be put in the base config itself, both alias and the fallback.

'react-dom': 'react-dom',
'@webex/cc-store': '@webex/cc-store',
'@momentum-ui/react-collaboration': '@momentum-ui/react-collaboration',
'@momentum-ui/web-components': '@momentum-ui/web-components',
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think this is requried, as we are not using this anywhere

@@ -1,7 +1,18 @@
import {StationLogin} from '@webex/cc-station-login';
Copy link
Contributor

Choose a reason for hiding this comment

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

Also update the wc entry file. I know its not used but atleast we should be expsoing everything for uniformity, also when we fix it in the future we should have the reference for this digital channel in there

Comment on lines +19 to +24
"@momentum-ui/core": "19.16.0",
"@momentum-ui/icons": "8.28.5",
"@momentum-ui/react-collaboration": "26.197.0",
"@momentum-ui/tokens": "1.7.1",
"@momentum-ui/utils": "6.2.15",
"@momentum-ui/web-components": "^2.23.35",
Copy link
Contributor

Choose a reason for hiding this comment

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

All these are dependency of @momentum-ui/react-collaboration and are alrady present in the node_modules, Why are we mentinoing these again here?

@@ -0,0 +1,13 @@
// Declare custom HTML elements used by the Webex Engage components
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we wont require md-theme, we can get rid of this file as well

import {mockTask, mockCC} from '@webex/test-fixtures';

// Mock mobx-react-lite to make observer work properly in tests
jest.mock('mobx-react-lite', () => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid this, we wanna make sure the store changes are being recevied by the widget

Comment on lines 62 to 67
// The fact that we get here means:
// 1. Real @webex-engage/wxengage-conversations loaded successfully
// 2. Real @momentum-ui/web-components loaded successfully
// 3. No runtime errors occurred
// 4. All dependencies were satisfied with minimal mocking
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove these comments

it('should successfully load and initialize real Engage component without errors', () => {
// This test proves we can test with the real Engage component
expect(() => {
render(<DigitalChannels {...mockProps} />);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we check something in the dom to ensure the widget is loaded


// Everything else uses real components:
// ✅ Real @webex-engage/wxengage-conversations
// ✅ Real @momentum-ui/web-components
Copy link
Contributor

Choose a reason for hiding this comment

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

too many AI comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants