source-academy / frontend

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)
https://sourceacademy.org
Apache License 2.0
101 stars 164 forks source link

CSE Machine: Fix some UI & animations issues, and add tests #2936

Open CZX123 opened 2 months ago

CZX123 commented 2 months ago

Description

This PR fixes some UI & animations issues, and add some tests for the CSE machine's layout and animations. Fixes #2921 fully by correctly calculating the width of the frame with a rune. Fixes #2959. Fixes #2716. The new result is shown below:

Changes

UI

Animations

Testing

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9101318930

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/cseMachine/tests/snapshots/CseMachineAnimation.tsx.snap 0 1 0.0%
src/features/cseMachine/components/ControlItemComponent.tsx 1 2 50.0%
src/features/cseMachine/components/StashItemComponent.tsx 1 2 50.0%
src/features/cseMachine/CseMachineUtils.ts 3 5 60.0%
src/features/cseMachine/components/Frame.tsx 20 22 90.91%
src/features/cseMachine/animationComponents/FrameCreationAnimation.tsx 0 4 0.0%
src/features/cseMachine/CseMachineAnimation.tsx 1 7 14.29%
src/features/cseMachine/CseMachineLayout.tsx 5 11 45.45%
<!-- Total: 66 89 74.16% -->
Files with Coverage Reduction New Missed Lines %
src/features/cseMachine/CseMachineAnimation.tsx 1 14.29%
src/features/cseMachine/CseMachineLayout.tsx 2 63.61%
src/features/cseMachine/animationComponents/FrameCreationAnimation.tsx 2 0.0%
src/features/cseMachine/CseMachineUtils.ts 3 68.42%
<!-- Total: 8 -->
Totals Coverage Status
Change from base Build 9101202777: 0.6%
Covered Lines: 4976
Relevant Lines: 14699

💛 - Coveralls