Skip to content

feat(learn): add web-only indicator icon and direct browser launch fo… - #1824

Open
rohanesor wants to merge 1 commit into
freeCodeCamp:mainfrom
rohanesor:feat/web-only-course-indicators
Open

feat(learn): add web-only indicator icon and direct browser launch fo…#1824
rohanesor wants to merge 1 commit into
freeCodeCamp:mainfrom
rohanesor:feat/web-only-course-indicators

Conversation

@rohanesor

Copy link
Copy Markdown

Description

Adds a visual indicator (open_in_new icon) to course cards on the Learn page for superblocks that require a web browser (Coding Interview Prep, Project Euler, Rosetta Code, The Odin Project, Foundational C# with Microsoft). Tapping these cards now routes the user directly to the course in the web browser instead of showing a snackbar message or opening incomplete in-app templates.

Motivation & Context

Previously, web-only courses looked identical to mobile-native courses with an arrow (>) icon. Users only discovered that a course required a web browser after tapping it, resulting in an inconsistent user experience.

Changes Made

  • mobile-app/lib/ui/views/learn/utils/learn_globals.dart: Added webOnlySuperBlocks registry listing dashed names of browser-required courses (following existing hasNoCert, hasDialogue, and chapterBasedSuperBlocks patterns).
  • mobile-app/lib/ui/views/learn/landing/landing_viewmodel.dart: Added openInBrowser(String dashedName) to launch ${AuthenticationService.baseURL}/learn/$dashedName using url_launcher.
  • mobile-app/lib/ui/views/learn/landing/landing_view.dart:
    • Displays Icons.open_in_new trailing icon for web-only courses.
    • Adds Tooltip showing "Not available use the web version" (context.t.not_available_web) on long press.
    • Directly launches browser on tap when isWebOnly is true.

Checklist

  • Tested and verified no regressions on mobile-native courses.
  • Follows existing project architecture and naming conventions.
  • Reuses existing localization keys (not_available_web).
  • Clean minimal changes (~35 lines across 3 files).
image

@rohanesor
rohanesor requested a review from a team as a code owner August 5, 2026 18:11
@rohanesor
rohanesor force-pushed the feat/web-only-course-indicators branch from 97ab3f3 to a20b05b Compare August 6, 2026 04:00
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