Skip to content

Chrome extension stuff #727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Chrome extension stuff #727

wants to merge 4 commits into from

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Jul 29, 2025

This is the start of a chrome extension, currently it contains two views. An updates view where we'll stream in updates happening on the page and a second view which contains the signals graph that we can find on the page.

The thing that I'm trying to figure out is a way to display React & Preact components in a framework agnostic way. For instance in the Graph component it would be neat to show which signal is related to which component.

On second thought, maybe it's just worth adding adapters that can send a message of ENTER_COMPONENT and EXIT_COMPONENT where in the Preact adapter we can use options._render. For react I don't know yet what to use though

Another thing that needs to happen is adding a Babel plugin to automatically add names to every signal/computed/effect in user-code. We could use this to add fileName + lineNumber

Copy link

changeset-bot bot commented Jul 29, 2025

⚠️ No Changeset found

Latest commit: 0de9cfa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Jul 29, 2025

Deploy Preview for preact-signals-demo ready!

Name Link
🔨 Latest commit 0de9cfa
🔍 Latest deploy log https://app.netlify.com/projects/preact-signals-demo/deploys/6888c027f693040008b4594e
😎 Deploy Preview https://deploy-preview-727--preact-signals-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

github-actions bot commented Jul 29, 2025

Size Change: +3.09 kB (+3.54%)

Total Size: 90.4 kB

Filename Size Change
docs/dist/assets/bench.********.js 1.59 kB +3 B (+0.19%)
docs/dist/assets/client.********.js 46.2 kB -1 B (0%)
docs/dist/assets/index.********.js 836 B +2 B (+0.24%)
docs/dist/assets/jsxRuntime.module.********.js 297 B +2 B (+0.68%)
docs/dist/assets/preact.module.********.js 4.72 kB +6 B (+0.13%)
docs/dist/assets/signals.module.********.js 2.45 kB +2 B (+0.08%)
docs/dist/basic-********.js 245 B +1 B (+0.41%)
packages/debug/dist/debug.js 3.29 kB +1.55 kB (+88.93%) 🆘
packages/debug/dist/debug.mjs 2.84 kB +1.53 kB (+116.22%) 🆘
ℹ️ View Unchanged
Filename Size
docs/dist/assets/signals-core.module.********.js 1.56 kB
docs/dist/assets/style.********.js 21 B
docs/dist/assets/style.********.css 1.24 kB
docs/dist/nesting-********.js 1.13 kB
docs/dist/react-********.js 242 B
packages/core/dist/signals-core.js 1.59 kB
packages/core/dist/signals-core.mjs 1.6 kB
packages/preact/dist/signals.js 1.58 kB
packages/preact/dist/signals.mjs 1.55 kB
packages/react-transform/dist/signals-*********.js 5.93 kB
packages/react-transform/dist/signals-transform.mjs 5.12 kB
packages/react-transform/dist/signals-transform.umd.js 6.04 kB
packages/react/dist/signals.js 188 B
packages/react/dist/signals.mjs 150 B

compressed-size-action

@JoviDeCroock JoviDeCroock force-pushed the chrome-extension-stuff branch from de2a6a8 to 58225ae Compare July 29, 2025 11:01
@JoviDeCroock JoviDeCroock force-pushed the chrome-extension-stuff branch from 58225ae to 0de9cfa Compare July 29, 2025 12:35
],
"devtools_page": "devtools.html",
"background": {
"service_worker": "background.js"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't make much difference but FYI these can be ES modules now:

  "background": {
    "service_worker": "background.js",
    "type": "module"
  },

you don't use anything module-specific but may still be good to know :D


if (
filteredUpdates.length > 0 &&
(window as any).__PREACT_SIGNALS_DEVTOOLS__
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we strongly type this? might make maintenance easier

declare global {
  interface Window {
    __PREACT_SIGNALS_DEVTOOLS__?: SignalsDevToolsAPI;
  }
}

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.

2 participants