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

Creating a generic, extensible data block component in Vue #1016

Open
ml-evs opened this issue Nov 27, 2024 · 1 comment
Open

Creating a generic, extensible data block component in Vue #1016

ml-evs opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
datablock An issue pertaining to a specific datablock design-discussion For issues describing broader design decisions and functionality. suggestions
Milestone

Comments

@ml-evs
Copy link
Member

ml-evs commented Nov 27, 2024

cc @BenjaminCharmes -- assigning you to start thinking about this idea, rather than implementing it all yourself!

Essentially, it would be good to build a JS design language for generic blocks, i.e., provide many options to enable multi-file upload, passing arbitrary parameters requested by the schema (or user-specific extensions), handle static plots vs interactive Bokeh plots, and other block interactions that we can reuse everywhere. The Python API can then simply report which features a block implementation needs/can use, so we avoid needing to write a separate vue component per block type.

@ml-evs ml-evs added suggestions datablock An issue pertaining to a specific datablock design-discussion For issues describing broader design decisions and functionality. labels Nov 29, 2024
@ml-evs ml-evs added this to the v0.6.x milestone Nov 29, 2024
@ml-evs ml-evs changed the title Creating a generic block component in Vue Creating a generic, extensible data block component in Vue Nov 29, 2024
@ml-evs
Copy link
Member Author

ml-evs commented Jan 15, 2025

Narrowing this down a bit to a specific task:

let's make a new block abstraction based on DataBlockBase, that can accept a list of properties and their defined types, labels etc.

Example XRD block:

go from hardcoded component in resources.js XRDBlock to DataBlockUI(properties={"wavelength": {"type": "float", "label": "Wavelength (Angstrom)", "default": 1.54}).

Eventually we can return this "block UI schema" from the API and try to generate reasonable block components without the plugin developer needing to write much javascript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datablock An issue pertaining to a specific datablock design-discussion For issues describing broader design decisions and functionality. suggestions
Projects
None yet
Development

No branches or pull requests

2 participants