Skip to content

fix: disable preview for python challenges#1770

Open
Sembauke wants to merge 1 commit intofreeCodeCamp:mainfrom
Sembauke:codex/disable-python-preview-clean
Open

fix: disable preview for python challenges#1770
Sembauke wants to merge 1 commit intofreeCodeCamp:mainfrom
Sembauke:codex/disable-python-preview-clean

Conversation

@Sembauke
Copy link
Copy Markdown
Member

@Sembauke Sembauke commented Apr 6, 2026

What changed

  • Added noPreviewChallengeTypes in ChallengeView._panelIconButtons.
  • Replaced chained challengeType != ... checks with a single contains check.
  • Ensured Python challenge types (20, 23, 27, 29) do not show the preview toggle.

Why

Python challenges do not render project preview the way HTML/CSS/JS challenges do. Some Python challenge types were not excluded, so the preview eye icon appeared unnecessarily.

Root cause

The exclusion guard listed only challenge types 1, 26, 28, and 29, missing Python types 20, 23, and 27.

Validation

  • flutter analyze lib/ui/views/learn/challenge/challenge_view.dart

@Sembauke Sembauke changed the title [codex] disable preview for python challenges fix: disable preview for python challenges Apr 6, 2026
@Sembauke Sembauke marked this pull request as ready for review April 6, 2026 10:34
@Sembauke Sembauke requested a review from a team as a code owner April 6, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant