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

Allow users to set single block params. #655

Merged
merged 5 commits into from
Jul 2, 2024

Conversation

cmrschwarz
Copy link
Contributor

@cmrschwarz cmrschwarz commented Jun 30, 2024

This just adds a simple method: set_block_param to the BlockContext.
It also makes the members of the (already public) PathAndJson struct public
so you can make effective use of it.

The existing set_block_params only allows replacing all block parameters.
Because there also is no get_block_params, this makes it impossible for a helper to
edit the block parameters effectively.

My usecase was to be able to write a helper that binds a variable to a name.
That helper is so useful that I added it to the examples aswell.

@coveralls
Copy link

Coverage Status

coverage: 81.371% (-0.09%) from 81.461%
when pulling b176776 on cmrschwarz:set_block_parameter
into 3504412 on sunng87:master.

src/json/value.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

Coverage Status

coverage: 81.147% (-0.3%) from 81.461%
when pulling 43db374 on cmrschwarz:set_block_parameter
into 3504412 on sunng87:master.

src/json/value.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

Coverage Status

coverage: 81.191% (-0.3%) from 81.461%
when pulling 12b2f56 on cmrschwarz:set_block_parameter
into 3504412 on sunng87:master.

@sunng87 sunng87 merged commit 57454fc into sunng87:master Jul 2, 2024
9 checks passed
@cmrschwarz cmrschwarz deleted the set_block_parameter branch July 13, 2024 20:32
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.

3 participants