Custom UI Blocks

Hi everyone.

Was wondering if there’s any documentation on how to develop custom UI blocks.
I believe I saw in another forum that this was not in the immediate focus though I’d like to explore how to help with this.

Cheers.

1 Like

Hello

The only way currently to add a custom UI block is to contribute to the project.
You can look at this pull request to see in general the things that need to be implemented.

If you have an idea about a block, we can discuss its implementation here.
Since not all custom blocks belong in the Corteza core.

This PR implements the navigational page block

Another solution would be if you build your own Corteza image. In that way, you have full control of the blocks you use.

Thx for that @jfortun .

Yes, we would prefer to contribute to the project as we believe the UI blocks we have in mind would benefit everyone.
We will have a look at the PR you mention to evaluate how to proceed. Maybe we could help also with some initial draft guideline as we move along?

In terms of discussing the UI blocks we have in mind, would you prefer I list them all here at once or that I open a thread for each?

I would appreciate it if you could open a discussion on our GitHub organization Discussions · cortezaproject · GitHub.

If possible a discussion for each separate type of block. So we can convert it to an issue once it’s done being discussed.

Regarding the guidelines, I will happily prepare a starting branch with an “empty” new type of block once the discussions turn to issues.

1 Like

Gonna be posting them now.

Please consider that we are just getting familiar with the whole Corteza framework and we might be missing up on stuff that already exists or is in the works.

1 Like

Case in point, for whatever reason I had a 2021 version on our own instance and while prepping a battery of sandboxes I installed 2022.9.
Yeah, a few things are there :sweat_smile:
Need to revisit notes.

Hello @jfortun,

We are in need of a new block for one of our requirement. We are going through the change log of the Navigation Block.

It will be very helpful, if you can guide us with any additional guidelines of how to proceed with the change, so that we can get started quickly.

Looking forward to your reply. Thank you!

The blocks are defined in lib/js (the package)
You need to create a viewer component and an optional editor component inside Compose(RecordBase/RecordBaseEditor). And make sure you include it in the Selector component. So it can be selected, apart from that it would be Block specific.

In the future we hope to have a mechanism to have this available through the Corteza UI, similar as Custom CSS or Workflows