feat: phone_ide v2 concept#1513
Conversation
…or options in ChallengeView
…tor initialization and enhance file handling
…dling and editor initialization
There was a problem hiding this comment.
Pull Request Overview
A concept implementation for Phone IDE v2 that integrates a local phone_ide package and refactors the challenge editor lifecycle in the app.
- Updated dependency to reference local
phone_idepath. - Added
Editorstate management and initialization inChallengeViewModel. - Refactored
ChallengeViewto consume the view model’s editor instance and updated file extension enum.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mobile-app/pubspec.yaml | Switched phone_ide dependency to a local path. |
| mobile-app/lib/ui/views/learn/challenge/challenge_viewmodel.dart | Added _editor/editorLanguage state, initEditor and setters. |
| mobile-app/lib/ui/views/learn/challenge/challenge_view.dart | Removed inline editor setup, now uses model.editor and loading spinner. |
| mobile-app/lib/enums/ext_type.dart | Extended Ext enum cases with a value field for string mapping. |
Comments suppressed due to low confidence (2)
mobile-app/lib/ui/views/learn/challenge/challenge_viewmodel.dart:238
- [nitpick] Setter name 'setEditor' is redundant and non-idiomatic; consider using Dart's built-in setter syntax (e.g. 'set editor(Editor value)').
set setEditor(Editor editor) {
mobile-app/lib/ui/views/learn/challenge/challenge_viewmodel.dart:282
- Setter 'setMounted' is used here but not defined in the class, leading to a compile error; define a
set setMounted(bool value)setter or update this usage.
setMounted = true;
…tor for code highlighting
|
The following error is thrown in the logs anytime any editor challenge is opened |
Nirajn2311
left a comment
There was a problem hiding this comment.
Resetting the code of a challenge removes the whole code completely across all regions
…n ChallengeViewModel
This issue has been fixed. It was due the widget not being mounted while calling state. I've also updated how we dispose and listen to subscriptions in phoneIDE and here. Now we should be correctly handling state and subscriptions according to Flutter. |
…in ChallengeViewModel and updating onDispose in ChallengeView
Checklist:
mainbranch of the repo.Do not merge before freeCodeCamp/PhoneIDE#76