mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Show failed to apply in visualizer (#717)
Objects with failed changes will highlight, and the specific failed changes in their list will highlight as well.
This commit is contained in:
parent
7ef4a1ff12
commit
0a932ff880
7 changed files with 49 additions and 17 deletions
|
|
@ -20,14 +20,13 @@ function ChangeList:render()
|
|||
return Theme.with(function(theme)
|
||||
local props = self.props
|
||||
local changes = props.changes
|
||||
local columnVisibility = props.columnVisibility
|
||||
|
||||
-- Color alternating rows for readability
|
||||
local rowTransparency = props.transparency:map(function(t)
|
||||
return 0.93 + (0.07 * t)
|
||||
end)
|
||||
|
||||
local columnVisibility = props.columnVisibility
|
||||
|
||||
local rows = {}
|
||||
local pad = {
|
||||
PaddingLeft = UDim.new(0, 5),
|
||||
|
|
@ -93,6 +92,9 @@ function ChangeList:render()
|
|||
continue -- Skip headers, already handled above
|
||||
end
|
||||
|
||||
local metadata = values[4]
|
||||
local isWarning = metadata.isWarning
|
||||
|
||||
rows[row] = e("Frame", {
|
||||
Size = UDim2.new(1, 0, 0, 30),
|
||||
BackgroundTransparency = row % 2 ~= 0 and rowTransparency or 1,
|
||||
|
|
@ -109,11 +111,11 @@ function ChangeList:render()
|
|||
}),
|
||||
A = e("TextLabel", {
|
||||
Visible = columnVisibility[1],
|
||||
Text = tostring(values[1]),
|
||||
Text = (if isWarning then "⚠ " else "") .. tostring(values[1]),
|
||||
BackgroundTransparency = 1,
|
||||
Font = Enum.Font.GothamMedium,
|
||||
TextSize = 14,
|
||||
TextColor3 = theme.Settings.Setting.DescriptionColor,
|
||||
TextColor3 = if isWarning then theme.Diff.Warning else theme.Settings.Setting.DescriptionColor,
|
||||
TextXAlignment = Enum.TextXAlignment.Left,
|
||||
TextTransparency = props.transparency,
|
||||
TextTruncate = Enum.TextTruncate.AtEnd,
|
||||
|
|
@ -131,6 +133,7 @@ function ChangeList:render()
|
|||
e(DisplayValue, {
|
||||
value = values[2],
|
||||
transparency = props.transparency,
|
||||
textColor = if isWarning then theme.Diff.Warning else theme.Settings.Setting.DescriptionColor,
|
||||
})
|
||||
),
|
||||
C = e(
|
||||
|
|
@ -144,6 +147,7 @@ function ChangeList:render()
|
|||
e(DisplayValue, {
|
||||
value = values[3],
|
||||
transparency = props.transparency,
|
||||
textColor = if isWarning then theme.Diff.Warning else theme.Settings.Setting.DescriptionColor,
|
||||
})
|
||||
),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue