From 5519afb5f62269d89d07c4fc89d3b59edc3a3189 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 6 Oct 2026 12:02:55 +0200 Subject: [PATCH] Add what's new in 2.0.0 to the About popup The layout test lets the changelog grow in height with its text, and still checks its position and width. --- popups/about_popup.gd | 13 +++++++++++++ tests/integration/test_layout_unchanged.gd | 14 +++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/popups/about_popup.gd b/popups/about_popup.gd index eb9f30a..d6ee581 100644 --- a/popups/about_popup.gd +++ b/popups/about_popup.gd @@ -4,6 +4,19 @@ extends BasePopup ## What is new in each version, newest first. const WHATS_NEW: Dictionary = { + "2.0.0": "Reworked all popups, they dim the background and close when clicking outside + Fixed blurry text and the layout of the player list + Moved Sync to the top row and Settings next to the reset buttons + The inspiration and sync lists now show where each item starts + The sync result now looks right with any number of columns + Failed song downloads are now retried instead of getting stuck + The game no longer waits forever when the server does not answer + The song cache now fills up to the cache size in the settings + Statistics are turned back on when a new game starts + Fixed bugs with low winning scores and Show answer before a song is playing + The log now shows the time on every row + New app icon and a menu entry on Linux + Reorganized the code and added automated tests", "1.9.0": "Made improvements to the Search window Made small changes to the inspiration list scrolling Made small changes to the player list diff --git a/tests/integration/test_layout_unchanged.gd b/tests/integration/test_layout_unchanged.gd index a343e4f..ba26f42 100644 --- a/tests/integration/test_layout_unchanged.gd +++ b/tests/integration/test_layout_unchanged.gd @@ -68,6 +68,12 @@ const RENAMED_PATHS: Dictionary = { SYNC_COLUMNS + "/CaughtErrorsVBox/CaughtErrorsLabel", } +## Nodes whose height follows text that changes between versions, such as the changelog. +## Their position and width are still checked. +const HEIGHT_FOLLOWS_TEXT: Array[String] = [ + "AboutPopup/AboutPanel/ScrollContainer/ContentVBox", +] + ## How far a node may be from its old place, in pixels. const TOLERANCE: float = 0.5 @@ -134,7 +140,8 @@ func test_every_node_is_where_it_was() -> void: problems.append("%s: %s is missing (was %s)" % [state, path, old_path]) continue var rect: Array = actual[path].rect - for i: int in 4: + var sides: int = 3 if _height_follows_text(path) else 4 + for i: int in sides: if absf(rect[i] - expected.rect[i]) > TOLERANCE: problems.append("%s: %s is at %s, was %s" % [state, path, rect, expected.rect]) @@ -145,3 +152,8 @@ func test_every_node_is_where_it_was() -> void: assert_array(problems).override_failure_message( "%d nodes moved:\n%s" % [problems.size(), "\n".join(problems.slice(0, 30))]) \ .is_empty() + + +static func _height_follows_text(path: String) -> bool: + return HEIGHT_FOLLOWS_TEXT.any(func(node_path: String) -> bool: + return path == node_path || path.begins_with(node_path + "/"))