mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Update plugin references from Rojo to Atlas
- Changed all instances of "Rojo" to "Atlas" in error messages, UI titles, and connection actions for consistent branding. - Updated the sound player widget and patch history recording to reflect the new name. - Enhanced logging in the hydration process to provide better diagnostics for missing virtual instances.
This commit is contained in:
parent
9ab1369444
commit
edc09741bf
9 changed files with 71 additions and 27 deletions
|
|
@ -3,11 +3,11 @@ Error.__index = Error
|
||||||
|
|
||||||
Error.Kind = {
|
Error.Kind = {
|
||||||
HttpNotEnabled = {
|
HttpNotEnabled = {
|
||||||
message = "Rojo requires HTTP access, which is not enabled.\n"
|
message = "Atlas requires HTTP access, which is not enabled.\n"
|
||||||
.. "Check your game settings, located in the 'Home' tab of Studio.",
|
.. "Check your game settings, located in the 'Home' tab of Studio.",
|
||||||
},
|
},
|
||||||
ConnectFailed = {
|
ConnectFailed = {
|
||||||
message = "Couldn't connect to the Rojo server.\n"
|
message = "Couldn't connect to the Atlas server.\n"
|
||||||
.. "Make sure the server is running — use 'rojo serve' to run it!",
|
.. "Make sure the server is running — use 'rojo serve' to run it!",
|
||||||
},
|
},
|
||||||
Timeout = {
|
Timeout = {
|
||||||
|
|
|
||||||
|
|
@ -203,8 +203,8 @@ local function SelectionRadio(props)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
Rojo = e(SelectionOption, {
|
Atlas = e(SelectionOption, {
|
||||||
text = "Rojo",
|
text = "Atlas",
|
||||||
optionType = "push",
|
optionType = "push",
|
||||||
isSelected = props.selection == "push",
|
isSelected = props.selection == "push",
|
||||||
transparency = props.transparency,
|
transparency = props.transparency,
|
||||||
|
|
|
||||||
|
|
@ -871,7 +871,7 @@ function App:endSession()
|
||||||
end
|
end
|
||||||
|
|
||||||
function App:render()
|
function App:render()
|
||||||
local pluginName = "Rojo " .. Version.display(Config.version)
|
local pluginName = "Atlas " .. Version.display(Config.version)
|
||||||
|
|
||||||
local function createPageElement(appStatus, additionalProps)
|
local function createPageElement(appStatus, additionalProps)
|
||||||
additionalProps = additionalProps or {}
|
additionalProps = additionalProps or {}
|
||||||
|
|
@ -1010,9 +1010,9 @@ function App:render()
|
||||||
}),
|
}),
|
||||||
|
|
||||||
toggleAction = e(StudioPluginAction, {
|
toggleAction = e(StudioPluginAction, {
|
||||||
name = "RojoConnection",
|
name = "AtlasConnection",
|
||||||
title = "Rojo: Connect/Disconnect",
|
title = "Atlas: Connect/Disconnect",
|
||||||
description = "Toggles the server for a Rojo sync session",
|
description = "Toggles the server for an Atlas sync session",
|
||||||
icon = Assets.Images.PluginButton,
|
icon = Assets.Images.PluginButton,
|
||||||
bindable = true,
|
bindable = true,
|
||||||
onTriggered = function()
|
onTriggered = function()
|
||||||
|
|
@ -1027,9 +1027,9 @@ function App:render()
|
||||||
}),
|
}),
|
||||||
|
|
||||||
connectAction = e(StudioPluginAction, {
|
connectAction = e(StudioPluginAction, {
|
||||||
name = "RojoConnect",
|
name = "AtlasConnect",
|
||||||
title = "Rojo: Connect",
|
title = "Atlas: Connect",
|
||||||
description = "Connects the server for a Rojo sync session",
|
description = "Connects the server for an Atlas sync session",
|
||||||
icon = Assets.Images.PluginButton,
|
icon = Assets.Images.PluginButton,
|
||||||
bindable = true,
|
bindable = true,
|
||||||
onTriggered = function()
|
onTriggered = function()
|
||||||
|
|
@ -1040,9 +1040,9 @@ function App:render()
|
||||||
}),
|
}),
|
||||||
|
|
||||||
disconnectAction = e(StudioPluginAction, {
|
disconnectAction = e(StudioPluginAction, {
|
||||||
name = "RojoDisconnect",
|
name = "AtlasDisconnect",
|
||||||
title = "Rojo: Disconnect",
|
title = "Atlas: Disconnect",
|
||||||
description = "Disconnects the server for a Rojo sync session",
|
description = "Disconnects the server for an Atlas sync session",
|
||||||
icon = Assets.Images.PluginButton,
|
icon = Assets.Images.PluginButton,
|
||||||
bindable = true,
|
bindable = true,
|
||||||
onTriggered = function()
|
onTriggered = function()
|
||||||
|
|
@ -1056,8 +1056,8 @@ function App:render()
|
||||||
name = pluginName,
|
name = pluginName,
|
||||||
}, {
|
}, {
|
||||||
button = e(StudioToggleButton, {
|
button = e(StudioToggleButton, {
|
||||||
name = "Rojo",
|
name = "Atlas",
|
||||||
tooltip = "Show or hide the Rojo panel",
|
tooltip = "Show or hide the Atlas panel",
|
||||||
icon = self.state.toolbarIcon,
|
icon = self.state.toolbarIcon,
|
||||||
active = self.state.guiEnabled,
|
active = self.state.guiEnabled,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
concrete instances and assigning them IDs.
|
concrete instances and assigning them IDs.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
local Packages = script.Parent.Parent.Parent.Packages
|
||||||
|
local Log = require(Packages.Log)
|
||||||
|
|
||||||
local invariant = require(script.Parent.Parent.invariant)
|
local invariant = require(script.Parent.Parent.invariant)
|
||||||
|
|
||||||
local function hydrate(instanceMap, virtualInstances, rootId, rootInstance)
|
local function hydrate(instanceMap, virtualInstances, rootId, rootInstance)
|
||||||
|
|
@ -26,6 +29,17 @@ local function hydrate(instanceMap, virtualInstances, rootId, rootInstance)
|
||||||
for _, childId in ipairs(virtualInstance.Children) do
|
for _, childId in ipairs(virtualInstance.Children) do
|
||||||
local virtualChild = virtualInstances[childId]
|
local virtualChild = virtualInstances[childId]
|
||||||
|
|
||||||
|
if virtualChild == nil then
|
||||||
|
Log.warn(
|
||||||
|
"Hydration: virtualInstances missing child ID {} (parent: {} '{}')",
|
||||||
|
childId,
|
||||||
|
rootId,
|
||||||
|
virtualInstance.Name
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
|
||||||
|
local matched = false
|
||||||
for childIndex, childInstance in existingChildren do
|
for childIndex, childInstance in existingChildren do
|
||||||
if not isExistingChildVisited[childIndex] then
|
if not isExistingChildVisited[childIndex] then
|
||||||
-- We guard accessing Name and ClassName in order to avoid
|
-- We guard accessing Name and ClassName in order to avoid
|
||||||
|
|
@ -40,10 +54,33 @@ local function hydrate(instanceMap, virtualInstances, rootId, rootInstance)
|
||||||
if accessSuccess and name == virtualChild.Name and className == virtualChild.ClassName then
|
if accessSuccess and name == virtualChild.Name and className == virtualChild.ClassName then
|
||||||
isExistingChildVisited[childIndex] = true
|
isExistingChildVisited[childIndex] = true
|
||||||
hydrate(instanceMap, virtualInstances, childId, childInstance)
|
hydrate(instanceMap, virtualInstances, childId, childInstance)
|
||||||
|
matched = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not matched then
|
||||||
|
-- Log why the match failed to help diagnose hydration issues
|
||||||
|
Log.debug(
|
||||||
|
"Hydration: No match for virtual child '{}' ({}) under '{}' ({})",
|
||||||
|
virtualChild.Name,
|
||||||
|
virtualChild.ClassName,
|
||||||
|
virtualInstance.Name,
|
||||||
|
rootInstance:GetFullName()
|
||||||
|
)
|
||||||
|
-- List real children for comparison
|
||||||
|
local realChildNames = {}
|
||||||
|
for _, child in existingChildren do
|
||||||
|
local success, childName, childClass = pcall(function()
|
||||||
|
return child.Name, child.ClassName
|
||||||
|
end)
|
||||||
|
if success then
|
||||||
|
table.insert(realChildNames, string.format("%s (%s)", childName, childClass))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Log.trace(" Real children: {}", table.concat(realChildNames, ", "))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"Reifies" a virtual DOM, constructing a real DOM with the same shape.
|
"Reifies" a virtual DOM, constructing a real DOM with the same shape.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
local invariant = require(script.Parent.Parent.invariant)
|
||||||
local PatchSet = require(script.Parent.Parent.PatchSet)
|
local PatchSet = require(script.Parent.Parent.PatchSet)
|
||||||
local setProperty = require(script.Parent.setProperty)
|
local setProperty = require(script.Parent.setProperty)
|
||||||
local decodeValue = require(script.Parent.decodeValue)
|
local decodeValue = require(script.Parent.decodeValue)
|
||||||
|
|
@ -31,6 +32,12 @@ function reifyInstance(deferredRefs, instanceMap, virtualInstances, rootId, pare
|
||||||
-- properties that could not be assigned.
|
-- properties that could not be assigned.
|
||||||
local unappliedPatch = PatchSet.newEmpty()
|
local unappliedPatch = PatchSet.newEmpty()
|
||||||
|
|
||||||
|
-- The root ID must exist - if not, it's a programming error
|
||||||
|
local rootInstance = virtualInstances[rootId]
|
||||||
|
if rootInstance == nil then
|
||||||
|
invariant("Cannot reify an instance not present in virtualInstances\nID: {}", rootId)
|
||||||
|
end
|
||||||
|
|
||||||
reifyInstanceInner(unappliedPatch, deferredRefs, instanceMap, virtualInstances, rootId, parentInstance)
|
reifyInstanceInner(unappliedPatch, deferredRefs, instanceMap, virtualInstances, rootId, parentInstance)
|
||||||
|
|
||||||
return unappliedPatch
|
return unappliedPatch
|
||||||
|
|
@ -43,10 +50,10 @@ function reifyInstanceInner(unappliedPatch, deferredRefs, instanceMap, virtualIn
|
||||||
local virtualInstance = virtualInstances[id]
|
local virtualInstance = virtualInstances[id]
|
||||||
|
|
||||||
if virtualInstance == nil then
|
if virtualInstance == nil then
|
||||||
-- This instance was intentionally excluded from the patch (e.g., due to
|
-- This child was intentionally excluded from the patch (e.g., due to
|
||||||
-- ambiguous paths with duplicate-named siblings). Skip it gracefully
|
-- ambiguous paths with duplicate-named siblings). Skip it gracefully.
|
||||||
-- rather than throwing an error. The parent's Children array may still
|
-- The parent's Children array may still reference this ID even though
|
||||||
-- reference this ID even though it wasn't included in the additions.
|
-- it wasn't included in the additions.
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -517,7 +517,7 @@ function ServeSession:__applyPatch(patch)
|
||||||
end
|
end
|
||||||
|
|
||||||
local patchTimestamp = DateTime.now():FormatLocalTime("LTS", "en-us")
|
local patchTimestamp = DateTime.now():FormatLocalTime("LTS", "en-us")
|
||||||
local historyRecording = ChangeHistoryService:TryBeginRecording("Rojo: Patch " .. patchTimestamp)
|
local historyRecording = ChangeHistoryService:TryBeginRecording("Atlas: Patch " .. patchTimestamp)
|
||||||
if not historyRecording then
|
if not historyRecording then
|
||||||
-- There can only be one recording at a time
|
-- There can only be one recording at a time
|
||||||
Log.debug("Failed to begin history recording for " .. patchTimestamp .. ". Another recording is in progress.")
|
Log.debug("Failed to begin history recording for " .. patchTimestamp .. ". Another recording is in progress.")
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ end)
|
||||||
local app = Roact.createElement(App, {
|
local app = Roact.createElement(App, {
|
||||||
plugin = plugin,
|
plugin = plugin,
|
||||||
})
|
})
|
||||||
local tree = Roact.mount(app, game:GetService("CoreGui"), "Rojo UI")
|
local tree = Roact.mount(app, game:GetService("CoreGui"), "Atlas UI")
|
||||||
|
|
||||||
plugin.Unloading:Connect(function()
|
plugin.Unloading:Connect(function()
|
||||||
Roact.unmount(tree)
|
Roact.unmount(tree)
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ else
|
||||||
message = Fmt.fmt(message, ...)
|
message = Fmt.fmt(message, ...)
|
||||||
|
|
||||||
local fullMessage = string.format(
|
local fullMessage = string.format(
|
||||||
"Rojo detected an invariant violation within itself:\n"
|
"Atlas detected an invariant violation within itself:\n"
|
||||||
.. "%s\n\n"
|
.. "%s\n\n"
|
||||||
.. "This is a bug in Rojo. Please file an issue:\n"
|
.. "This is a bug in Atlas. Please file an issue:\n"
|
||||||
.. "https://github.com/rojo-rbx/rojo/issues",
|
.. "https://github.com/rojo-rbx/rojo/issues",
|
||||||
message
|
message
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ local plugin = plugin or script:FindFirstAncestorWhichIsA("Plugin")
|
||||||
local widget = nil
|
local widget = nil
|
||||||
if plugin then
|
if plugin then
|
||||||
widget = plugin:CreateDockWidgetPluginGui(
|
widget = plugin:CreateDockWidgetPluginGui(
|
||||||
"Rojo_soundPlayer",
|
"Atlas_soundPlayer",
|
||||||
DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, true, 10, 10, 10, 10)
|
DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, true, 10, 10, 10, 10)
|
||||||
)
|
)
|
||||||
widget.Name = "Rojo_soundPlayer"
|
widget.Name = "Atlas_soundPlayer"
|
||||||
widget.Title = "Rojo Sound Player"
|
widget.Title = "Atlas Sound Player"
|
||||||
end
|
end
|
||||||
|
|
||||||
local SoundPlayer = {}
|
local SoundPlayer = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue