From a2904704bc55955d64587ca11699d45643830b86 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Fri, 19 Sep 2025 10:45:37 +0100 Subject: [PATCH] Remove turbosnap Signed-off-by: Charles de Dreuille --- .github/workflows/verify_chromatic.yml | 13 +++++++++- chromatic.config.js | 35 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 chromatic.config.js diff --git a/.github/workflows/verify_chromatic.yml b/.github/workflows/verify_chromatic.yml index 9a88bb462f..6adf405f28 100644 --- a/.github/workflows/verify_chromatic.yml +++ b/.github/workflows/verify_chromatic.yml @@ -56,7 +56,7 @@ jobs: # https://www.chromatic.com/docs/custom-ci-provider#run-chromatic-on-external-forks-of-open-source-projects projectToken: chpt_dab72dc0f97d55b storybookBuildDir: dist-storybook - onlyChanged: true + onlyChanged: false externals: | packages/ui/**/*.css packages/ui/css/** @@ -73,6 +73,17 @@ jobs: echo "" echo "=== Recent changes to CSS files ===" git log --oneline --name-only -10 -- "packages/ui/**/*.css" || echo "No recent CSS changes" + echo "" + echo "=== Git diff for CSS files ===" + git diff HEAD~1 HEAD -- "packages/ui/**/*.css" || echo "No CSS changes in diff" + echo "" + echo "=== Chromatic config check ===" + if [ -f "chromatic.config.js" ]; then + echo "chromatic.config.js exists" + cat chromatic.config.js + else + echo "No chromatic.config.js found" + fi - name: Post Chromatic Link in PR Comment if: github.event_name == 'pull_request' && steps.chromatic.outputs.url diff --git a/chromatic.config.js b/chromatic.config.js new file mode 100644 index 0000000000..a99bf4ecc0 --- /dev/null +++ b/chromatic.config.js @@ -0,0 +1,35 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = { + // Force full rebuild when these files change + externals: [ + 'packages/ui/**/*.css', + 'packages/ui/css/**', + 'packages/ui/src/**/*.css', + 'packages/ui/css/styles.css', // Specific file that was changed + 'packages/ui/src/components/Button/styles.css', // Specific file that was changed + ], + + // Additional configuration for better change detection + turboSnap: { + // Force rebuild for CSS changes + externals: [ + 'packages/ui/**/*.css', + 'packages/ui/css/**', + 'packages/ui/src/**/*.css', + ], + }, +};