Closed interim17 closed 5 months ago
Status | Category | Percentage | Covered / Total |
---|---|---|---|
π΄ | Statements | 40.39% | 2046/5065 |
π΄ | Branches | 43.22% | 845/1955 |
π΄ | Functions | 36.77% | 417/1134 |
π΄ | Lines | 40.61% | 1959/4823 |
Status of coverage: π’ - ok, π‘ - slightly more than threshold, π΄ - under the threshold
Oops my thing says "requested changes" but I meant to do a "general comments".
ok @toloudis this may constitute mission creep but I couldn't bring myself to write the comments on the recording
flag because its just not how we handle this type of thing in the rest of the repo.
New changes:
recording
propstartRecording
and stopRecording
noop methods for the front end to callisRecording
state more closely since we have removed the flags in the higher componentsisRecording
state because Viewer.tsx doesn't need to know it anymorelooks good, just FYI, there seems to be a slightly different behavior for me on safari than before: I can still hit the record button on safari in the test app but the resulting file won't play.
Hm, that is unfortunate, Safari on my machine still disables the feature. I think I'll merge this PR and maybe write an issue for Safari issues.
Review Time
Small
Problem
Closes #368
onRecordedMovies
should be optional for implementations where movie recording is not desired.Note: snuck in a commit in the prettier config to prevent {" "} < ---- those from appearing, I think it works to prevent them showing up when not needed, can add to sim-website too
Solution
Made the
recording
andonRecordedMovie
props optional. IfonRecordedMovie
is undefined, setrecorder
to null, and adjusted references to account for that.When a callback is provided, the feature will be enabled, and if the prop is undefined then no
FrameRecorder
functions should be called even ifrecording
is set totrue
.Added a function in test-bed to check if recording is enabled or not and display a message if so.
To test you can comment out the prop assigment:
// onRecordedMovie={this.onRecordedMovie}
Recording buttons should be disabled but viewer should work.For a further test provide a true value to
isRecordingEnabled
Buttons will be clickable but should have no effect.