From 4469b97351a2096c3ed7b13ed32f4487bae4f33b Mon Sep 17 00:00:00 2001 From: Misha Damjanic Date: Tue, 6 May 2025 13:38:52 -0700 Subject: [PATCH 1/2] Added `alpha` property to color picker --- schemas/theme/setting.json | 7 ++++++- tests/fixtures/section-schema-1.json | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/schemas/theme/setting.json b/schemas/theme/setting.json index 0af7f5d..51c6507 100644 --- a/schemas/theme/setting.json +++ b/schemas/theme/setting.json @@ -298,7 +298,12 @@ "label": true, "info": true, "id": true, - "visible_if": true + "visible_if": true, + "alpha": { + "type": "boolean", + "description": "A boolean value that determines whether the color picker should include an alpha slider. The default value is true.", + "markdownDescription": "A boolean value that determines whether the color picker should include an alpha slider. The default value is true.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/settings/input-settings#color)" + } }, "additionalProperties": false }, diff --git a/tests/fixtures/section-schema-1.json b/tests/fixtures/section-schema-1.json index e50cf2c..4c3bbdd 100644 --- a/tests/fixtures/section-schema-1.json +++ b/tests/fixtures/section-schema-1.json @@ -1,4 +1,4 @@ -{ +{ "name": "t:sections.announcement-bar.name", "max_blocks": 12, "class": "announcement-bar-section", @@ -12,6 +12,13 @@ "label": "t:sections.all.colors.label", "default": "accent-1" }, + { + "type": "color", + "id": "color_picker", + "label": "t:sections.all.colors.label", + "default": "accent-1", + "alpha": false + }, { "type": "checkbox", "id": "show_line_separator", From 88967bebe6afcbed1096f8144113f2aa23474c35 Mon Sep 17 00:00:00 2001 From: Misha Damjanic Date: Tue, 6 May 2025 13:51:24 -0700 Subject: [PATCH 2/2] Remove an extra space from tests/fixtures/section-schema-1.json --- tests/fixtures/section-schema-1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/section-schema-1.json b/tests/fixtures/section-schema-1.json index 4c3bbdd..0cd382e 100644 --- a/tests/fixtures/section-schema-1.json +++ b/tests/fixtures/section-schema-1.json @@ -1,4 +1,4 @@ -{ +{ "name": "t:sections.announcement-bar.name", "max_blocks": 12, "class": "announcement-bar-section",