bUnit icon indicating copy to clipboard operation
bUnit copied to clipboard

Add ComponentParameterCollectionBuilder overloaded methods

Open Qwertyluk opened this issue 1 year ago • 3 comments

Closes #751

note: I haven't updated CHANGELOG.md because I couldn't find an appropriate section for the changes for v2.

PR meta checklist

  • [ ] Pull request is targeted at main branch for code
    or targeted at stable branch for documentation that is live on bunit.dev.
  • [x] Pull request is linked to all related issues, if any.
  • [x] I have read the CONTRIBUTING.md document.

Code PR specific checklist

  • [x] My code follows the code style of this project and AspNetCore coding guidelines.
  • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
  • [ ] I have updated the appropriate sub section in the CHANGELOG.md.
  • [x] I have added, updated or removed tests to according to my changes.
    • [x] All tests passed.

Qwertyluk avatar May 10 '24 19:05 Qwertyluk

Hey @Qwertyluk - thank you for the PR. The change itself looks good. I have two small amendments:

  1. Could you add a very small example with an explanation in the docs (https://bunit.dev/docs/providing-input/passing-parameters-to-components.html?tabs=csharp)? This will help also users why one would need such a function.
  2. Can you add your contribution in the CHANGELOG.md? Under the Unreleased section add another Added with a small text crediting you (I guess you will get the gist if you read some others).

linkdotnet avatar May 13 '24 06:05 linkdotnet

If you just update the changelog like Steven says, then our deployment will add the correct version tag next to it.

egil avatar May 14 '24 07:05 egil

I've updated the changelog.

Though I haven't touched the documentation as I'm not sure if these changes are significant enough to require documentation updates. There was already an overloaded method ComponentParameterCollectionBuilder.Add that supports asynchronous callbacks and accepts Func<Task>. In this PR, I only added the ability to pass arguments for async callbacks so I have a feeling that mentioning these overloads might unnecessarily complicate the documentation. However, if you believe the documentation should be updated to include the support for asynchronous callback parameters, let me know and I'll make the necessary updates.

Qwertyluk avatar May 14 '24 14:05 Qwertyluk

Sorry for the delay. LGTM. Will run CI

linkdotnet avatar May 28 '24 06:05 linkdotnet