Skip to content
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

Triggerspec delay unique #2893

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

jsonn
Copy link
Contributor

@jsonn jsonn commented Sep 11, 2024

Description

If a node has multiple trigger specifications, they should have independent delays. If a single delayed trigger specification is targets multiple nodes, they should share the delay.

Corresponding issue: #2892

Testing

Both variants are explicitly tested. The non-sharing of multiple trigger specifications failed before.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

Note: the change is on top of #2891

The `changed` trigger modifier can see different event targets, either due
to the `from` modifier or event bubbling. The existing behavior trigger
only for one node (`from` modifier) or inconsistently (bubbling).

Use a nested weak map to keep track of the last value per distinguished
(trigger specification, event target node) pair. The weak map ensures
that Garbage Collection can still recycle the nodes.

If a event target was not seen via `from`, it is assumed changed for the
first time the trigger is hit.
@Telroshan
Copy link
Collaborator

Hey, you'll want to retarget to dev as per our contribution guidelines

@Telroshan Telroshan added bug Something isn't working needs rebase/retarget labels Sep 12, 2024
@jsonn jsonn changed the base branch from master to dev September 12, 2024 10:32
@jsonn
Copy link
Contributor Author

jsonn commented Sep 12, 2024

Hey, you'll want to retarget to dev as per our contribution guidelines

It was, stupid GitHub UI always chooses the wrong base here.

@Telroshan
Copy link
Collaborator

Thanks!

Note: I'm labelling this as "under discussion" until #2891 is processed, as the latter includes some changes that this PR depends on.

@Telroshan Telroshan added under discussion Issues that are being considered but require further alignment and removed needs rebase/retarget labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working under discussion Issues that are being considered but require further alignment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants