From c275f07f64fdfc75d76aa0143d504fa28136eb01 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Tue, 7 Jan 2025 13:19:01 -0600 Subject: [PATCH] Fix all the broken form pages (#266) Random nits, part the second TRA is particular about form pages. It'll actually break itself if an extension throws an exception (which it should do). The POC was more forgiving (but technically incorrect) Well, turns out, all the form pages we had did not give an F and just threw exceptions. They shouldn't! That's bad! --- .../Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs | 4 ---- .../Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs | 4 ---- .../cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs | 4 ---- .../cmdpal/Exts/YouTubeExtension/Pages/YouTubeAPIForm.cs | 4 ---- 4 files changed, 16 deletions(-) diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs index a339add945..1918d9bd2f 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs @@ -54,10 +54,6 @@ internal sealed partial class AddBookmarkForm : Form return json; } - public override string DataJson() => throw new NotImplementedException(); - - public override string StateJson() => "{}"; - public override CommandResult SubmitForm(string payload) { var formInput = JsonNode.Parse(payload); diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs index dad1cf45a2..56637c938f 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs @@ -67,10 +67,6 @@ internal sealed partial class BookmarkPlaceholderForm : Form return json; } - public override string DataJson() => throw new NotImplementedException(); - - public override string StateJson() => "{}"; - public override CommandResult SubmitForm(string payload) { var target = _bookmark; diff --git a/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs index 4ea80ee5cf..e8d9a85fa7 100644 --- a/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs +++ b/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs @@ -52,10 +52,6 @@ internal sealed partial class SpongeSettingsForm : Form return json; } - public override string DataJson() => throw new NotImplementedException(); - - public override string StateJson() => "{}"; - public override CommandResult SubmitForm(string payload) { var formInput = JsonNode.Parse(payload); diff --git a/src/modules/cmdpal/Exts/YouTubeExtension/Pages/YouTubeAPIForm.cs b/src/modules/cmdpal/Exts/YouTubeExtension/Pages/YouTubeAPIForm.cs index 56520c0ea3..4bb09511f2 100644 --- a/src/modules/cmdpal/Exts/YouTubeExtension/Pages/YouTubeAPIForm.cs +++ b/src/modules/cmdpal/Exts/YouTubeExtension/Pages/YouTubeAPIForm.cs @@ -48,10 +48,6 @@ internal sealed partial class YouTubeAPIForm : Form return json; } - public override string DataJson() => throw new NotImplementedException(); - - public override string StateJson() => "{}"; - public override CommandResult SubmitForm(string payload) { var formInput = JsonNode.Parse(payload);