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 440ba10d9..808eb11b1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 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/v14.0) (see [release notes](https://github.com/StateVoicesNational/Spoke/blob/main/docs/RELEASE_NOTES.md#v140)) +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 +25,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/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 87b98f591..294ed109e 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,5 +1,18 @@ # 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..8ce4fa799 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 = {