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

Include shared blocks in appOptions.level #22476

Merged
merged 11 commits into from May 22, 2018
Merged

Conversation

balderdash
Copy link
Contributor

@balderdash balderdash commented May 17, 2018

Pass block pool blocks to the client as appOptions.level.sharedBlocks. These blocks include a bit more information than the existing custom blocks, structured as so:

sharedBlocks: [
  {
    name: 'block_name',
    category: 'Toolbox Category',
    config: {
      <custom block config>
    },
    helperCode: 'function someHelperFunction() {}',
  },
  ...
]

The custom block config is the same as the existing level-specific custom block config, documented here.

After installing the blocks, append them to the specified categories unless level.hideCustomBlocks is set.

@balderdash balderdash changed the title Include shared blocks in appOptions.level` Include shared blocks in appOptions.level May 17, 2018
@balderdash
Copy link
Contributor Author

@balderdash balderdash force-pushed the block-pool-piping branch 2 times, most recently from 9c8cea7 to ced19b3 Compare May 18, 2018 06:51
@balderdash balderdash changed the base branch from block-pool-model to append-blocks May 18, 2018 06:52
@balderdash balderdash changed the base branch from append-blocks to block-pool-model May 18, 2018 06:52
@balderdash balderdash changed the base branch from block-pool-model to staging May 18, 2018 23:53
Copy link
Contributor

@joshlory joshlory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM. What is the plan to test this feature?

@balderdash
Copy link
Contributor Author

I'll add some unit tests in a followup PR to check that appOptions.level.sharedBlocks is being populated as expected, but I'll need a UI test to verify that blocks make it all the way from the DB to the blockSpace.

@balderdash balderdash merged commit c64434f into staging May 22, 2018
@balderdash balderdash deleted the block-pool-piping branch May 22, 2018 20:00
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.

None yet

2 participants