Migrate picker-script-create to PCUI#1706
Merged
willeastcott merged 2 commits intomainfrom Jan 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the script-create picker UI from legacy components to PCUI in both the main editor and code editor, while updating styling and keyboard handling to modern patterns.
Changes:
- Reimplements
picker-script-createin the editor and code editor usingOverlay,Label, andTextInputfrom@playcanvas/pcui, including typed callback signatures. - Modernizes keyboard handling from
keyCodetoevt.keyand simplifies callback invocation with optional chaining. - Updates SCSS to target PCUI overlay structure and classes for the script-create picker, aligning styling with existing PCUI-based pickers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/editor/pickers/picker-script-create.ts |
Replaces legacy UI elements with PCUI components, adds a typed callback, and updates key handling and focus behavior for the script-create picker in the main editor. |
src/code-editor/pickers/picker-script-create.ts |
Aligns the code editor’s script-create picker with the updated implementation, including typed callback, simplified input config, and modern key handling. |
sass/editor/_editor-main.scss |
Replaces legacy .picker-script-create.center styling with PCUI-specific .pcui-overlay.picker-script-create rules mirroring the code editor’s PCUI overlay styles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kpal81xd
approved these changes
Jan 23, 2026
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.
Summary
picker-script-createfrom Legacy UI components to PCUI (Overlay,Label,TextInput)Changes
Component Migration
LegacyOverlay,LegacyLabel,LegacyTextFieldwith PCUI equivalentsinput.on('keydown', ...)) instead of DOM listenersKeyboard Handling
keyCodetoevt.keyshowand removed onhidefor clean lifecycle managementValidation UX
keyChange: true- error message updates as user typesCode Quality
Adds TypeScript typing for callback parameter
Uses nullish coalescing (
??) for defaultsUses optional chaining (
callback?.(...))Removes redundant code and comments
I confirm I have read the contributing guidelines