-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add signal support for Details component summary text #8521
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
base: main
Are you sure you want to change the base?
Conversation
Adds signal binding support for the Details component's summary text property through new constructors and binding methods. Connected to vaadin/flow#23193 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
| } | ||
|
|
||
| /** | ||
| * Binds a signal to update the summary text of the details component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency public bind* methods should say same message all over. For this case HasText::bindText(Signal<String>) works as a good template. Example is not needed since there are similar examples in most Flow API.
| if (getElement().getPropertyRaw("opened") == null) { | ||
| setOpened(false); | ||
| getElement().setProperty("opened", false); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed for the feature to work?
| if (summary == null) { | ||
| summary = ""; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also done for the other constructor that receives the summary as a String. Does it make sense to move it to the updateSummaryText() method?
| if (summary == null || !(summary instanceof Span)) { | ||
| updateSummary(new Span(newText)); | ||
| } else { | ||
| summary.getElement().setText(newText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not covered by any tests.



Adds signal binding support for the Details component's summary text property through new constructors and binding methods.
Connected to vaadin/flow#23193
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com