-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Lock home version campaign islands when no levels are unlocked #7946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Previously, you could click on them and then be taken to an empty map with nothing to do. Now, you can't click on them, and hovering over them shows a basic message to complete the previous world to unlock.
WalkthroughThe changes update the internationalization, user interface styling, and campaign display logic in the application. A new localization string for locked campaigns has been added, and the Pug template now makes use of this string via additional data attributes for improved tooltips and i18n support. Moreover, the campaign locking logic has been refined in the campaign view controller to properly account for campaign types and level counts, while the associated CSS has been updated to change the visual feedback on locked elements. Changes
Sequence Diagram(s)sequenceDiagram
participant CV as CampaignView
participant CL as Classroom Config
participant UI as UI Renderer
CV->>CL: Retrieve aceConfig (using optional chaining)
CL-->>CV: Return language value or undefined
CV->>CV: Set default language to 'python' if undefined
CV->>CV: Execute countLevels() to tally total, completed, and unlocked levels
CV->>CV: Determine campaign.locked using updated logic (excludes 'dungeon' and 'junior' if levels exist)
CV->>UI: Initialize tooltips on game controls and locked campaign elements
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, you could click on them and then be taken to an empty map with nothing to do. Now, you can't click on them, and hovering over them shows a basic message to complete the previous world to unlock.

Summary by CodeRabbit
New Features
Style
Bug Fixes