From 902eff43379712d556fec86cdabc24cbc0b32adf Mon Sep 17 00:00:00 2001 From: boatbomber Date: Mon, 18 Sep 2023 17:28:31 -0400 Subject: [PATCH 1/2] Use GUID --- plugin/src/App/Components/Studio/StudioPluginGui.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/src/App/Components/Studio/StudioPluginGui.lua b/plugin/src/App/Components/Studio/StudioPluginGui.lua index 6b9910a91..ecb6ccfd2 100644 --- a/plugin/src/App/Components/Studio/StudioPluginGui.lua +++ b/plugin/src/App/Components/Studio/StudioPluginGui.lua @@ -1,3 +1,5 @@ +local HttpService = game:GetService("HttpService") + local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin local Packages = Rojo.Packages @@ -36,7 +38,7 @@ function StudioPluginGui:init() minimumSize.Y ) - local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(self.props.id, dockWidgetPluginGuiInfo) + local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(HttpService:GenerateGUID(false), dockWidgetPluginGuiInfo) pluginGui.Name = self.props.id pluginGui.Title = self.props.title From 78d34dc5f150a7c5547494c0bf661305a98e4afc Mon Sep 17 00:00:00 2001 From: boatbomber Date: Mon, 18 Sep 2023 17:37:39 -0400 Subject: [PATCH 2/2] Use GUID only on ephemeral widgets --- plugin/src/App/Components/Studio/StudioPluginGui.lua | 2 +- plugin/src/App/StatusPages/Confirming.lua | 2 ++ plugin/src/App/StatusPages/Connected.lua | 1 + plugin/src/App/init.lua | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/src/App/Components/Studio/StudioPluginGui.lua b/plugin/src/App/Components/Studio/StudioPluginGui.lua index ecb6ccfd2..236c93009 100644 --- a/plugin/src/App/Components/Studio/StudioPluginGui.lua +++ b/plugin/src/App/Components/Studio/StudioPluginGui.lua @@ -38,7 +38,7 @@ function StudioPluginGui:init() minimumSize.Y ) - local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(HttpService:GenerateGUID(false), dockWidgetPluginGuiInfo) + local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(if self.props.isEphemeral then HttpService:GenerateGUID(false) else self.props.id, dockWidgetPluginGuiInfo) pluginGui.Name = self.props.id pluginGui.Title = self.props.title diff --git a/plugin/src/App/StatusPages/Confirming.lua b/plugin/src/App/StatusPages/Confirming.lua index 74c814a1e..098c2dbdd 100644 --- a/plugin/src/App/StatusPages/Confirming.lua +++ b/plugin/src/App/StatusPages/Confirming.lua @@ -140,6 +140,7 @@ function ConfirmingPage:render() id = "Rojo_ConfirmingSourceDiff", title = "Source diff", active = self.state.showingSourceDiff, + isEphemeral = true, initDockState = Enum.InitialDockState.Float, overridePreviousState = true, @@ -182,6 +183,7 @@ function ConfirmingPage:render() self.props.confirmData.serverInfo.projectName or "UNKNOWN" ), active = true, + isEphemeral = true, initDockState = Enum.InitialDockState.Float, overridePreviousState = false, diff --git a/plugin/src/App/StatusPages/Connected.lua b/plugin/src/App/StatusPages/Connected.lua index 27f4e7ca4..b385b1c47 100644 --- a/plugin/src/App/StatusPages/Connected.lua +++ b/plugin/src/App/StatusPages/Connected.lua @@ -398,6 +398,7 @@ function ConnectedPage:render() id = "Rojo_ConnectedSourceDiff", title = "Source diff", active = self.state.showingSourceDiff, + isEphemeral = true, initDockState = Enum.InitialDockState.Float, overridePreviousState = false, diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index 786b559ea..647c62e73 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -579,6 +579,7 @@ function App:render() id = pluginName, title = pluginName, active = self.state.guiEnabled, + isEphemeral = false, initDockState = Enum.InitialDockState.Right, overridePreviousState = false,