Skip to content

fix: show "Terminal" tab label for Python lessons on mobile layout#66492

Open
perashanid wants to merge 1 commit intofreeCodeCamp:mainfrom
perashanid:fix/terminal-label-python
Open

fix: show "Terminal" tab label for Python lessons on mobile layout#66492
perashanid wants to merge 1 commit intofreeCodeCamp:mainfrom
perashanid:fix/terminal-label-python

Conversation

@perashanid
Copy link
Copy Markdown

Checklist:

  • I have read and followed the contribution guidelines.
  • I have read and followed the how to open a pull request guide.
  • My pull request targets the main branch of freeCodeCamp.
  • I have tested these changes either locally on my machine, or GitHub Codespaces.

Closes #63047

The mobile layout was always showing "Preview" as the tab label, even for Python challenges where it should say "Terminal". The desktop layout (action-row.tsx) already handled this correctly via an isPythonChallenge check, but that logic was missing from the mobile layout.

Changes:

  • Added challengeType prop to MobileLayoutProps
  • Added isPythonChallenge check using the same challenge types as the desktop layout
  • Updated the tab label to conditionally render "Terminal" or "Preview"
  • Passed challengeType from show.tsx to MobileLayout

@perashanid perashanid requested review from a team as code owners March 15, 2026 20:36
@github-actions github-actions bot added platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. deprioritized PR reviews are deprioritized; lacks productive input and ignores codebase best practices. labels Mar 15, 2026
@github-actions

This comment was marked as resolved.

@perashanid
Copy link
Copy Markdown
Author

here is a screenshot on local testing

563653210-c5c072c9-a2f4-49db-8a18-aea1c5eedb1f

@Sembauke Sembauke removed the deprioritized PR reviews are deprioritized; lacks productive input and ignores codebase best practices. label Mar 16, 2026
@Sembauke
Copy link
Copy Markdown
Member

I do not think it fully closes this issue see: #63061

@huyenltnguyen huyenltnguyen added the status: waiting update Is awaiting update, after feedback or request for changes label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: waiting update Is awaiting update, after feedback or request for changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change "Preview" button to "Terminal" for Python lessons

3 participants