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

[Long Callback] Support pattern matching for long callbacks side updates (progress/cancel/running) #2111

Closed
T4rk1n opened this issue Jun 30, 2022 · 3 comments · Fixed by #2822
Assignees
Labels
bug something broken

Comments

@T4rk1n
Copy link
Contributor

T4rk1n commented Jun 30, 2022

Long callbacks progress, running and cancel dependencies should support pattern matching ids.

@milind
Copy link

milind commented Apr 10, 2023

Was this issue ever resolved? I think that I'm running into it in my current application in trying to assign a pattern-matching component to the cancel parameter.

@Ciaran-YouSeq
Copy link

thank you @T4rk1n - can I ask if there are plans to add pattern matching for progress, running and cancel in the near future?

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Apr 12, 2023

@Ciaran-YouSeq It's in the backlog... If anyone want to work on this it would be a good introduction to renderer development, I can give some pointers below.

The side update are performed in this function:

function sideUpdate(outputs: any, dispatch: any, paths: any) {
toPairs(outputs).forEach(([id, value]) => {
const [componentId, propName] = id.split('.');
const componentPath = paths.strs[componentId];
dispatch(
updateProps({
props: {[propName]: value},
itempath: componentPath
})
);
dispatch(
notifyObservers({id: componentId, props: {[propName]: value}})
);
});
}

We have a function to get path from id:

export function getPath(paths, id) {

The side update will need to be integrated with the getPath function, the returned path in that case may be a array of path or a path itself, then modify the dispatch to be on a loop depending on that result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants