-
Notifications
You must be signed in to change notification settings - Fork 168
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
Rename the current Label component to NativeLabel and create a new Label that is compatible with FW8 Label #4384
Comments
I wouldn't rename I'd see more fit just a note in the |
I think it's too late to rename. May be we can do another class and add a reference to it everywhere in javadocs with huge warning. |
Agree with the comments above. Rename would be just unnecessary breaking change. But we should add some javadoc explaining the difference for the ones coming from FW8 as @heruan suggested. Maybe with a see also -link to Text / Span components. |
This proposal is not for Vaadin 10. |
I think it doesn't matter since the next release should be 100% compatible with V10. |
And it doesn't need to be for the next version. The point is to avoid cases like #4313 to happen in the future. |
Should we then also rename |
Should also be mentioned that the JavaDocs have been clarified in #4383. |
I see no reason to do any drastic changes anymore for this - yes it is something that existing (or swing based) users run into, but there has not really been that much questions and uproar on this topic that would make us want to change things anymore. So I'm quite close to closing this as won't fix. |
This ticket/PR has been released with Vaadin 24.1.0. |
Currently the Label component creates a
<label>
element in the client, which makes it not suitable to rendering loose text in the page, since the<label>
in meant to be used in conjunction with other elements (usually<input>
). This makes it semantically different from the old Label in FW8, which creates a<div>
instead.On top of that, the
<label>
element is an interactive content element, which makes it behave differently than a regular text in the page. For example, when used inside a Grid cell, clicking on a label doesn't trigger the selection of the row (see #4313 for details).My proposal to this issue is the following:
Label
toNativeLabel
(using the same naming structure as theNativeButton
);Label
class that behaves exactly like the old Label from FW8;The text was updated successfully, but these errors were encountered: