Skip to content

Commit 9de2302

Browse files
authored
fix: disable step buttons when activity is not playing
docs: update citation information
1 parent 2bb31e6 commit 9de2302

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

CITATION.cff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ identifiers:
1818
value: 10.5281/zenodo.13862314
1919
description: DOI of the record on Zenodo. Valid for all versions.
2020
- type: doi
21-
value: 10.5281/zenodo.13862315
22-
description: DOI of version 3.0.0
21+
value: 10.5281/zenodo.14191420
22+
description: DOI of version 3.2.2
2323
- type: url
2424
value: >-
2525
https://github.com/graasp/graasp-app-collaborative-ideation
@@ -42,5 +42,5 @@ keywords:
4242
- hybrid
4343
license: AGPL-3.0-only
4444
commit: ea9f04805d47f6cfe49a74280e504f3331db99c7
45-
version: 3.0.0
46-
date-released: '2024-09-30'
45+
version: 3.2.2
46+
date-released: '2024-11-20'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The **Collaborative Ideation** app in Graasp was made to organize blended and on
2424

2525
If you use this software or take inspiration from it, please, cite it as below:
2626

27-
> La Scala, J. (2024). Collaborative Ideation (v3.0.0). Zenodo. https://doi.org/10.5281/zenodo.13862315
27+
> La Scala, J. (2024). Collaborative Ideation (v3.2.2). Zenodo. https://doi.org/10.5281/zenodo.14191420
2828
2929
For citing the latest version, use the permanent DOI: [10.5281/zenodo.13862314](https://doi.org/10.5281/zenodo.13862314)
3030

src/modules/orchestration/StepsButton.tsx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ import Typography from '@mui/material/Typography';
1212

1313
import { ORCHESTRATION_BAR_CY } from '@/config/selectors';
1414
import useSteps from '@/hooks/useSteps';
15-
import { ActivityStep, ActivityType } from '@/interfaces/interactionProcess';
15+
import {
16+
ActivityStatus,
17+
ActivityStep,
18+
ActivityType,
19+
} from '@/interfaces/interactionProcess';
1620

1721
import useStepTimer from '../common/stepTimer/useStepTimer';
22+
import { useActivityContext } from '../context/ActivityContext';
1823
import CommandButton from './CommandButton';
1924
import WarningNextStepDialog from './WarningNextStepDialog';
2025
import WarningPreviousStepDialog from './WarningPreviousStepDialog';
@@ -42,6 +47,9 @@ const StepsButton: FC<StepsButtonProps> = ({ enable }) => {
4247
moveToNextStep,
4348
} = useSteps();
4449

50+
const { activityState } = useActivityContext();
51+
const { status } = activityState.data;
52+
4553
const stepHasTimeout = useStepTimer();
4654
// const promise = useRef<Promise<void>>();
4755

@@ -53,13 +61,19 @@ const StepsButton: FC<StepsButtonProps> = ({ enable }) => {
5361
}, [nbrOfSteps, stepIndex]);
5462

5563
const disablePreviousStep = useMemo(
56-
() => typeof previousStep === 'undefined' || isChangingStep,
57-
[isChangingStep, previousStep],
64+
() =>
65+
typeof previousStep === 'undefined' ||
66+
isChangingStep ||
67+
status !== ActivityStatus.Play,
68+
[isChangingStep, previousStep, status],
5869
);
5970

6071
const disableNextStep = useMemo(
61-
() => typeof nextStep === 'undefined' || isChangingStep,
62-
[isChangingStep, nextStep],
72+
() =>
73+
typeof nextStep === 'undefined' ||
74+
isChangingStep ||
75+
status !== ActivityStatus.Play,
76+
[isChangingStep, nextStep, status],
6377
);
6478

6579
const nextStepColor = useMemo(() => {

0 commit comments

Comments
 (0)