When trying to add custom labels to text, the api is showing that they are coming through under ["spans"]["data"]["label"], when previously they would just come through as a "label".
This means that any new content that has a label, will not have the same structure as the old content. My HTML Serializer currently handles the old structure, but not the new one. I do something like:
I'm wondering if there's a way to make sure that labels are applied how they used to be, or how I should update my HTML Serializer to handle both cases.
Sorry for the delayed reply. I've been able to recreate this and I've passed this to the team who are now aware of it and are working this into their backlog.
Once we have an update on this situation we'll contact you here.
I've been investigating this with our team and what's strange is that, as detailed in our docs, the expected behaviour has always been ["spans"]["data"]["label"]:
{
type: 'paragraph',
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
spans: [
{
start: 63,
end: 71,
type: 'label',
data: { label: 'codespan' }
},
]
}
So the question is, really, why you had a label string field outside the spans? This is what actually seems to be the bug. Do you have any more examples of this?
You can have the correct behaviour on that contact button by adding the label on the link and republishing.