Skip to content

fix: disable preview for python challenges#1770

Merged
Nirajn2311 merged 1 commit intofreeCodeCamp:mainfrom
Sembauke:codex/disable-python-preview-clean
Apr 8, 2026
Merged

fix: disable preview for python challenges#1770
Nirajn2311 merged 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
@Nirajn2311 Nirajn2311 merged commit 8f55519 into freeCodeCamp:main Apr 8, 2026
3 of 6 checks passed
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.

2 participants