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
When setting the the "Main Color" of a core/pullquote-block instance in the editor by choosing a color of the color palette the mainColor attribute provided by the restAPI is not populated as expected:
It is only used if className = "is-style-solid-color"andcustomTextColor is not used. Otherwise the attribute customMainColor is used and populated with the hex-value of the chosen palette color.
Since the information is provided by the customMainColor attribute this is not a severe problem, but still seems inconsisent.
Examples
Not as expected: restAPI result for a core/pullquote block with "Style" set to "Default" and "Main Color" set to a palette preset with the slug "primary":
show result
{
"blockName": "core/pullquote",
"attrs": {
"customMainColor": "#00aaad",
"className": "has-background is-style-default",
"value": "<p>is-style-default</p><cite>main color by Block Color Palettes</cite>",
"citation": "main color by Block Color Palettes",
"mainColor": "",
"textColor": "",
"customTextColor": "",
"align": "",
"anchor": ""
},
As expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color" and "Main Color" set to a palette preset with the slug primary:
show result
{
"blockName": "core/pullquote",
"attrs": {
"mainColor": "primary",
"className": "has-background is-style-solid-color",
"value": "<p>is-style-solid-color</p><cite>main color by Block Color Palettes</cite>",
"citation": "main color by Block Color Palettes",
"customMainColor": "",
"textColor": "",
"customTextColor": "",
"align": "",
"anchor": ""
},
As expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color", "Main Color" set to a palette preset with the slug "primary" and "Text Color" set to a palette preset with the slug secondary:
show result
{
"blockName": "core/pullquote",
"attrs": {
"mainColor": "primary",
"textColor": "secondary",
"className": "has-background is-style-solid-color",
"value": "<p>is-style-solid-color</p><cite>main color and text color by Block Color Palettes</cite>",
"citation": "main color and text color by Block Color Palettes",
"customMainColor": "",
"customTextColor": "",
"align": "",
"anchor": ""
},
Not as expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color", "Main Color" set to a palette preset with the slug "primary" and "Text Color" set to a custom color with the hex code #0008ff:
show result
{
"blockName": "core/pullquote",
"attrs": {
"customMainColor": "#00aaad",
"customTextColor": "#0008ff",
"className": "has-background is-style-solid-color",
"value": "<p>is-style-solid-color</p><cite>main color by Block COlor Palettes and text Color Custom</cite>",
"citation": "main color by Block COlor Palettes and text Color Custom",
"mainColor": "",
"textColor": "",
"align": "",
"anchor": ""
},
Expected Behaviour
When setting the "Main Color" of a core/pullquote-block instance in the editor by choosing a color of the color palette, the attribute mainColor should be populated with the slug of the chosen palette color, no matter which other attributes are set for the block instance.
The text was updated successfully, but these errors were encountered:
Description
When setting the the "Main Color" of a
core/pullquote
-block instance in the editor by choosing a color of the color palette themainColor
attribute provided by the restAPI is not populated as expected:It is only used if
className = "is-style-solid-color"
andcustomTextColor
is not used. Otherwise the attributecustomMainColor
is used and populated with the hex-value of the chosen palette color.Since the information is provided by the
customMainColor
attribute this is not a severe problem, but still seems inconsisent.Examples
Not as expected: restAPI result for a core/pullquote block with "Style" set to "Default" and "Main Color" set to a palette preset with the slug "primary":
show result
As expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color" and "Main Color" set to a palette preset with the slug
primary
:show result
As expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color", "Main Color" set to a palette preset with the slug "primary" and "Text Color" set to a palette preset with the slug
secondary
:show result
Not as expected: restAPI result for a core/pullquote block with "Style" set to "Solid Color", "Main Color" set to a palette preset with the slug "primary" and "Text Color" set to a custom color with the hex code
#0008ff
:show result
Expected Behaviour
When setting the "Main Color" of a
core/pullquote
-block instance in the editor by choosing a color of the color palette, the attributemainColor
should be populated with the slug of the chosen palette color, no matter which other attributes are set for the block instance.The text was updated successfully, but these errors were encountered: