Add Tab Functionality to the Plugins#25
Conversation
🦋 Changeset detectedLatest commit: 3e097ba The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Code Review
This pull request introduces a new @sourceacademy/common-tabs package to define tab-related interfaces, refactors the web test plugin to register a test tab, and updates the build script to wrap external plugins in a module wrapper. The review feedback highlights three key areas for improvement: initializing module.exports as an empty object with an exports reference in the build wrapper to prevent runtime errors in standard CommonJS modules, explicitly importing React in the new tabs package to avoid TypeScript compilation issues for consumers, and prefixing the unused conduit parameter with an underscore in the runner test plugin to prevent lint warnings.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
The issue underpinning the migration of host-side plugins to external plugins is a requirement to display tabs on the frontend. In fact, most visualization plugins (the CSE machine, the Stepper, the Data Viz, etc.) require custom tabs. To retain the modularity gains provided by plugins, this PR aims to add a standardized interface to register, display, hide and unregister tabs.
This PR,
@sourceacademy/common-tabspackage, with theITabServiceandTabtypes.cjsand.jsexternal plugins to accept a custom require provider for thereact,react/jsx-runtime, etc. packages.Wiki Additions:
.jsformat