-
Notifications
You must be signed in to change notification settings - Fork 507
refactor: Remove unused scss #7194
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1f9ab05
chore: remove ~870 lines of unused SCSS
kyle-ssg feb28dd
feat: add local visual regression baseline capture and Claude skill
kyle-ssg 0877e62
fix(e2e): wait for toast to clear before visual snapshot in roles test
kyle-ssg 7ba8cfe
chore: remove 7 unused Bootstrap SCSS modules
kyle-ssg 380f8b9
refactor: replace custom utility classes with Bootstrap 5 equivalents
kyle-ssg 6dd3570
refactor: replace inline styles with Bootstrap utility classes
kyle-ssg a10396b
Merge branch 'main' into chore/remove-unused-scss
kyle-ssg c8895d8
Merge main
kyle-ssg 945d647
chore: remove unused mr-auto and mt-n1 SCSS utilities
kyle-ssg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Visual Regression Test Runner | ||
|
|
||
| Run local visual regression tests by capturing baselines from main on this machine, then comparing against the current branch. Both runs use the same OS and browser, so diffs reflect actual style changes rather than platform rendering differences. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Docker running with Flagsmith services on localhost:8000 | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Capture local baselines from main (stashes changes, checks out main, runs E2E, switches back): | ||
|
|
||
| ```bash | ||
| npm run test:visual:baselines | ||
| ``` | ||
|
|
||
| 2. Run E2E tests on the current branch with visual regression screenshot capture: | ||
|
|
||
| ```bash | ||
| VISUAL_REGRESSION=1 npm run test | ||
| ``` | ||
|
|
||
| 3. Compare captured screenshots against local baselines: | ||
|
|
||
| ```bash | ||
| npm run test:visual:compare | ||
| ``` | ||
|
|
||
| 4. If there are failures, open the HTML report for visual diff inspection: | ||
|
|
||
| ```bash | ||
| npm run test:visual:report | ||
| ``` | ||
|
|
||
| 5. Report results: how many comparisons passed/failed, and whether failures are style/layout regressions or data differences. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { execSync } from 'child_process' | ||
| import * as fs from 'fs' | ||
| import * as path from 'path' | ||
|
|
||
| const SNAPSHOTS_DIR = path.resolve(__dirname, 'visual-regression-snapshots') | ||
| const SCREENSHOTS_DIR = path.resolve(__dirname, 'visual-regression-screenshots') | ||
|
|
||
| function run(cmd: string) { | ||
| execSync(cmd, { stdio: 'inherit' }) | ||
| } | ||
|
|
||
| function runQuiet(cmd: string) { | ||
| execSync(cmd, { stdio: 'pipe' }) | ||
| } | ||
|
|
||
| const branch = execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf-8' }).trim() | ||
|
|
||
| console.log(`Current branch: ${branch}`) | ||
| console.log('Checking out main source code (keeping branch e2e tests)...') | ||
|
|
||
| // Only checkout main's source code, not e2e/ test files. | ||
| // This ensures both baseline and branch runs use the same test code. | ||
| runQuiet('git checkout main -- web/ common/') | ||
|
|
||
| try { | ||
| console.log('Running E2E on main source with VISUAL_REGRESSION=1...') | ||
| if (fs.existsSync(SCREENSHOTS_DIR)) { | ||
| fs.rmSync(SCREENSHOTS_DIR, { recursive: true }) | ||
| } | ||
| run('cross-env VISUAL_REGRESSION=1 npm run test') | ||
|
|
||
| console.log('Copying screenshots to baselines...') | ||
| if (fs.existsSync(SNAPSHOTS_DIR)) { | ||
| fs.rmSync(SNAPSHOTS_DIR, { recursive: true }) | ||
| } | ||
| fs.cpSync(SCREENSHOTS_DIR, SNAPSHOTS_DIR, { recursive: true }) | ||
|
|
||
| const count = fs.readdirSync(SNAPSHOTS_DIR).filter((f) => f.endsWith('.png')).length | ||
| console.log(`Captured ${count} baseline snapshots`) | ||
| } finally { | ||
| // Restore branch's source code | ||
| console.log('Restoring branch source code...') | ||
| runQuiet('git checkout -- web/ common/') | ||
| } | ||
|
|
||
| console.log('Baselines ready. Now run: VISUAL_REGRESSION=1 npm run test && npm run test:visual:compare') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.