Standalone Sketch Lab#73988
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Sketch Lab as a standalone/project-backed Lab2 experience, including share-view UI alignment with other Lab2 labs and project-level wiring in dashboard.
Changes:
- Adds a new Sketch Lab project level and registers
sketchlabas a project type inProjectsController. - Introduces a reusable Lab2 share sidebar (
ShareButtonPanel) and adopts it in Web Lab 2, Python Lab, and Sketch Lab. - Updates Sketch Lab ReactFlow view to support share mode and standalone resource-panel collapsing behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dashboard/config/levels/custom/sketchlab/New Sketch Lab Project.level | Adds the “New Sketch Lab Project” level config marked as a project level. |
| dashboard/app/models/levels/sketchlab.rb | Persists is_project_level on Sketch Lab levels. |
| dashboard/app/controllers/projects_controller.rb | Registers sketchlab in the project-level name map. |
| apps/src/weblab2/layout/ShareView.tsx | Refactors share sidebar to use shared ShareButtonPanel. |
| apps/src/pythonlab/layout/ShareView.tsx | Refactors share sidebar to use shared ShareButtonPanel while keeping lab-specific controls. |
| apps/src/sketchlab/reactFlow/ShareView.tsx | Adds a Sketch Lab share-only view using standard share sidebar + read-only canvas. |
| apps/src/sketchlab/reactFlow/ReactFlowSketchLabView.tsx | Adds share-view branching and better handling for collapsed standalone resource panel. |
| apps/src/sketchlab/reactFlow/introTour/useReactFlowSketchLabTour.ts | Allows disabling the intro tour in share view. |
| apps/src/sketchlab/reactFlow/components/ReactFlowCanvas.tsx | Defaults tool to “grab” for read-only viewers. |
| apps/src/lab2/views/components/layout/ShareButtonPanel.tsx | New shared sidebar component for share pages (view/remix/report). |
| apps/src/lab2/views/components/layout/share-layout.module.scss | Widens share sidebar column to fit buttons. |
| apps/src/lab2/views/components/Instructions/ResourcePanel/index.tsx | Adjusts standalone auto-collapse behavior (keep open when AI Tutor tab exists). |
| apps/src/lab2/constants.ts | Enables new share dialog handling for sketchlab. |
molly-moen
marked this pull request as ready for review
July 20, 2026 23:55
hannahbergam
approved these changes
Jul 21, 2026
hannahbergam
left a comment
Contributor
There was a problem hiding this comment.
Super thoughtful and also exciting! Godspeed
| @@ -0,0 +1,77 @@ | |||
| import FontAwesomeV6Icon from '@code-dot-org/component-library/fontAwesomeV6Icon'; | |||
Contributor
There was a problem hiding this comment.
Thank you for this refactor!
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.
This adds a standalone version of sketch lab, currently only available via
/projects/sketchlab/new. It also adds a share view page for standalone sketch lab. The changes included here are:The most finicky part of all this was getting the right border on the collapsed tabs working correctly, because we currently draw a border for the previously-opened collapsed tab, but not the other ones. Music Lab has some magical workaround for this where everything looks like one border, and web lab 2/python lab use the resize bar to cover it up (which they shouldn't do, and I will look into fixing that as a follow up). I added a way to hide this extra border so sketch lab can draw a basic 1px border, but there may be a way to clean this up so all labs don't need custom logic here.
Screenshots
Standalone Project
Share view
Note that light mode is buggy, see note and linked slack thread above. I also removed "show code" for sketch lab since there's no code to show.
Links
Testing story
Tested locally.