2022-03-01 changelog
almost 4 years ago by Miro
Miro REST API and Web SDK 2.0: ⚠ breaking changes! ⚠
Changes to style parameters (REST API); changes to item resizing (Web SDK).
Summary
| Miro Web SDK 2.0 | Miro REST API 2.0 |
|---|---|
|
|
Breaking changes
Miro Web SDK 2.0 Miro REST API 2.0 Sticky notes: on creation and update, you can only set either widthorheight.
You cannot set both at the same time.Shape and Text: the backgroundOpacityproperty of thestyleobject has been renamed tofillOpacity.
What has changed
We introduced a number of changes to improve support for board items, and to make Miro Web SDK and REST API 2.0 functionality more consistent.
Web SDK 2.0 item resizing
The following table lists the changes related to item resizing.
Update your code for the relevant items, where necessary, so that they can keep working as expected.
| Item | Miro Web SDK 2.0 | |
|---|---|---|
| App card Card Text | When creating or resizing an app card, a card, or a text item, you can set:
| When creating or resizing an app card or a card item, you can set:
|
| Frame Shape | When creating or resizing a frame or a shape item, you can set:
If you try to resize a parent frame that results in one or more child items being placed outside the parent frame, the Web SDK throws an error. This is because resizing the parent frame to the dimensions specified breaks the parent-child relationship between the items. | When creating or resizing a frame or a shape item, you can set:
If you try to resize a parent frame that results in one or more child items being placed outside the parent frame, the response returns an error. This is because resizing the parent frame to the dimensions specified breaks the parent-child relationship between the items. |
| Preview | When creating a preview item, you can set:
When resizing a preview item, you can update:
| N/A |
| Sticky note | ⚠ This is a breaking change for sticky note items that use the Miro Web SDK 2.0 ⚠ When creating or resizing a sticky note item, you can set:
|
Styles
Miro Web SDK 2.0: we added support for additional style properties for board items.
Miro REST API 2.0: we renamed a style property of shape and text items.
| Item | Miro Web SDK 2.0 | Miro REST API 2.0 |
|---|---|---|
| Frame | It's now possible to set and to update the fill color of a frame item: style.fillColorYou can assign it any valid hex color code. The default fill color value is transparent (no fill color). | N/A |
| Shape Text | It's now possible to set and to update the size of the font displaying the text assigned to the content property of shape and text items: style.fontSizeThe default font size is 14dp. | N/A |
| Shape Text | N/A | ⚠ This is a breaking change for shape and text items that use the Miro REST API 2.0 ⚠ The backgroundOpacity property of the style object has been renamed to fillOpacity. |
Events
Changes in this section apply only to the Miro Web SDK 2.0.
| Item | Miro Web SDK 2.0 |
|---|---|
| App card | The app_card:open event to open a modal containing the detail view of an app card now fires to all iFrames (index, panel and modal) of a Miro Web SDK 2.0 app.Previously, the event would be sent only to the main iFrame. The app panel and modal iFrames wouldn't receive it. |