Open ostreifel opened 6 years ago
If I get chance I'll add this, but only if I can get configuration working at all. No matter how I tried before launch I could not get configuration working, even just for simple resizing of the widget. I could get the config option in hamburger appearing if I put caneditname:true in the manifest but the widget then failed to load. Right now I don't have time to pursue the cause.
I used to have the contributions graph setup to handle widget configuration.
scripts for
Only major difference would be in this case the twitter widget should return unconfigured b/c there isn't an obvious twitter handle to default to.
VSS.require("TFS/Dashboards/WidgetHelpers", function (WidgetHelpers) {
//https://docs.microsoft.com/en-us/vsts/extend/develop/styles-from-widget-sdk?view=vsts
WidgetHelpers.IncludeWidgetStyles();
WidgetHelpers.IncludeWidgetConfigurationStyles();
var registerWidget = function () {
return {
load: function (widgetSettings) {
if (!widgetSettings || !widgetSettings.handle) {
return WidgetHelpers.WidgetStatusHelper.Unconfigured();
}
loadTwitterWidget(widgetSettings.handle);
return WidgetHelpers.WidgetStatusHelper.Success();
}
}
}
VSS.register(vssRegisterName, registerWidget);
VSS.notifyLoadSucceeded();
});
Thanks Otto, hopefully this will be of use when I get time to investigate. Cheers, Greg
Dashboard widget should allow specifying the target twitter handle through configuration of the widget.