-
Notifications
You must be signed in to change notification settings - Fork 524
Lab2: set page title for standalone projects #70180
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
sanchitmalhotra126
left a comment
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.
Nice! One comment about the Music Dance AI project logic
| projectManager = ProjectManagerFactory.getProjectManager(channelId); | ||
| projectManager = ProjectManagerFactory.getProjectManager( | ||
| channelId, | ||
| levelProperties.isProjectLevel || false |
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.
I think we can just pass false here actually - these sub-project managers are used by the individual tabs in the Music Dance AI project so we can support writing/reading from multiple different projects at once, but there's still an overall project manager for the whole Music Dance AI project in Lab2Registry. If we pass true here, I think we risk the sub-projects overwriting the page title.
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.
oh gotcha, will update!
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.
We want to have the other project manager creation in this file use the level property still, right?
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.
I think the other should be false too since it's also a "sub-project" project manager (I think the other only pertains to non-standalone projects anyway)
sanchitmalhotra126
left a comment
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.
LGTM!
Legacy projects put the project title in the page title for standalone projects. We never made this update for lab2 projects, so they currently will say
<Title of Standalone Level> - Code.org, for example Python lab saysNew Python Lab Project - Code.org. This updates lab2 levels to instead say<Project Title> - <Friendly Lab Name> - Code.org, which a suffix on code.org if we are in a non-prod environment (as our other page titles do).Before
After
Links
PR Creation Checklist: