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
Refactored tag input renreder to fix rendering with empty options list #14319
Conversation
'value' => htmlspecialchars($itemValue,ENT_COMPAT,'UTF-8'), | ||
'text' => htmlspecialchars($item,ENT_COMPAT,'UTF-8'), | ||
'checked' => $checked, | ||
list($label, $meaning) = $option; |
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.
Why not $value
and $text
? The variables are only used for placeholder values afterwards and could use their name.
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.
$value
already comes as the function parameter, I can not redefine it in the loop. About text yes, makes sense but label and meaning look more like a pair that text and meaning.
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.
Oh, I did not see that.
Meaning is somehow the wrong word. What about $tagText
and $tagValue
?
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.
$inputOptionText
and $inputOptionValue
?
Hi @Mark-H I've improved wording in variables a bit, please approve it again when you'll able to. |
#14319] * upstream/pr/14319: Improve wording in variables Refactored tag input renreder to fix rendering with empty options list
What does it do?
It fixes the issue with displaying tag input component (TV) when options list set as empty.
Why is it needed?
It needed to avoid glitches that described in the issue.
Related issue(s)/PR(s)
#14177