Problem/Motivation
When using a Textfield widget there is no preview in Display Builder which can get easily fixed by implementing a settingsSummary method. WYSIWYG is doing that as well.
| Before | After |
|---|---|
|
|
User interface changes
The preview will show the text that was entered.
| Comment | File | Size | Author |
|---|
Issue fork ui_patterns-3563204
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
yannickooComment #4
grimreaperThanks for the issue and MR.
Looks good to me.
Comment #5
just_like_good_vibeshello guys, MR pipeline is red, please correct before we
can merge :)
Comment #7
mogtofu33 commentedCI failing is not related to the code in this MR, will see if I can fix it, but probably a new branch is required.
Comment #9
mogtofu33 commentedSome changes for review, use Symfony to truncate and htmlentites for textfield, because it should not receive html tags and this highlight them. Added truncate and strip_tags to token.
Comment #10
yannickooGreat, thanks for this! Do you think we should only show 20 characters? It seems like we have enough space on one row, so maybe we could think about increasing that.
Comment #11
mogtofu33 commented30 was a bit too much for Display Builder in Layers panel, could be fix by the css there but so I thought 20 is good enough, with the Builder panel we have the whole content.
Comment #13
just_like_good_vibesComment #15
mogtofu33 commentedStrangely we lost the Token summary, I will try to investigate
Comment #16
mogtofu33 commentedOk, Token source do not extend SourcePluginPropValue but directly SourcePluginBase, should we move the default summary there?
Comment #20
mogtofu33 commentedComment #21
just_like_good_vibestoken may be deprecated soon, now that we have token support here and there.
the code we already merged in that Issue is only for certain sources, right :)
we cannot move now that code to the source plugin base class, and assume there will be a value.
let's discuss this soon
Comment #22
mogtofu33 commentedAs discussed moved back to prop and added on token.
Comment #24
just_like_good_vibes