rstedman / tfs-pullrequest-dashboard

tfs dashboard for pullrequests across all repos
MIT License
30 stars 29 forks source link

Use officially supported method for determining if running as a dashboard widget #17

Open rstedman opened 6 years ago

rstedman commented 6 years ago

A single extension codebase is used for both the code hub and the dashboard widget. The layout & behavior of the extension display changes slightly based on if the extension is running as a dashboard widget, or as a code hub page. It does this with the following check on the initialization of the extension:

context.getPageContext().hubsContext.selectedHubId.startsWith("ms.vss-dashboards-web");

This is not an officially supported means for determining context, and could change in a future release. This needs to be updated to something officially supported by VSTS.