Forum Discussion
FileHandler in the OneDrive context menu in "My Files" not showing the displayName (submenu missing)
When using a Microsoft 365 file handler add-in (OneDrive File Handlers 2.0) with two custom actions. The following inconsistency appears for the context menu in the document library "My Files". Usually, with two custom actions there should be an expandable submenu. But this is missing only for some users and not for others, as I've checked the behavior with two different users.
See the "addIns" definition of the application manifest below.
Observed behavior:
Only in "My Files" in OneDrive, the context menu shows the custom actions differently than in the other document libraries. The "displayNames" are not shown at all, as the sub menu is missing. Rather only the "actionMenuDisplayName" is shown for each custom action which does not seem intended.
Context menu:
- Open
- Preview
- ...
- actionMenuDisplayName
- actionMenuDisplayName
Expected behavior:
The expected behavior if there is only one file-handler add-in installed would be the following for the context menu, to have a sub-menu that expands and that shows the displayNames of the custom actions:
Context menu:
- Open
- Preview
- ...
- actionMenuDisplayName > Submenu containing "displayName" of action 1 and "displayName" of action 2
The default behavior is as expected for the document libraries in SharePoint and Teams (files) even when accessing sharepoint sites in OneDrive via quick access the behaviour is as expected.
Application manifest:
"addIns": [
{
"id": "some-id",
"type": "FileHandler",
"properties": [
{
"key": "actions",
"value": "[{\"type\":\"custom\",\"displayName\":\"Action 1\",\"shortDisplayName\":\"Act 1\",\"icon\":{\"png1x\":\"...email address removed for privacy reasons\"},\"url\":\"someEndpoint\",\"availableOn\":{\"file\":{\"extensions\":[\"listOfFiletypes\"]},\"allowMultiSelect\":false}}, {\"type\":\"custom\",\"displayName\":\"Action2\",\"shortDisplayName\":\"Act2\",\"icon\":{\"png1x\":\".../email address removed for privacy reasons\"},\"url\":\"someEndpoint\",\"availableOn\":{\"file\":{\"extensions\":[\"listOfFiletypes\"]},\"allowMultiSelect\":false}}]"
},
{
"key": "appIcon",
"value": "{\"svg\":\"...icon.svg\",\"png1x\":\"...email address removed for privacy reasons\",\"png1.5x\":\"...email address removed for privacy reasons\",\"png2x\":\"...email address removed for privacy reasons\"}"
},
{
"key": "actionMenuDisplayName",
"value": "Application"
},
{
"key": "version",
"value": "2"
}
]
}
],
2 Replies
- Stefano561Copper Contributor
There is also already an issue opened by another user on GH: https://github.com/OneDrive/onedrive-api-docs/issues/1801 which contains a visual example of this issue.
Happy about any update on this.- stefansidlerCopper Contributor
Stefano561 The GH issue from me.
Unfortunately there is no update or feedback yet from Microsoft.
Did you find a solution or does it work on your side now?