feat: add Markdown.bindContent(Signal<String>)#9391
Open
Artur- wants to merge 1 commit into
Open
Conversation
Allow driving Markdown content from a Signal<String> through a new bindContent method and matching signal constructor. The existing setContent and appendContent throw BindingActiveException while a binding is active to keep component state consistent with the signal. Fixes #9388
|
sissbruecker
reviewed
Jun 1, 2026
Contributor
There was a problem hiding this comment.
Do the new ITs add significant value over the JS sync tests in MarkdownSignalTest?
I feel they could be dropped as the existing ITs already verify that the JS sync works and the signal binding reuses the same infrastructure.
| } | ||
|
|
||
| @Test | ||
| void bindContent_constructorBinds() { |
Contributor
There was a problem hiding this comment.
Test structure around constructor usage is quite messy:
- This one tests the constructor specifically, but still mentions
bindContentwhich is never used in this test - Then subsequent tests arbitrarily either use the constructor or the
bindContentmethod despite all having names includingbindContent
I'd suggest to have a single test for the constructor (this one marked here, as is) and give it a more appropriate name, and then only use bindContent in other tests for clarity.
Some existing naming candidates for this test from other components:
Badge (BadgeSignalTest.java) — <param>Constructor style
- textSignalConstructor()
- textSignalAndIconConstructor()
Button (ButtonSignalTest.java) — <param>Ctor style (abbreviated)
- textSignalCtor()
- textSignalAndIconCtor()
- textSignalAndEventCtor()
- textSignalAndIconAndEventCtor()
Icon (IconSignalTest.java) — constructor_<params>_<expectation> style
- constructor_withSignal_bindsIconCorrectly()
SvgIcon (SvgIconSignalTest.java) — same constructor_<params>_<expectation> style as Icon
- constructor_stringWithSignal_bindsSymbolCorrectly()
- constructor_downloadHandlerWithSignal_bindsSymbolCorrectly()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Allow driving Markdown content from a Signal through a new bindContent method and matching signal constructor. The existing setContent and appendContent throw BindingActiveException while a binding is active to keep component state consistent with the signal.
Fixes #9388