Skip to content

feat(extension): support grouped updates - #752

Merged
JoviDeCroock merged 4 commits into
preactjs:mainfrom
43081j:grouped-updates
Aug 29, 2025
Merged

feat(extension): support grouped updates#752
JoviDeCroock merged 4 commits into
preactjs:mainfrom
43081j:grouped-updates

Conversation

@43081j

@43081j 43081j commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

This makes the existing "group updates" setting work.

When enabled, repeated updates of the same tree will be grouped into one node with a count.

The updates are not lost, in that the setting can be disable to re-expand the nodes.

Fixes #736


Screen.Recording.2025-08-28.at.11.22.02.mov

This makes the existing "group updates" setting work.

When enabled, repeated updates of the same tree will be grouped into one
node with a count.

The updates are not lost, in that the setting can be disable to
re-expand the nodes.
@changeset-bot

changeset-bot Bot commented Aug 28, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2c1014c

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

@netlify

netlify Bot commented Aug 28, 2025

Copy link
Copy Markdown

Deploy Preview for preact-signals-demo ready!

Name Link
🔨 Latest commit 2c1014c
🔍 Latest deploy log https://app.netlify.com/projects/preact-signals-demo/deploys/68b16d3d7d1103000844ddb5
😎 Deploy Preview https://deploy-preview-752--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.

Comment thread extension/src/components/UpdateTreeNode.tsx Outdated
Comment thread .editorconfig
@JoviDeCroock

Copy link
Copy Markdown
Member

One remark from your video, should we do 2 -> 3 -> 4 or 2 -> 4 - currently it sais 2 - 3 but I wouldn't do that as it shows only the first value evolution rather than the full story

Comment thread extension/src/components/UpdatesContainer.tsx Outdated
@43081j

43081j commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

if we want to do that, i wonder if we should introduce a RenderedSignalUpdate type which would also solve my count issue (since the RenderedSignalUpdate would have a count, removing the need for the WeakMap and count props etc)

it could also then have a firstValue or some such thing


interface UpdateItemProps {
update: SignalUpdate;
count?: number;

@43081j 43081j Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

how about this @JoviDeCroock ?

we don't really need 2 tree types for this part imo

since this interface already represents a rendered update, it may as well have an optional count?

sorry i commented on the wrong thing. i meant to comment on the UpdateTreeNode

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@43081j

43081j commented Aug 29, 2025

Copy link
Copy Markdown
Contributor Author

should we do 2 -> 3 -> 4 or 2 -> 4

i did get this working, but without showing the full path i think it gets confusing

image

this is actually telling us the first value was 0, a bunch of changes happened, then the value was 5, then 6.

the gap from 0 to 5 i think is more confusing than not having this

but if we do 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 - things will get pretty long, quickly

edit:

image

this kinda works a bit better

@JoviDeCroock
JoviDeCroock merged commit 3baf5e9 into preactjs:main Aug 29, 2025
6 checks passed
@43081j
43081j deleted the grouped-updates branch August 29, 2025 10:35
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.

Repeated updates should collapse

2 participants