OneDrive / samples

Contains samples, scenarios, and guidance for integrating with OneDrive and SharePoint drives, drive items, and files.
MIT License
58 stars 59 forks source link

File Browser: Host navigation configuration option does not work as described in documentation #68

Open ottD opened 9 months ago

ottD commented 9 months ago

Describe the bug Setting the mode in the navigation configuration option to host in the File Browser configuration as documented in the File Browser configuration schema does not trigger a navigation request to the host. Instead, the host receives the default navigation-started and navigation-ended notifications but no indication what navigation occurred.

image

To Reproduce Configure the File Browser component with the mode of the navigation option set to host as described in the documentation. Navigate in the File Browser by either using the breadcrumb or the library dropdown. The File Browser navigates and sends navigation notifications to the host but no navigation request.

Expected behavior According to the documented File Browser configuration schema, setting the navigation option to host should prevent the File Browser from navigating and instead trigger a navigation request to the host which can then handle navigation.

Screenshots Navigate using the library dropdown:

image

Details

File Browser configuration object specifying host navigation:

{
    "sdk": "8.0",
    "authentication": {},
    "messaging": {
        "origin": "https://localhost:53000",
        "channelId": "852adf29-a4d2-43a2-a2c3-7bf923c4465c"
    },
    "theme": "dark",
    "navigation": {
        "mode": "host"
    },
    "leftNav": {
        "enabled": false
    },
    "entry": {
        "sharePoint": {
            "byPath": {
                "web": "/sites/Dev/Testing",
                "list": "/sites/Dev/Testing/MattersTesting",
                "folder": "/sites/Dev/Testing/MattersTesting/TeamsTab/Long Folder path"
            }
        }
    },
    "breadcrumb": {
        "root": {
            "sharePoint": {
                "byPath": {
                    "folder": "/sites/Dev/Testing/MattersTesting/TeamsTab/Long Folder path"
                }
            }
        }
    },
    "commands": {
        "open": {
            "handlers": [
                {
                    "filters": [
                        "folder"
                    ],
                    "target": "host"
                }
            ]
        }
    }
}