From 36b835918c9febc5ffda834d889c1a9aeb411786 Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Wed, 17 Jul 2024 01:01:07 +0000 Subject: [PATCH 1/4] Allow template variable attachments --- package.json | 1 + .../actions/sendmsg/SendMsgForm.module.scss | 4 + .../flow/actions/sendmsg/SendMsgForm.tsx | 8 + .../routers/caselist/CaseList.module.scss | 2 +- src/temba/TembaSelect.module.scss | 3 +- yarn.lock | 152 +++++++++++++++++- 6 files changed, 166 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 05d305ba7..73b1cb1ee 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ ], "private": false, "dependencies": { + "@nyaruka/temba-components": "0.100.0", "react": "^16.8.6", "react-dom": "^16.8.6" }, diff --git a/src/components/flow/actions/sendmsg/SendMsgForm.module.scss b/src/components/flow/actions/sendmsg/SendMsgForm.module.scss index 07f9c2026..d79b10f56 100644 --- a/src/components/flow/actions/sendmsg/SendMsgForm.module.scss +++ b/src/components/flow/actions/sendmsg/SendMsgForm.module.scss @@ -1,3 +1,7 @@ .message { --textarea-height: 8em; +} + +.has-errors { + --color-widget-border: var(--color-error); } \ No newline at end of file diff --git a/src/components/flow/actions/sendmsg/SendMsgForm.tsx b/src/components/flow/actions/sendmsg/SendMsgForm.tsx index 62332d5fd..a33937d43 100644 --- a/src/components/flow/actions/sendmsg/SendMsgForm.tsx +++ b/src/components/flow/actions/sendmsg/SendMsgForm.tsx @@ -55,6 +55,8 @@ export interface SendMsgFormState extends FormState { } export default class SendMsgForm extends React.Component { + saveAttempted = false; + constructor(props: ActionFormProps) { super(props); this.state = stateToForm(this.props.nodeSettings); @@ -143,6 +145,8 @@ export default class SendMsgForm extends React.Component Date: Wed, 17 Jul 2024 01:45:16 +0000 Subject: [PATCH 2/4] Update node version for build --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77e693159..547b2eaf7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x] + node-version: [16.x] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e47c54e07..c18131040 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Use Node.js 12.x + - name: Use Node.js 16.x uses: actions/setup-node@v1 with: - version: 12.x + version: 16.x - name: Build and Test run: | yarn install diff --git a/package.json b/package.json index 73b1cb1ee..d2b6489af 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ ], "private": false, "dependencies": { - "@nyaruka/temba-components": "0.100.0", + "@nyaruka/temba-components": "0.101.0", "react": "^16.8.6", "react-dom": "^16.8.6" }, diff --git a/yarn.lock b/yarn.lock index 53874a47d..f8486b3b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1490,10 +1490,10 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nyaruka/temba-components@0.100.0": - version "0.100.0" - resolved "https://registry.yarnpkg.com/@nyaruka/temba-components/-/temba-components-0.100.0.tgz#8500398e12070572b4e427e48423b911fa6e7f44" - integrity sha512-jcoag/TV31YLbxObSboxa2CAp2psjqhdQ5Bh4MyNnSc6Hquznzwy9LB/XHkJx+QJBc3O89so6OuowSYs5ad7tA== +"@nyaruka/temba-components@0.101.0": + version "0.101.0" + resolved "https://registry.yarnpkg.com/@nyaruka/temba-components/-/temba-components-0.101.0.tgz#dc6cfd2bd154b94045b84f2c9352fb2810c0cefa" + integrity sha512-+1Gehj4XqyXr+xajlOykOv8ZIiANPobvztS6Z+uMTFgzcmQbGqM6lkoOG+IMaOyIUDogLnAd0vjxhozjdF0HSg== dependencies: "@lit/localize" "^0.12.1" color-hash "^2.0.2" From 2c51390bb341f25ef3385e5c8c5a03ddb9e2551b Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Wed, 17 Jul 2024 01:48:15 +0000 Subject: [PATCH 3/4] Missing node reference --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 547b2eaf7..4354955ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Use Node.js 12.x + - name: Use Node.js 16.x uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: install and coverage run: | yarn install From 6643c0e19cec8b1e53273a70a61e7a04a6e95c7c Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Wed, 17 Jul 2024 01:51:51 +0000 Subject: [PATCH 4/4] Update snapshot --- .../actions/sendmsg/__snapshots__/SendMsgForm.test.ts.snap | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/flow/actions/sendmsg/__snapshots__/SendMsgForm.test.ts.snap b/src/components/flow/actions/sendmsg/__snapshots__/SendMsgForm.test.ts.snap index 059fa34d2..dd04193d5 100644 --- a/src/components/flow/actions/sendmsg/__snapshots__/SendMsgForm.test.ts.snap +++ b/src/components/flow/actions/sendmsg/__snapshots__/SendMsgForm.test.ts.snap @@ -133,6 +133,11 @@ exports[`SendMsgForm render should render 1`] = ` } } lang={null} + style={ + Object { + "--color-widget-border": "inherit", + } + } tag="temba-template-editor" template={null} url="assets/templates.json"