-
Notifications
You must be signed in to change notification settings - Fork 526
Set Web Lab 2 initial tab to AI tutor (with instructions drawer) #70724
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
|
|
||
| .collapsedInstructionsDrawerInset { | ||
| height: 50px; | ||
| .instructionsDrawerInset { |
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.
Inset for both collapsed and expanded instructions drawer state.
| > | ||
| <div className={styles.instructionsScrollArea}> | ||
| <div ref={instructionsContentRef}>{instructionsContent}</div> | ||
| {!isCollapsed && ( |
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.
This div even with height 0 was impacting spacing when collapsed.
molly-moen
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.
Looks good. We'll have to figure out long-term the best solution for cases where web lab 2 does not have ai tutor on (thinking about csp), but I think tying the default tab to having the drawer makes sense for now, and may solve that in the long-term too.
| }, [levelId, viewAsUserId]); | ||
| // Reset current tab to instructions when switching levels or viewAsUserId unless there is an instructions drawer. | ||
| // If there is an instructions drawer, we set initial tab to the AI Tutor tab. | ||
| if (hasInstructionsDrawer) { |
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 know right now you won't have instructions drawer set to true without ai tutor, but we should probably verify that there is an ai tutor tab here before setting it as the current tab.
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.
Updated!
| And I wait until current URL contains "http://studio.code.org/courses/allthethingscourse/units/1/lessons/50/levels/2" | ||
| # Check that progress has been updated for the previous level | ||
| Then I verify progress in the header of the current page is "perfect" for level 1 | ||
| And I wait until element "#resource-panel-tab-validation" is visible |
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.
This UI test has been flaky in general so adding a wait step here.
This follows up #70696 which added the instructions drawer to AI Tutor panel in Web Lab 2. This PR sets the initial resource panel tab to AI Tutor on
weblab2levels.It also includes minor styling updates to the instructions drawer.
After update
Screencast of user on music and pythonlab, initial tab is Instructions. But then user navigates to weblab2, initial tab is AI Tutor.
Screen.Recording.2026-02-10.at.3.38.55.PM.mov
Screencast of updated styling of AI tutor panel with instructions drawer. Note that there is now an inset in the chat workspace for both collapsed and expanded instructions drawer.
Screen.Recording.2026-02-10.at.3.37.22.PM.mov
Links
Testing story
I confirmed locally that initial tab on
weblab2is AI tutor, but check on on other labs (music, aichat, pythonlab) that initial tab is still Instructions.Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Creation Checklist: