Skip to content

fix(learn): hide console button for non-JS challenges - #1825

Open
rohanesor wants to merge 1 commit into
freeCodeCamp:mainfrom
rohanesor:fix/hide-console-button-non-js
Open

fix(learn): hide console button for non-JS challenges#1825
rohanesor wants to merge 1 commit into
freeCodeCamp:mainfrom
rohanesor:fix/hide-console-button-non-js

Conversation

@rohanesor

Copy link
Copy Markdown

Fixes #1666

Description

Hides the JavaScript console button (Icons.terminal) from the challenge action bar for non-JS challenges (such as HTML/CSS-only steps).

Motivation & Context

Previously, the console button appeared for all interactive challenges regardless of language. For HTML/CSS challenges, the JS console is irrelevant and shouldn't be displayed.

Changes Made

  • mobile-app/lib/ui/views/learn/challenge/challenge_view.dart: Added hasJsFile check that inspects challenge.files for Ext.js or Ext.jsx extensions, rendering the console _panelIconButton conditionally if (hasJsFile).

Checklist

  • Tested with HTML/CSS and JS challenges.
  • Follows existing project architecture and conventions.
  • Clean minimal change (~8 lines in 1 file).
image

@rohanesor
rohanesor requested a review from a team as a code owner August 6, 2026 05:31
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.

Console button shouldn't appear in non-JS challenges

1 participant