From 02df5e8d58ddb7f5d64a6630cf9b52edecfa5334 Mon Sep 17 00:00:00 2001 From: Ruby Engelhart Date: Thu, 25 Jul 2024 16:20:59 -0400 Subject: [PATCH] merge conflicts (#9) --- .github/dependabot.yml | 13 ++++++++++++ README.md | 5 +++-- docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md | 2 +- docs/RELEASE_NOTES.md | 14 +++++++++++++ package.json | 2 +- .../AdminCampaignList/CampaignTable.jsx | 21 ++++++++++--------- src/components/AssignmentTexter/Controls.jsx | 4 +--- src/containers/AdminCampaignList.jsx | 4 ++-- 8 files changed, 46 insertions(+), 19 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..12221631e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + target-branch: "stage-main-14.1" + schedule: + interval: "weekly" + day: "monday" + time: "12:00" + rebase-strategy: auto + open-pull-requests-limit: 10 + labels: + - "A-dependencies" \ No newline at end of file diff --git a/README.md b/README.md index c272cc490..e74139655 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Spoke was created by Saikat Chakrabarti and Sheena Pakanati. On November 19th, 2023, the repo Spoke was transfered from MoveOn to StateVoices. -The latest version is [14.0.0](https://github.com/StateVoicesNational/Spoke/tree/14.0.0) (see [release notes](https://github.com/StateVoicesNational/Spoke/blob/main/docs/RELEASE_NOTES.md#v1310)) +The latest version is [14.0.1](https://github.com/StateVoicesNational/Spoke/tree/v14.0.1) (see [release notes](https://github.com/StateVoicesNational/Spoke/blob/main/docs/RELEASE_NOTES.md#v1401)) + ## Setting up Spoke @@ -25,7 +26,7 @@ Want to know more? ### Quick Start with Heroku This version of Spoke suitable for testing and, potentially, for small campaigns. This won't cost any money and will not support production(aka large-scale) usage. It's a great way to practice deploying Spoke or see it in action. - + Deploy diff --git a/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md b/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md index 5b3d58099..bf0dfb72c 100644 --- a/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md +++ b/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md @@ -76,7 +76,7 @@ Docker is optional, but can help with a consistent development environment using 1. Install docker and docker compose - Docker allows you to run apps in containers and can be installed [here with Docker's instructions](https://docs.docker.com/desktop/) -- Docker Compose is the tool used to create and run docker configurations. If you installed Docker on Mac, you already have Docker Compose, if you're using Linux or Windows you can install Docker Compose [with these instructions](https://docs.docker.com/compose/install/) +- Docker Compose is the tool used to create and run docker configurations. If you installed Docker on Mac, a good way to install Docker Compose is to use [homebrew](https://brew.sh/). Once you have homebrew set up, you can run `brew install docker-compose`. if you're using Linux or Windows you can install Docker Compose [with these instructions](https://docs.docker.com/compose/install/) 2. Make sure Docker is running on your machine and then build and run Spoke with `docker compose up -d` to run redis and postgres in the background - You can stop docker compose at any time with `docker compose down`, and data will persist next time you run `docker compose up`. diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 87b98f591..1087ccabd 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,5 +1,19 @@ # Release Notes +## v14.0.1 +_July 2024:_ Version 14.0.1 + +14.0.1 is a patch release. + +### Bug Fixes +- [#2384](https://github.com/StateVoicesNational/Spoke/pull/2384) - Fix white-screen-of-death when trying to sort the Admin Campaign List +- [#2383](https://github.com/StateVoicesNational/Spoke/pull/2383) - Fix white-screen-of-death when trying to click "All Responses +- [#2379](https://github.com/StateVoicesNational/Spoke/pull/2379) - Create `dependabot.yml` + +### Appreciations +[Maureen Zitouni](https://github.com/mau11), [Ruby Engelhart](https://github.com/engelhartrueben), [Schuyler Duveen](https://github.com/schuyler1d) + + ## v14.0 _July 2024:_ Version 14.0 diff --git a/package.json b/package.json index bb578f06e..6acc4eb4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spoke", - "version": "14.0.0", + "version": "14.0.1", "description": "Spoke", "main": "src/server", "engines": { diff --git a/src/components/AdminCampaignList/CampaignTable.jsx b/src/components/AdminCampaignList/CampaignTable.jsx index b28e8730d..aa44a3e92 100644 --- a/src/components/AdminCampaignList/CampaignTable.jsx +++ b/src/components/AdminCampaignList/CampaignTable.jsx @@ -39,7 +39,8 @@ export class CampaignTable extends React.Component { }; state = { - dataTableKey: "initial" + dataTableKey: "initial", + campaigns: [...this.props.data.organization.campaigns.campaigns] }; statusIsChanging = campaign => { @@ -119,7 +120,8 @@ export class CampaignTable extends React.Component { customBodyRender: (value, tableMeta) => { const campaign = campaigns.find(c => c.id === tableMeta.rowData[0]); return this.renderArchiveIcon(campaign); - } + }, + sort: false }, style: { width: "5em" @@ -305,8 +307,7 @@ export class CampaignTable extends React.Component { }; render() { - const { campaigns, pageInfo } = this.props.data.organization.campaigns; - const { limit, offset, total } = pageInfo; + const { limit, offset, total } = this.props.data.organization.campaigns.pageInfo; const displayPage = Math.floor(offset / limit) + 1; let rowSizeList = [10, 20, 50, 100]; @@ -346,14 +347,14 @@ export class CampaignTable extends React.Component { break; case "sort": this.clearCampaignSelection(); - campaigns.sort(this.sortFunc(tableState.sortOrder.name)); + this.state.campaigns.sort(this.sortFunc(tableState.sortOrder.name)); if (tableState.sortOrder.direction === "desc") { - campaigns.reverse(); + this.state.campaigns.reverse() } break; case "rowSelectionChange": const ids = tableState.selectedRows.data.map(({ index }) => { - return campaigns[index].id; + return this.state.campaigns[index].id; }); this.props.handleChecked(ids); break; @@ -365,17 +366,17 @@ export class CampaignTable extends React.Component { } }; - return campaigns.length === 0 ? ( + return this.state.campaigns.length === 0 ? ( } /> ) : (


diff --git a/src/components/AssignmentTexter/Controls.jsx b/src/components/AssignmentTexter/Controls.jsx index d1b88ce85..d908b9830 100644 --- a/src/components/AssignmentTexter/Controls.jsx +++ b/src/components/AssignmentTexter/Controls.jsx @@ -125,10 +125,9 @@ export class AssignmentTexterContactControls extends React.Component { let currentInteractionStep = null; if (availableSteps.length > 0) { - const currentInteractionStep = deepCopy( + currentInteractionStep = deepCopy( availableSteps[availableSteps.length - 1] ); - currentInteractionStep.question.filteredAnswerOptions = currentInteractionStep.question.answerOptions; } @@ -504,7 +503,6 @@ export class AssignmentTexterContactControls extends React.Component { filteredCannedResponses } = this.state; const { messages } = contact; - const availableInteractionSteps = getAvailableInteractionSteps( questionResponses, campaign.interactionSteps diff --git a/src/containers/AdminCampaignList.jsx b/src/containers/AdminCampaignList.jsx index 7f3bd177e..8ed20f5aa 100644 --- a/src/containers/AdminCampaignList.jsx +++ b/src/containers/AdminCampaignList.jsx @@ -19,7 +19,7 @@ import { dataTest } from "../lib/attributes"; import loadData from "./hoc/load-data"; import theme from "../styles/theme"; import SortBy, { - DUE_DATE_DESC_SORT + ID_DESC_SORT } from "../components/AdminCampaignList/SortBy"; import Search from "../components/Search"; import CampaignTable from "../components/AdminCampaignList/CampaignTable"; @@ -38,7 +38,7 @@ const INITIAL_FILTER = { isArchived: false, searchString: "" }; -const INITIAL_SORT_BY = DUE_DATE_DESC_SORT.value; +const INITIAL_SORT_BY = ID_DESC_SORT.value; export class AdminCampaignList extends React.Component { static propTypes = {