question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make it possible to structure element templates in sections

See original GitHub issue

Is your feature request related to a problem? Please describe.

The properties panel structures contents logically into groups and these groups can be collapsed and expanded by users based on what is important to them and not.

Our existing way to structure element template fields into a large Custom Fields section does not well blend into the concept. Considering larger element templates, each of the fields can potentially belong to a logical group and as a template creator I’d assume I can use the same grouping mechanism for my templates, too.

Describe the solution you’d like

  • As part of an element templates properties I’m able to define which group a particular input belongs to
  • The properties panel will create such groups and organize the inputs accordingly

Describe alternatives you’ve considered

Consider our current “one group for all template fields” a feature and do no change.

Additional context

The following shows an early mock up for the soon to be shipped cloud REST connector template, with and without grouping:

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
pinussilvestruscommented, Jan 27, 2022

I can imagine offering grouping as an additional C8 template feature, without touching the existing custom properties behavior and existing properties panel groups, in the following way:

  • Make it possible to define custom properties groups via groups
  • Make it possible to define a group id in a respective property
  • If no group id is provided or the group is not defined in the groups definition, the property lands into the default “Custom properties” group
  • Don’t support list groups for now, since I assume this would mean more configuration effort (properties are no list items currently)

The “group is not defined in the groups definition” case could also be something to validate via JSON schema, but is not necessary IMHO if we have a reasonable default.

Given the following example template

{
  "name": "Grouping",
  "id": "example.com.grouping",
  "appliesTo": [
    "bpmn:ServiceTask"
  ],
  "groups": [
    {
      "id": "headers",
      "label": "Request headers"
    },
    {
      "id": "payload",
      "label": "Request payload"
    },
    {
      "id": "mapping",
      "label": "Response mapping"
    }
  ],
  "properties": [
    {
      "type": "String",
      "value": "http",
      "binding": {
        "type": "zeebe:taskDefinition:type"
      }
    },
    {
      "label": "REST Endpoint URL",
      "group": "headers",
      "type": "String",
      "binding": {
        "type": "zeebe:taskHeader",
        "key": "url"
      }
    },
    {
      "label": "REST Method",
      "group": "headers",
      "type": "Dropdown",
      "value": "get",
      "choices": [
        { "name": "GET", "value": "get" },
        { "name": "POST", "value": "post" },
        { "name": "PATCH", "value": "patch" },
        { "name": "DELETE", "value": "delete" }
      ],
      "binding": {
        "type": "zeebe:taskHeader",
        "key": "method"
      }
    },
    {
      "label": "Request Body",
      "description": "Data to send to the endpoint.",
      "value": "",
      "group": "payload",
      "type": "String",
      "binding": {
        "type": "zeebe:input",
        "name": "body"
      }
    },
    {
      "label": "Result Variable",
      "group": "mapping",
      "value": "response",
      "type": "String",
      "binding": {
        "type": "zeebe:output",
        "source": "= body"
      }
    }
  ]
}

it would resolve in the following UI

image

0reactions
andreasgeiercommented, Jan 27, 2022

Looks great to start with 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

02 Creating Element Templates - YouTube
Discover the Element Templates included in the delivered workspace and their requirements for creating Annotation Groups.
Read more >
Structure and customize template layouts - Knowledge Base
In your HubSpot account, navigate to Marketing > Files and Templates > Design Tools. In the finder, click a template to edit it....
Read more >
How to Create a Global Section in Elementor - Fresh van Root
Your goal: Save templates that behave like global widgets. Here's how to do it. There is an Elementor element, and that is called...
Read more >
Sections and blocks - Shopify Help Center
Most sections are made up of blocks that serve a specific function, such as headers, text, ... Customize your theme templates with sections...
Read more >
The Content Template element - HTML - MDN Web Docs
First, we have a table into which we will later insert content using JavaScript code. Then comes the template, which describes the structure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found