Remove redundant boundary checks for section movement in TrainingUnitSectionsEditor
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
- Eliminated the checks that prevented section movement across slots when crossing the boundary between 'parallel' and 'whole_group' phases, streamlining the section management logic and improving code clarity.
This commit is contained in:
1 parent
0fdee610ed
commit
7d2661a8e8
1 file changed
-21
@@ -928,27 +928,6 @@ export default function TrainingUnitSectionsEditor({
|
||||
}
|
||||
}
|
||||
|
||||
let crossesParallelWholePlanBoundary = false
|
||||
if (
|
||||
enableParallelPhaseControls &&
|
||||
insertBeforeIdx >= 0 &&
|
||||
insertBeforeIdx < list.length
|
||||
) {
|
||||
const fromK = list[fromSi]?.planLoc?.phaseKind
|
||||
const toK = list[insertBeforeIdx]?.planLoc?.phaseKind
|
||||
crossesParallelWholePlanBoundary =
|
||||
(fromK === 'parallel' && toK === 'whole_group') ||
|
||||
(fromK === 'whole_group' && toK === 'parallel')
|
||||
}
|
||||
|
||||
if (
|
||||
enableParallelPhaseControls &&
|
||||
(insertBeforeIdx === fromSi || insertBeforeIdx === fromSi + 1) &&
|
||||
!crossesParallelWholePlanBoundary
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
typeof onMoveSectionsAcrossSlots === 'function' &&
|
||||
sectionToSlot >= 0 &&
|
||||
|
||||
Reference in new issue
Block a user