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

Improve representation of non FEEL languages #858

Closed
3 tasks done
nikku opened this issue Jan 27, 2023 · 6 comments
Closed
3 tasks done

Improve representation of non FEEL languages #858

nikku opened this issue Jan 27, 2023 · 6 comments
Labels

Comments

@nikku
Copy link
Member

nikku commented Jan 27, 2023

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

As more people adapt element templates for domain-specific configuration we'll see the need to embed non-FEEL going to see more extensions for non FEEL domain specific languages. While I don't necessarily expect full editor tooling I do expect monospace editing and decent sizing of the input.

Example: Embed a GraphQL query / mutation editor in an element template:

image

Describe the solution you'd like

A potential follow-up is #871.

Describe alternatives you've considered

Leave things as is.

Additional context

Brought up in the context of camunda/connectors#202.


The following connector can be used to verify the new capabilities: graphql-connector.json.

@nikku
Copy link
Member Author

nikku commented Feb 2, 2023

Dumping my thoughts on a potential solution to this issue.

Sketch

  • Allow lang or type to be define on textarea input bindings
    {
      "name": "My special Template
      ...
      "properties: [
        {
          "label": "Query/Mutation",
          "type": "Text",
          "language": "graphql",
          "binding": {
            "type": "zeebe:input",
            "name": "graphql.query"
          }
        }
      ],
      ...
    }
  • Allow to plug in editors (with a well defined contract) for a type
  • Default to a (reasonable) monospace editor fallback if no editor for defined type is found.

Analysis

  • Allows custom editors to be configured and plugged-in (i.e. via an extension)
  • Gracefully handles "editor missing"
  • Allows us to define a contract for such editors, and potentially move over our feel editor, too

@marstamm
Copy link
Contributor

marstamm commented Feb 2, 2023

My Thoughts on this:

  • From a user perspective, setting the language would be the best, I agree.
  • While the plugin system sounds good, I'm not sure if users will actually use it or if we could just have a lightweight multi-editor in the properties-panel. syntax highlighting for common languages could either be achieved by reusing codemirror or with a light-weight regex based solution

I think we can already move ahead and improve the user experience without a full picture around the plugin API:

@nikku
Copy link
Member Author

nikku commented Feb 2, 2023

I think we can already move ahead and improve the user experience without a full picture around the plugin API:

Absolutely agreed. 💯

nikku added a commit to camunda/element-templates-json-schema that referenced this issue Feb 3, 2023
@nikku nikku added the ready Ready to be worked on label Feb 3, 2023 — with bpmn-io-tasks
@nikku
Copy link
Member Author

nikku commented Feb 3, 2023

As a first step camunda/element-templates-json-schema#89 introduces a language field for Text areas.

@nikku
Copy link
Member Author

nikku commented Feb 3, 2023

Closing this as fixed:

capture jqTrCl_optimized

#871 is a valid follow-up.

@nikku nikku closed this as completed Feb 3, 2023
@bpmn-io-tasks bpmn-io-tasks bot removed the ready Ready to be worked on label Feb 3, 2023
@nikku
Copy link
Member Author

nikku commented Feb 9, 2023

Created #872 as a follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants