Skip to content

Update how ReviewView and PythonView handle missing video #1616

@huyenltnguyen

Description

@huyenltnguyen

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions