Skip to content

Commit 898ae5e

Browse files
engelhartruebensduveen-pivotmau11
authored
PATCH 14.0.1 (#2386)
* bug/2382: currentInteractionStep variable needs to continue w/in block instead of new const * Dependabot Config File (#2379) * init dependabot.yml * typo * fix for campaign sort bug (#2384) * fix bug where the CampaignTable would white screen of death after trying to sort * set initial sort to ID_DESC * remove sorting on archive column * call this.state.campaigns directly wherever possible. Object destructured pageInfo immidiately * add 14.0.1 release notes * 14.0 >> 14.0.1 * link pr's * fix typo --------- Co-authored-by: Schuyler Duveen <[email protected]> Co-authored-by: Maureen <[email protected]>
1 parent ff740cc commit 898ae5e

File tree

7 files changed

+43
-18
lines changed

7 files changed

+43
-18
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
target-branch: "stage-main-14.1"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "12:00"
10+
rebase-strategy: auto
11+
open-pull-requests-limit: 10
12+
labels:
13+
- "A-dependencies"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Spoke was created by Saikat Chakrabarti and Sheena Pakanati.
88

99
On November 19th, 2023, the repo Spoke was transfered from MoveOn to StateVoices.
1010

11-
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))
11+
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))
1212

1313

1414
## Setting up Spoke
@@ -25,7 +25,7 @@ Want to know more?
2525
### Quick Start with Heroku
2626
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.
2727

28-
<a href="https://heroku.com/deploy?template=https://github.com/StateVoicesNational/Spoke/tree/v14.0">
28+
<a href="https://heroku.com/deploy?template=https://github.com/StateVoicesNational/Spoke/tree/v14.0.1">
2929

3030
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
3131
</a>

docs/RELEASE_NOTES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Release Notes
22

3+
## v14.0.1
4+
_July 2024:_ Version 14.0.1
5+
6+
14.0.1 is a patch release.
7+
8+
### Bug Fixes
9+
- [#2384](https://github.com/StateVoicesNational/Spoke/pull/2384) - Fix white-screen-of-death when trying to sort the Admin Campaign List
10+
- [#2383](https://github.com/StateVoicesNational/Spoke/pull/2383) - Fix white-screen-of-death when trying to click "All Responses
11+
- [#2379](https://github.com/StateVoicesNational/Spoke/pull/2379) - Create `dependabot.yml`
12+
13+
### Appreciations
14+
[Maureen Zitouni](https://github.com/mau11), [Ruby Engelhart](https://github.com/engelhartrueben), [Schuyler Duveen](https://github.com/schuyler1d)
15+
316
## v14.0
417
_July 2024:_ Version 14.0
518

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spoke",
3-
"version": "14.0.0",
3+
"version": "14.0.1",
44
"description": "Spoke",
55
"main": "src/server",
66
"engines": {

src/components/AdminCampaignList/CampaignTable.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export class CampaignTable extends React.Component {
3939
};
4040

4141
state = {
42-
dataTableKey: "initial"
42+
dataTableKey: "initial",
43+
campaigns: [...this.props.data.organization.campaigns.campaigns]
4344
};
4445

4546
statusIsChanging = campaign => {
@@ -119,7 +120,8 @@ export class CampaignTable extends React.Component {
119120
customBodyRender: (value, tableMeta) => {
120121
const campaign = campaigns.find(c => c.id === tableMeta.rowData[0]);
121122
return this.renderArchiveIcon(campaign);
122-
}
123+
},
124+
sort: false
123125
},
124126
style: {
125127
width: "5em"
@@ -305,8 +307,7 @@ export class CampaignTable extends React.Component {
305307
};
306308

307309
render() {
308-
const { campaigns, pageInfo } = this.props.data.organization.campaigns;
309-
const { limit, offset, total } = pageInfo;
310+
const { limit, offset, total } = this.props.data.organization.campaigns.pageInfo;
310311
const displayPage = Math.floor(offset / limit) + 1;
311312
let rowSizeList = [10, 20, 50, 100];
312313

@@ -346,14 +347,14 @@ export class CampaignTable extends React.Component {
346347
break;
347348
case "sort":
348349
this.clearCampaignSelection();
349-
campaigns.sort(this.sortFunc(tableState.sortOrder.name));
350+
this.state.campaigns.sort(this.sortFunc(tableState.sortOrder.name));
350351
if (tableState.sortOrder.direction === "desc") {
351-
campaigns.reverse();
352+
this.state.campaigns.reverse()
352353
}
353354
break;
354355
case "rowSelectionChange":
355356
const ids = tableState.selectedRows.data.map(({ index }) => {
356-
return campaigns[index].id;
357+
return this.state.campaigns[index].id;
357358
});
358359
this.props.handleChecked(ids);
359360
break;
@@ -365,17 +366,17 @@ export class CampaignTable extends React.Component {
365366
}
366367
};
367368

368-
return campaigns.length === 0 ? (
369+
return this.state.campaigns.length === 0 ? (
369370
<Empty title="No campaigns" icon={<SpeakerNotesIcon />} />
370371
) : (
371372
<div>
372373
<br />
373374
<br />
374375
<MUIDataTable
375-
data={campaigns}
376+
data={this.state.campaigns}
376377
columns={this.prepareTableColumns(
377378
this.props.data.organization,
378-
campaigns
379+
this.state.campaigns
379380
)}
380381
options={options}
381382
/>

src/components/AssignmentTexter/Controls.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,9 @@ export class AssignmentTexterContactControls extends React.Component {
125125
let currentInteractionStep = null;
126126

127127
if (availableSteps.length > 0) {
128-
const currentInteractionStep = deepCopy(
128+
currentInteractionStep = deepCopy(
129129
availableSteps[availableSteps.length - 1]
130130
);
131-
132131
currentInteractionStep.question.filteredAnswerOptions =
133132
currentInteractionStep.question.answerOptions;
134133
}
@@ -504,7 +503,6 @@ export class AssignmentTexterContactControls extends React.Component {
504503
filteredCannedResponses
505504
} = this.state;
506505
const { messages } = contact;
507-
508506
const availableInteractionSteps = getAvailableInteractionSteps(
509507
questionResponses,
510508
campaign.interactionSteps

src/containers/AdminCampaignList.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { dataTest } from "../lib/attributes";
1919
import loadData from "./hoc/load-data";
2020
import theme from "../styles/theme";
2121
import SortBy, {
22-
DUE_DATE_DESC_SORT
22+
ID_DESC_SORT
2323
} from "../components/AdminCampaignList/SortBy";
2424
import Search from "../components/Search";
2525
import CampaignTable from "../components/AdminCampaignList/CampaignTable";
@@ -38,7 +38,7 @@ const INITIAL_FILTER = {
3838
isArchived: false,
3939
searchString: ""
4040
};
41-
const INITIAL_SORT_BY = DUE_DATE_DESC_SORT.value;
41+
const INITIAL_SORT_BY = ID_DESC_SORT.value;
4242

4343
export class AdminCampaignList extends React.Component {
4444
static propTypes = {

0 commit comments

Comments
 (0)