Skip to main content

Is there a limit to the number of items selected for a Custom Action?

  • 18 June 2024
  • 5 replies
  • 40 views

Dear Miro Team,

I am implementing a mini application with the Custom Action of the web sdk 2.0.

The user selects a series of items from the board (app_card, card, connector, frame, shape, sticky_note and text) and when clicking on the button in the context menu a calculation is executed (my custom action).

Everything works correctly, but I have observed that when I select more than 50 items, my application does not appear in the context menu. I've looked in the documentation but I don't see anything about a maximum limit on the selection.

Is there any type of limitation?

This is how I have defined my custom-action:
 

....

export async function init() {
await miro.board.ui.on("custom:calculate", actionHandler());

const calculateCustomAction: CustomAction = {
scope: "local",
event: "calculate",
ui: {
label: {
en: "Calculate",
},
icon: "chat-plus",
description: {
en: "Sum of estimated points",
},
position: 1,
},
predicate: {
$or:
// Matching multiple types
{ type: "app_card" },
{ type: "card" },
{ type: "connector" },
{ type: "frame" },
{ type: "shape" },
{ type: "sticky_note" },
{ type: "text" }
],
},
};

await miro.board.experimental.action.register(calculateCustomAction);
}

init();


Thank you in advance

5 replies

Userlevel 4
Badge +1

Hey @Eduardo Castellano,

Thanks for pointing this out. Unfortunately the docs for this behaviour slipped through the cracks and is undocumented =(  I talked to the team and the limit is there for performance reasons. They will update the docs asap.

Sorry for this experience, I hope you can still build what had envisioned!

Cheers,
mettin

Badge +1

Bad news for me then.

Not to discourage but, everything was so much better with web sdk version 1.
When I developed my private application with version 1 of the sdk, there were no limits and the performance was perfect. Oh and I wasn't limited to use an icon from the available icon set, I could use any SVG path string.

I hope you can compare the possibilities offered by version 1 of the sdk with the new version 2.0.

Regards

Userlevel 4
Badge +1

Sorry to be the bearer of bad news =(

Regarding anything you’re missing: we prioritise using our public roadmap, where you can upvote and submit your own wishes. See the roadmap here: https://developers.miro.com/page/roadmap

Cheers,
Mettin

Badge +1

Hi again

I'm seriously thinking of making my application not a custom-action and have it appear in the left side menu.

Is there any limitation in terms of objects selected for applications in the left side menu?

My application basically goes through the entire selection of items looking for those with tags whose text complies with a format to extract its content and perform an operation with them. Do you think I will have any impediment (performance or whatever)?

Also, I thought I read in the documentation that the apps in the left side menu, their icon can be customized. Is this correct?

Userlevel 4
Badge +1

Hey @Eduardo Castellano

Im assuming you want to use the SDK for that. You can use board.get() for that (https://developers.miro.com/docs/websdk-reference-board#get)

It has rate limiting applied at level 3 (https://developers.miro.com/docs/websdk-reference-rate-limiting)

The icon can indeed be customised to a custom SVG! https://developers.miro.com/docs/add-a-logo-to-your-app

 

Cheers,
Mettin

Reply