-
Notifications
You must be signed in to change notification settings - Fork 13.5k
fix(spinner): allow resizing of dots, bubbles, and circles #27424
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 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a18b9ed
fix(spinner): allow resizing of dots, bubbles, and circles
mapsandapps 29c42d4
chore(): add updated snapshots
Ionitron e7605db
Improve visual tests
mapsandapps 489c8b0
chore(): add updated snapshots
Ionitron cd1dff0
Merge branch 'main' into FW-3692
mapsandapps 4e19a24
Merge branch 'FW-3692' of github.com:ionic-team/ionic-framework into …
mapsandapps d5c45cc
Remove deleted snapshots
mapsandapps a8dda77
Take a smaller screenshot
mapsandapps e6a531c
Take a smaller screenshot
mapsandapps cf7a489
chore(): add updated snapshots
Ionitron 2141ed6
Take a smaller screenshot
mapsandapps d6959ec
Merge branch 'FW-3692' of github.com:ionic-team/ionic-framework into …
mapsandapps 86993ea
chore(): add updated snapshots
Ionitron 596cf69
Merge branch 'main' into FW-3692
mapsandapps 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
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,117 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Spinner - Resize</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
/> | ||
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" /> | ||
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" /> | ||
<script src="../../../../../scripts/testing/scripts.js"></script> | ||
<script nomodule src="../../../../../dist/ionic/ionic.js"></script> | ||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script> | ||
<style> | ||
ion-spinner { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<ion-app> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>Spinner - Resize</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content id="content"> | ||
<ion-list> | ||
<ion-list-header> | ||
<ion-label>Spinner Loading Indicators</ion-label> | ||
</ion-list-header> | ||
<ion-item><ion-spinner slot="start"></ion-spinner>Platform Default Spinner</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines"></ion-spinner> | ||
<code>lines</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-small"></ion-spinner> | ||
<code>lines-small</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-sharp"></ion-spinner> | ||
<code>lines-sharp</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-sharp-small"></ion-spinner> | ||
<code>lines-sharp-small</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="circular"></ion-spinner> | ||
<code>circular</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="dots"></ion-spinner> | ||
<code>dots</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="bubbles"></ion-spinner> | ||
<code>bubbles</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="circles"></ion-spinner> | ||
<code>circles</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="crescent"></ion-spinner> | ||
<code>crescent</code> | ||
</ion-item> | ||
</ion-list> | ||
|
||
<ion-list> | ||
<ion-item><ion-spinner slot="start" paused></ion-spinner>Paused Platform Default Spinner</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines" paused></ion-spinner> | ||
<code>lines</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-small" paused></ion-spinner> | ||
<code>lines-small</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-sharp" paused></ion-spinner> | ||
<code>lines-sharp</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="lines-sharp-small" paused></ion-spinner> | ||
<code>lines-sharp-small</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="circular" paused></ion-spinner> | ||
<code>circular</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="dots" paused></ion-spinner> | ||
<code>dots</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="bubbles" paused></ion-spinner> | ||
<code>bubbles</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="circles" paused></ion-spinner> | ||
<code>circles</code> | ||
</ion-item> | ||
<ion-item> | ||
<ion-spinner slot="start" name="crescent" paused></ion-spinner> | ||
<code>crescent</code> | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
</ion-app> | ||
</body> | ||
</html> |
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,20 @@ | ||
import { expect } from '@playwright/test'; | ||
import { configs, test } from '@utils/test/playwright'; | ||
|
||
/** | ||
* This behavior does not vary across directions. | ||
*/ | ||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
test.describe(title('spinner: resize'), () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/src/components/spinner/test/resize', config); | ||
}); | ||
test.describe('spinner: visual regression tests', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.setIonViewport(); | ||
|
||
await expect(page).toHaveScreenshot(screenshot(`spinner-resize-diff`)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's quite a lot of wasted space in the screenshot which will slow things down on CI. Could we instead have each spinner next to each other so we can take a smaller screenshot? |
||
}); | ||
}); | ||
}); | ||
}); |
Binary file added
BIN
+77.9 KB
...ze/spinner.e2e.ts-snapshots/spinner-resize-diff-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.5 KB
...e/spinner.e2e.ts-snapshots/spinner-resize-diff-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+77.9 KB
...ze/spinner.e2e.ts-snapshots/spinner-resize-diff-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+77.1 KB
...ize/spinner.e2e.ts-snapshots/spinner-resize-diff-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+86.9 KB
...ze/spinner.e2e.ts-snapshots/spinner-resize-diff-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.2 KB
...ize/spinner.e2e.ts-snapshots/spinner-resize-diff-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spinner has no per-mode styles, so we don't need both iOS and MD screenshots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Should I change the other spinner tests similarly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you can, though spinner does have per-mode behavior, so we should probably have a spec test that checks that the default spinner is set correctly on each mode:
ionic-framework/core/src/components/spinner/spinner.tsx
Lines 42 to 48 in eba4c7f
We might be able to check that the correct
spinner-*
class is set.I'd also be fine if we made a ticket and updated the non-resize tests as a separate task.