2022-03-01 changelog

Changelog notifying updates to the Miro Web SDK and REST API 2.0 as of March 1st, 2022.

Summary

Miro Web SDK 2.0Miro REST API 2.0
  • style.backgroundOpacity has been renamed to style.fillOpacity.
    This change affects the style object of the shape and text items.

❗️

Breaking changes

Miro Web SDK 2.0Miro REST API 2.0
Sticky notes: on creation and update, you can only set either width or height.
You cannot set both at the same time.
Shape and Text: the backgroundOpacity property of the style object has been renamed to fillOpacity.

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.

ItemMiro Web SDK 2.0
App card   
Card
Text
When creating or resizing an app card, a card, or a text item, you can set:
  • width
    heightis calculated automatically, based on content and zoom level, and it's read-only.
Frame
Shape
When creating or resizing a frame or a shape item, you can set:
  • width
  • height
  • width and height at the same time.
ℹ️  Note:
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.

PreviewWhen creating a preview item, you can set:
  • width (optional)
    height is calculated automatically to keep the aspect ratio of the original preview.

When resizing a preview item, you can update:
  • Either width or height.
  • This keeps the aspect ratio of the original preview after resizing it.
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:
  • Either width or height.
    You cannot set both at the same time.

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.

ItemMiro Web SDK 2.0Miro REST API 2.0
Frame     It's now possible to set and to update the fill color of a frame item: style.fillColor
You 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.fontSize
The 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.

ItemMiro Web SDK 2.0
App cardThe 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.

Did this page help you?