Add ID Field to Learning Maps for Shared State Management#29
Merged
mikebarkmin merged 4 commits intomainfrom Oct 20, 2025
Merged
Add ID Field to Learning Maps for Shared State Management#29mikebarkmin merged 4 commits intomainfrom
mikebarkmin merged 4 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add storage ID field to learning maps
Add Storage ID Field to Learning Maps for Shared State Management
Oct 17, 2025
Member
|
@copilot rename storage id to id and update the ui accordingly. |
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Contributor
Author
Renamed "Storage ID" to "ID" in all UI labels (English and German). Changes committed in 7a2e9f8. Screenshots: |
Copilot
AI
changed the title
Add Storage ID Field to Learning Maps for Shared State Management
Add ID Field to Learning Maps for Shared State Management
Oct 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements an ID feature that allows users to control which learning maps share the same state/progress. This provides flexibility for scenarios where multiple maps should track shared progress, such as different versions of the same curriculum.
Changes
1. ID Field in Settings
Added an optional
idfield to theSettingsinterface that allows users to assign a custom identifier to their learning maps. This ID takes priority over the json parameter for localStorage key management.2. Settings Drawer UI Enhancement
Enhanced the Settings Drawer with:
k7N98Dvna-RzKC7Vo5nAv-q(similar to json.openpatch.org format)Screenshots:
English:

German:

3. Learn View Storage Logic
Updated the
/learnroute to implement the following priority for localStorage:idfield from settings if presentjsonparameter if noidis setWhen loading a map with an ID that's already in use:
4. Internationalization
Added translations for both English and German:
Implementation Details
Files Modified:
packages/learningmap/src/types.ts- Addedidfield to Settings interfacepackages/learningmap/src/helper.ts- AddedgenerateRandomId()functionpackages/learningmap/src/translations.ts- Added EN/DE translationspackages/learningmap/src/SettingsDrawer.tsx- Added UI components for ID fieldplatforms/web/src/Learn.tsx- Implemented ID priority logicBenefits
✅ Users can explicitly link multiple learning maps to share progress
✅ Clear control over state management with intuitive UI
✅ Backward compatible - falls back to json parameter if no ID is set
✅ Prevents accidental state conflicts with user confirmation
✅ Enables versioning use cases (e.g., v1 and v2 of a curriculum sharing progress)
Testing
Fixes #28
Original prompt
Fixes #28
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.