mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance script handling and UI consistency
- Added support for encoding the RunContext property in the Script class to determine file suffixes (.server.luau, .client.luau, .plugin.luau, .legacy.luau). - Updated the Confirming.lua file to improve UI consistency in the confirmation message display. - Modified snapshot middleware and syncback logic to accommodate new file extensions and ensure proper handling of plugin scripts. - Refactored tests to align with the new naming conventions for script suffixes and improved path uniqueness checks.
This commit is contained in:
parent
38cbc582f4
commit
18a74c8e4d
7 changed files with 95 additions and 87 deletions
|
|
@ -327,18 +327,18 @@ function ConfirmingPage:render()
|
|||
self:setState({ showingAcceptConfirm = false })
|
||||
end,
|
||||
}, {
|
||||
Content = e("Frame", {
|
||||
Size = UDim2.fromScale(1, 1),
|
||||
BackgroundColor3 = theme.BackgroundColor,
|
||||
BorderSizePixel = 0,
|
||||
}, {
|
||||
Message = e("TextLabel", {
|
||||
Text = string.format(
|
||||
"%d item%s not been reviewed.\n\nAccept selected changes and skip the rest?",
|
||||
self.state.unselectedCount,
|
||||
self.state.unselectedCount == 1 and " has" or "s have"
|
||||
),
|
||||
FontFace = theme.Font.Main,
|
||||
Content = e("Frame", {
|
||||
Size = UDim2.fromScale(1, 1),
|
||||
BackgroundColor3 = theme.BackgroundColor,
|
||||
BorderSizePixel = 0,
|
||||
}, {
|
||||
Message = e("TextLabel", {
|
||||
Text = string.format(
|
||||
"%d item%s not been reviewed.\n\nAccept selected changes and skip the rest?",
|
||||
self.state.unselectedCount,
|
||||
self.state.unselectedCount == 1 and " has" or "s have"
|
||||
),
|
||||
FontFace = theme.Font.Main,
|
||||
TextSize = theme.TextSize.Body,
|
||||
TextColor3 = theme.TextColor,
|
||||
TextWrapped = true,
|
||||
|
|
|
|||
|
|
@ -161,6 +161,18 @@ encodeInstance = function(instance, parentId, _skipPathCheck)
|
|||
Log.warn("Could not find Source property descriptor for {:?}", instance)
|
||||
return nil
|
||||
end
|
||||
|
||||
-- For Script class specifically, also encode RunContext property
|
||||
-- This determines the file suffix (.server.luau, .client.luau, .plugin.luau, .legacy.luau)
|
||||
if instance.ClassName == "Script" then
|
||||
local runContextDescriptor = RbxDom.findCanonicalPropertyDescriptor("Script", "RunContext")
|
||||
if runContextDescriptor then
|
||||
local encodeSuccess, encodeResult = encodeProperty(instance, "RunContext", runContextDescriptor)
|
||||
if encodeSuccess and encodeResult ~= nil then
|
||||
properties.RunContext = encodeResult
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif not DIRECTORY_CLASSES[instance.ClassName] then
|
||||
-- For non-directory, non-script classes, encode all relevant properties
|
||||
local classDescriptor = RbxDom.findClassDescriptor(instance.ClassName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue