Description
We use the PythonView for FSD lectures, and currently the view assumes that challenge.video is never null. This will break the view now that we are removing videos rather than updating them.
Aside from adding a null check, we should also change the rendering condition of the transcript. The transcript is being rendered in an ExpansionTile, but in the case where the video is unavailable, I think the transcript should be immediately on the screen rather than requiring users to tap it to expand.
Perhaps the rendering logic should be:
- If
challenge.videoId != null, render the video
- Update the
Transcript widget to take an isCollapsible boolean
- If
challenge.transcript.isNotEmpty && isCollapsible, render the ExpansionTile
- If
challenge.transcript.isNotEmpty && !isCollapsible, render the transcript directly
Description
We use the
PythonViewfor FSD lectures, and currently the view assumes thatchallenge.videois nevernull. This will break the view now that we are removing videos rather than updating them.Aside from adding a null check, we should also change the rendering condition of the transcript. The transcript is being rendered in an
ExpansionTile, but in the case where the video is unavailable, I think the transcript should be immediately on the screen rather than requiring users to tap it to expand.Perhaps the rendering logic should be:
challenge.videoId != null, render the videoTranscriptwidget to take anisCollapsiblebooleanchallenge.transcript.isNotEmpty && isCollapsible, render theExpansionTilechallenge.transcript.isNotEmpty && !isCollapsible, render the transcript directly