vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
470 stars 82 forks source link

[rich-text-editor] Add label, helper text and validation APIs #1705

Open Juchar opened 5 years ago

Juchar commented 5 years ago

It should be possible to set a label for the editor to be consistent with the other input components.

web-padawan commented 5 years ago

Moving to web component as it should be implemented there first.

web-padawan commented 5 years ago

@jouni what do you think about this issue?

Currently we don't have neither label nor placeholder support -- see also vaadin/vaadin-rich-text-editor#28 Also, we don't have required property here (and all the related logic and styles).

jouni commented 5 years ago

Placeholder should probably work. Other features I would let <vaadin-custom-field> handle.

heruan commented 5 years ago

Definitely needs a label and required indicator. Any ETA?

jouni commented 5 years ago

Is it too much of a hassle to use CustomField in Java, that you’d really prefer to have the API directly in the component?

Would it make sense to have a composite component like RichTextField instead, that internally uses <vaadin-custom-field> and <vaadin-richt-text-editor>?

I’m thinking this approach should be the way forward, and the existing fields could be refactored similarly, that we have both <vaadin-text-input> (or just <vaadin-input type="text">) and <vaadin-text-field>.

heruan commented 5 years ago

Well, it seems I've misinterpreted the role of this component til now, but now I get it: it's an editor, not a field (although RichTextEditor extends AbstractField)! Then, it's fine for it to just have a placeholder and let label and validation delegated to a wrapper; and yeah, it definitely makes sense to have a RichTextField already provided!

anezthes commented 5 years ago

Would really appreciate that label. :)

jouni commented 5 years ago

although RichTextEditor extends AbstractField

Hmm, yeah, looks like it does.

Since most of the other Flow field components have a label (as listed in https://github.com/vaadin/vaadin-rich-text-editor-flow/issues/44), and the component naming is already very inconsistent (only TextField and PasswordField are the only “form fields”), then I suppose we should just make it happen for this one as well.

Splitting the components into separate “editor” and “field” implementations might be better left for the future.

rolfsmeds commented 4 years ago

If label support is added, whichever way that's done, we should also add support for validation errors and helpers.

kmeyer-mbs commented 3 days ago

Hello, are there any plans regarding the implementation?

I would also welcome this and would therefore like to bring this dusty ticket back to the front. Thank you.

rolfsmeds commented 1 day ago

It's not on our roadmap at the moment. Please add your 👍 to the topmost comment – we use those to gauge interest in issues.