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

Tips for development of a new block #3

Open
ml-evs opened this issue Apr 22, 2024 · 1 comment
Open

Tips for development of a new block #3

ml-evs opened this issue Apr 22, 2024 · 1 comment

Comments

@ml-evs
Copy link
Member

ml-evs commented Apr 22, 2024

There are a few steps that need to be undertaken to create a new block as of datalab 0.4, as we discussed. To summarise, I would say the best option is to copy the EIS block, both Python and JS code.

  • Copy the eis folder in from apps into the desired block name
  • The block can save keys under self.data: bokeh_plot_data will cause a bockeh plot to be shown in the UI, freeform_comment will render an HTML comment.
  • Add a link to the block in the blocks/__init__.py file where other blocks are registered

Then in the UI:

  • Copy the webapp/src/components/datablock/EISBlock.vue into the desired new file
  • Register the new component in resources.js with the desired names
@pntoka
Copy link

pntoka commented Apr 24, 2024

In the UI in the copied .vue file the accepted extensions need to also be edited

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

No branches or pull requests

2 participants