Skip to content

Component select mode#57

Merged
HumbleBee14 merged 3 commits into
developfrom
component-select-mode
Jan 15, 2026
Merged

Component select mode#57
HumbleBee14 merged 3 commits into
developfrom
component-select-mode

Conversation

@HumbleBee14

@HumbleBee14 HumbleBee14 commented Jan 15, 2026

Copy link
Copy Markdown
Member

This pull request introduces two major enhancements: (1) support for "select mode" in the Roopik canvas and sandbox components, and (2) the ability to fetch and display actual browser-computed CSS values for inspected elements. These changes enhance both the developer experience and the accuracy of the design tools by allowing users to select elements for editing or inspection and to see their resolved CSS properties.

Select Mode Improvements:

  • Added support for "select mode" across the canvas and sandbox components, including new isSelectMode props, message handling for selection events, and communication of select mode state to sandboxes. This enables users to select elements in the UI, open source files at precise locations, and toggle selection state from the UI or keyboard. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Added a new SelectModeInjector to the injector pipeline, ensuring select mode functionality is available in the browser sandbox environment. [1] [2] [3]

  • Enhanced the file opening logic in the canvas panel to support both cursor positioning and selection highlighting, allowing precise navigation and selection in the source code editor. [1] [2] [3] [4]

Computed CSS Styles Support:

  • Introduced the ComputedStyleValues interface and added a computedStyles property to ElementStyleInfo, enabling storage of fully resolved CSS values (e.g., pixel values, computed colors, etc.) fetched from the browser. [1] [2]

  • Implemented logic in StyleSourceOrchestrator to fetch computed CSS values from the browser via CDP and include them in the style inspection results, providing more accurate and user-friendly style information in the design tab. [1] [2] [3] [4]

Introduces a select mode feature with a new SelectModeInjector, enabling element selection, box model visualization, and computed style inspection in sandboxed components. Updates the webview and extension to support select mode toggling, message passing, and opening source files with selection highlighting in the editor.
Introduces ComputedStyleValues to capture actual pixel values from the browser after CSS calculations (e.g., clamp, calc, rem). Updates the style inspector panel to prioritize these resolved values for display, and extends the orchestrator to fetch and include them in ElementStyleInfo. This improves accuracy and fidelity in the Design tab by showing the true rendered values.
@HumbleBee14 HumbleBee14 merged commit 206344c into develop Jan 15, 2026
6 of 9 checks passed
@HumbleBee14 HumbleBee14 deleted the component-select-mode branch January 15, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant