Skip to content

Allow users to set single block params.#655

Merged
sunng87 merged 5 commits into
sunng87:masterfrom
cmrschwarz:set_block_parameter
Jul 2, 2024
Merged

Allow users to set single block params.#655
sunng87 merged 5 commits into
sunng87:masterfrom
cmrschwarz:set_block_parameter

Conversation

@cmrschwarz

@cmrschwarz cmrschwarz commented Jun 30, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown

Coverage Status

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

Comment thread src/json/value.rs
@coveralls

Copy link
Copy Markdown

Coverage Status

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

Comment thread src/json/value.rs Outdated
@coveralls

Copy link
Copy Markdown

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
@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