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

Enable users to configure multiline text inputs #283

Closed
Skaiir opened this issue Jul 18, 2022 · 4 comments · Fixed by #379
Closed

Enable users to configure multiline text inputs #283

Skaiir opened this issue Jul 18, 2022 · 4 comments · Fixed by #379
Assignees
Labels
enhancement New feature or request pm

Comments

@Skaiir
Copy link
Contributor

Skaiir commented Jul 18, 2022

Is your feature request related to a problem? Please describe

As part of our initiative to enable more use cases in form-js, we want to allow users to enter larger chunks of text via a multi-line text component.

Describe the solution you'd like

There are two main ways we can consider implementing this:

  1. simply make the regular text-field multi-line capable via configuration
  2. create an entirely new component for multi-line inputs

Solution 1 is the fastest way to do this, the downside relative to solution 2 would be that multi-line is a different html component, and so it might make sense to have that difference represented in the palette as well. It also make the base component for text a tiny bit more complex, but honestly it's minor.

I would prefer solution 1, it avoids quite a bit of overhead and I also think it makes sense for a form developer.

Additional context

Product hub issue

@Skaiir Skaiir added the enhancement New feature or request label Jul 18, 2022
@Skaiir
Copy link
Contributor Author

Skaiir commented Jul 18, 2022

@pinussilvestrus @christian-konrad

Please share your opinion on option 1 vs option 2. This is realistically the only prep required for an implementation of this, and it could most likely be implemented in a few hours, which is a quick win :)

@pinussilvestrus
Copy link
Contributor

Is there a sketch somewhere? Because some questions came to my mind:

  • Does it result in a <textarea> element?
  • Or: is it an auto-resizable textbox, so something custom as we have with the taglist?
  • Can the number of lines (rows) be configured via the schema, and can it be fixed then?

Personally, I'd vote for having another form component. Rationale: My assumption is that linting the support will be much easier in the Modeler products when it is just another component and not a property in an existing form field.

@Skaiir
Copy link
Contributor Author

Skaiir commented Jul 18, 2022

@pinussilvestrus

It will result in a text-area element yes, tis the proper way.

While I understand the rationale behind the linting simplicity, one of the problems is that we can't apply this to every single change of control that we do otherwise we'll end up with 25 by the end of the year. I don't think we can use linting simplicity as a baseline, for example thinking about floating point numbers this one is much clearer, we will want it to be the same control as integers. But following this logic it'd have to be different.

I think this one has more merit to be an independent control, but still I'm not so certain :/

Regarding configuration, that's up to us but pretty easy to set up.

I would opt for two configurations, autosize (bool) and lineheight (int), checking autosize would hide the option to set lines. In the form it would probably be a single variable lineheight: auto, 1, 2 ... n

@pinussilvestrus
Copy link
Contributor

Related: #194

@Skaiir Skaiir self-assigned this Jul 19, 2022
@Skaiir Skaiir added the backlog Queued in backlog label Jul 19, 2022
@Skaiir Skaiir removed their assignment Aug 22, 2022
Skaiir added a commit that referenced this issue Oct 31, 2022
Skaiir added a commit that referenced this issue Oct 31, 2022
@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Oct 31, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the backlog Queued in backlog label Oct 31, 2022
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Oct 31, 2022
Skaiir added a commit that referenced this issue Oct 31, 2022
Skaiir added a commit that referenced this issue Oct 31, 2022
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed needs review Review pending labels Nov 1, 2022
Skaiir added a commit that referenced this issue Nov 3, 2022
Skaiir added a commit that referenced this issue Nov 3, 2022
Skaiir added a commit that referenced this issue Nov 3, 2022
Skaiir added a commit that referenced this issue Nov 3, 2022
Skaiir added a commit that referenced this issue Nov 3, 2022
pinussilvestrus pushed a commit that referenced this issue Nov 4, 2022
pinussilvestrus pushed a commit that referenced this issue Nov 4, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the in progress Currently worked on label Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants