-
Notifications
You must be signed in to change notification settings - Fork 54
CC-Widgets Packages setup #237
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
CC-Widgets Packages setup #237
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
06b21fa
to
842e311
Compare
@@ -0,0 +1,7 @@ | |||
module.exports = { |
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.
Created common babelrc which will be imported in each workspace. babelrc is required in each workspace to run jest tests
@@ -43,6 +43,7 @@ reports/ | |||
!.env.default | |||
!package.json | |||
!package-lock.json | |||
!tsconfig.json |
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.
tsconfig was getting ignore, was causing issues.
@@ -0,0 +1,32 @@ | |||
{ |
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.
The sample app is also a workspace. This will allow us to easily link updated widgets locally.
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.
All the files in this are demo, these will be updated when we add the actual implementation of these widgets.
We can still run and see the basic providers and widgets working and sharing states. Demo added in the desciption
@@ -0,0 +1,15 @@ | |||
import React from 'react'; |
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.
Dummy code for a simple demo.
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const {merge} = require('webpack-merge'); | ||
|
||
const baseConfig = require('../../webpack.config'); |
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 base webpack config here also
@@ -0,0 +1,14 @@ | |||
<!DOCTYPE html> |
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.
This is a sample using web-components and NO react. Again dummy code to just show that widgets can be used as web-components
package.json
Outdated
"build": "yarn run build:providers && yarn run build:widgets", | ||
"build:providers": "yarn workspace @webex/widget-provider build:src", | ||
"build:widgets": "yarn workspace @webex/widget-cc-station-login build:src && yarn workspace @webex/widget-cc-user-state build:src", | ||
"samples:build": "yarn workspace @webex/react-samples-app build:src && yarn workspace @webex/web-component-samples-app build:src", | ||
"samples:serve-react": "yarn workspace @webex/react-samples-app serve", | ||
"samples:serve-wc": "yarn workspace @webex/web-component-samples-app serve" |
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.
These scripts are similar to js-sdk, so that we dont have to memories a whole new set of commands
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.
I dont think you have to follow the structure of packages/@webex structure here
yarn workspace can just relay on the folder structure like widgets/cc-station-login etc
the npm package where you are going to publish can be @webex/cc-station-login
The naming looks little messed up i know we did not follow this on the sdk side
packages/@webex/widget-cc-station-login/src/station-login/index.tsx
Outdated
Show resolved
Hide resolved
packages/@webex/widget-cc-station-login/src/station-login/index.tsx
Outdated
Show resolved
Hide resolved
packages/@webex/widget-cc-user-state/src/user-state/user-state.presentational.tsx
Outdated
Show resolved
Hide resolved
packages/@webex/widget-cc-station-login/src/station-login/station-login.types.ts
Outdated
Show resolved
Hide resolved
packages/@webex/widget-cc-station-login/tests/station-login/station-login.hooks.ts
Outdated
Show resolved
Hide resolved
packages/@webex/widget-cc-station-login/src/station-login/index.tsx
Outdated
Show resolved
Hide resolved
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'index.js', // Set the output filename to index.js | ||
libraryTarget: 'commonjs2', | ||
}, |
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.
Let's move these to global webpack config itself and if there's a need to change, we will override in this file as and when required
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.
moved to global config
Moved the cc-widgets out of @webex folder. |
![]() one thing is like naming as its in widgets folder and repo we dont have to add workd widget-cc word all the time could be just cc-stationLogin you can also change the @webex/widget folder as well if needed |
|
🎉 This PR is included in version 1.28.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.28.0-eft-pipeline.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.27.6-eft.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.27.6-eft.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.28.0-wxcc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.28.0-ccwidgets.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.28.0-ccconnectors.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
COMPLETED https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-569253
Changes
Adds basic setup for widget
Functionalities
Testing