Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add save warnings to PhET widget editor and unhide widget (#1582)
## Summary: * Add `getSaveWarnings()` function to PhET widget editor so that a widget cannot be saved with a non-PhET URL * Unhide the widget from the content editor <img width="1465" alt="A save warning popup, Are you sure you want to save your changes with errors? phet-simulation 1: Please enter a URL from the PhET domain." src="https://github.com/user-attachments/assets/34ac2131-5237-4aa3-9f63-91d379d8e12c"> Issue: LEMS-2292 ## Test plan: * `yarn jest packages/perseus/src/widgets/__tests__/phet-simulation.test.ts` * `yarn jest packages/perseus-editor/src/widgets/__tests__/phet-simulation-editor.test.tsx` * Verify that the widget and editor still show up in Storybook * Verify that the editor displays an error when a non-PhET URL is typed into the PhET widget content editor Author: aemandine Reviewers: SonicScrewdriver, aemandine Required Reviewers: Approved By: SonicScrewdriver Checks: ❌ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1582
- Loading branch information