safari app extension shortcomings (vs. safari extension)

After analyzing safari app extension documentation we saw that now context menu's are static.

Previously you could add it on demand and modify it's label. Now you can't...

I guess apple dev's did not want menu to block UI. Are we right ?

If yes, we have suggestion: let's set menu labels safari....setMenuLabelForCommand(command,label)

This way menu label will be always available and won't block UI.


Otherwise what alternatives do we have for this ?

For us it's crucial for on page to do something and undo and menu label should be specific about it.

Replies

Can you clarify - do you just need to modify the text shown for a context menu item? Would your use case be satisfied with the ability to dynamically hide or unhide multiple context menu items that were specified in the Info.plist?


Thanks for the feedback!

In our case, yes.

Context menu command, label pairs are static and limited and usually we show only one.


It would be nice if menu items could have not only visible/hidden, but active/inactive(greyd out) state.

We think this would be more clear for user to show, that some actions are available, but just not valid for chosen context.

Example: selected text is expected to be number, but it's a word.

Otherwise user could think, that extension is not enabled/working. This is feedback from both us and our testers 🙂

There's another challenge. Usually context menu items depends on data stored in Application DB (previously global page local sql db).

And those calls are asynchronous. It would be nice if menu items could be enabled/disabled after those asynchronous calls return.

We don't dare to ask for progress indicator near menu label for those cases 😊


Thank you!

Thanks for the clarification!


Please file a radar with your use case to mark a context menu item as inactive at https://bugreport.apple.com.