Changelog
blockr 0.0.2.9000
Feature
- Improved add new block.
- Added new
category
to the registry. Now when a block is registered, you may pass a category parameter (which is used by the add block feature to sort blocks):
register_block(
constructor = new_tail_block,
name = "tail block",
description = "return last n rows",
category = "transform",
classes = c("tail_block", "transform_block"),
input = "data.frame",
output = "data.frame"
)
If not passed, the block will belong to uncategorized
blocks (default).
blockr 0.0.2
Breaking changes
- Change blocks and fields constructor names to
new_*_block
andnew_*_field
. For instance, for the select block, users are now supposed to usenew_select_block()
and notselect_block
. - Remove
data
from block constructor:
new_select_block <- function(columns = character(), ...) {
...
}
New features
- New validation functions:
validate_field()
andvalidate_block()
to check that values are consistent with data. These are used to then propagate any error to the user via JavaScript. - Evaluation stops whenever a block isn’t valid and the app should not crash.
- We can now instantiate block outside the stack with default parameter values (or use the old way with constructors):
# New way
data_blk <- new_dataset_block(selected = "lab", package = "blockr.data")
select_blk <- new_select_block("STUDYID")
stack <- new_stack(data_blk, select_blk)
# Old way
stack <- new_stack(new_data_block, new_select_block)