You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behaviour: [What you expect to happen]
Setting the classes attribute should be independent of the type attribute behaviour.
Actual behaviour: [What happens]
Setting the type attribute means classes can no longer be set
Reproduces how often: [What percentage of the time does it reproduce?]
Every time
Versions
Latest (3.0.0) -- Present for at least 2 years
Additional Information
Existing implementation appears to have an else and endIf block in a place that disables classes if type is set:
// Existing implementation (spacing added for readability)
<div class=
"moj-banner
{% if params.type == 'success' %} moj-banner--success
{% elif params.type == 'warning' %} moj-banner--warning
{% else %} // This else and endIf below cause the bug
{{- ' ' + params.classes if params.classes}}
{% endif %}"
...
>
I've raised a PR that includes some refactoring -- The first commit is a simple fix, the latter commit provides a refactor in line with recent button-menu.
The text was updated successfully, but these errors were encountered:
AlexBramhill
changed the title
Banner - Classes parameter does not work when type parameter is set
Bug: Banner - Classes parameter does not work when type parameter is set
Oct 29, 2024
AlexBramhill
changed the title
Bug: Banner - Classes parameter does not work when type parameter is set
Banner classes parameter does not work when type parameter is set
Oct 29, 2024
Prerequisites
Description
Banner classes do not work if
param.type
is configured. I assume this is a bugSteps to Reproduce
Expected behaviour: [What you expect to happen]
Setting the
classes
attribute should be independent of thetype
attribute behaviour.Actual behaviour: [What happens]
Setting the
type
attribute meansclasses
can no longer be setReproduces how often: [What percentage of the time does it reproduce?]
Every time
Versions
Latest (3.0.0) -- Present for at least 2 years
Additional Information
else
andendIf
block in a place that disablesclasses
iftype
is set:I've raised a PR that includes some refactoring -- The first commit is a simple fix, the latter commit provides a refactor in line with recent
button-menu
.PR for fix here
The text was updated successfully, but these errors were encountered: