Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer hanging table field value over expanding #553

Merged
merged 5 commits into from Aug 27, 2022

Conversation

JohnnyMorganz
Copy link
Owner

Fixes #541

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #553 (d50a42d) into main (760737f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #553   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files          14       14           
  Lines        5422     5431    +9     
=======================================
+ Hits         5303     5312    +9     
  Misses        119      119           
Impacted Files Coverage Δ
src/formatters/table.rs 98.72% <100.00%> (+0.03%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions

This comment was marked as outdated.

@JohnnyMorganz
Copy link
Owner Author

The large changes to the Roact trees seems not ideal

@github-actions
Copy link
Contributor

Repo Comparison Test

diff --git ORI/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua ALT/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
index bebe82d..40c9d39 100644
--- ORI/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
+++ ALT/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
@@ -95,13 +95,12 @@ local function WeaponCard(props)
 							Size = size + UDim2.fromOffset(GOLD_PIECE_PADDING, props.GoldPieceSize),
 						}, {
 							UIGradient = e("UIGradient", {
-								Color = props.AlreadyBought and ColorSequence.new(
-									Color3.fromRGB(122, 122, 122),
-									Color3.fromRGB(122, 122, 122)
-								) or ColorSequence.new(
-									Color3.fromRGB(255, 66, 66),
-									Color3.fromRGB(255, 116, 116)
-								),
+								Color = props.AlreadyBought
+										and ColorSequence.new(
+											Color3.fromRGB(122, 122, 122),
+											Color3.fromRGB(122, 122, 122)
+										)
+									or ColorSequence.new(Color3.fromRGB(255, 66, 66), Color3.fromRGB(255, 116, 116)),
 
 								Rotation = 90,
 							}),
diff --git ORI/zombie-strike/src/hub/StarterGui/MainGui/App/Vouchers/init.lua ALT/zombie-strike/src/hub/StarterGui/MainGui/App/Vouchers/init.lua
index 8573e59..a560577 100644
--- ORI/zombie-strike/src/hub/StarterGui/MainGui/App/Vouchers/init.lua
+++ ALT/zombie-strike/src/hub/StarterGui/MainGui/App/Vouchers/init.lua
@@ -509,11 +509,8 @@ function Vouchers:render()
 							AnimateSpeed = 14,
 							MinGradient = canRedeem and Color3.fromRGB(49, 152, 48) or Color3.fromRGB(201, 51, 37),
 							MaxGradient = canRedeem and Color3.fromRGB(88, 169, 86) or Color3.fromRGB(175, 38, 25),
-							HoveredMaxGradient = canRedeem and Color3.fromRGB(120, 238, 118) or Color3.fromRGB(
-								197,
-								44,
-								30
-							),
+							HoveredMaxGradient = canRedeem and Color3.fromRGB(120, 238, 118)
+								or Color3.fromRGB(197, 44, 30),
 
 							[Roact.Event.Activated] = canRedeem and self.activateRedeem or self.props.close,
 						}, {
diff --git ORI/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/ItemButton.lua ALT/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/ItemButton.lua
index 0f7df2b..605c82b 100644
--- ORI/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/ItemButton.lua
+++ ALT/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/ItemButton.lua
@@ -196,10 +196,8 @@ return RoactRodux.connect(function(state, props)
 
 		if equipped then
 			return {
-				equipped = equipped.UUID == props.Loot.UUID or table.find(
-					state.trading.theirEquipment,
-					props.Loot.UUID
-				) ~= nil,
+				equipped = equipped.UUID == props.Loot.UUID
+					or table.find(state.trading.theirEquipment, props.Loot.UUID) ~= nil,
 			}
 		end
 	end
diff --git ORI/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/PerkDetails.lua ALT/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/PerkDetails.lua
index f8900d5..c6ab038 100644
--- ORI/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/PerkDetails.lua
+++ ALT/zombie-strike/src/shared/ReplicatedStorage/Core/UI/Components/PerkDetails.lua
@@ -59,11 +59,8 @@ local function PerkDetails(props)
 				Icon = e("ImageLabel", {
 					BackgroundTransparency = 1,
 					Image = ImagePanel2,
-					ImageColor3 = perk.Perk.LegendaryPerk and Color3.fromRGB(219, 144, 83) or Color3.fromRGB(
-						77,
-						77,
-						77
-					),
+					ImageColor3 = perk.Perk.LegendaryPerk and Color3.fromRGB(219, 144, 83)
+						or Color3.fromRGB(77, 77, 77),
 					LayoutOrder = index,
 					ScaleType = Enum.ScaleType.Slice,
 					SliceCenter = Rect.new(13, 10, 369, 82),
diff --git ORI/lit/commands/serve.lua ALT/lit/commands/serve.lua
index 38e6078..183600b 100644
--- ORI/lit/commands/serve.lua
+++ ALT/lit/commands/serve.lua
@@ -38,10 +38,8 @@ return function()
 	end)
 
 	app.use(require("weblit-auto-headers"))
-.route({ method = "GET", path = "/snapshots" }, require("snapshots")).route(
-		{ method = "GET", path = "/stats" },
-		require("stats")
-	)
+		.route({ method = "GET", path = "/snapshots" }, require("snapshots"))
+		.route({ method = "GET", path = "/stats" }, require("stats"))
 
 	-- Handle websocket clients
 	app.websocket({

@matthargett
Copy link

matthargett commented Aug 21, 2022

These actually look good to me, after the merge from main. It makes the hang symmetric so each line is part of the boolean, not a weird split between part of the boolean and part of the expanded table

@JohnnyMorganz JohnnyMorganz merged commit c91e97e into main Aug 27, 2022
@JohnnyMorganz JohnnyMorganz deleted the prefer-hang-over-expand branch August 27, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer hanging table field expression rather than hanging whole table
2 participants