-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(range): add reference point for start position of range slider (#…
…25598) Resolves #24348 Co-authored-by: Sachin Garg <[email protected]>
- Loading branch information
1 parent
2e30612
commit c2781cc
Showing
20 changed files
with
243 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
148 changes: 148 additions & 0 deletions
148
core/src/components/range/test/activeBarStart/index.html
This file contains 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,148 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Range - activeBarStart</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
/> | ||
<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/core.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-range { | ||
/* End knob is being cut-off */ | ||
width: 90%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<ion-app> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>Range - activeBarStart</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
<ion-content class="ion-padding" id="content"> | ||
<ion-list> | ||
<ion-item> | ||
<ion-label position="stacked">activeBarStart is 0 and value is 0.</ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="0" | ||
value="0" | ||
> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked"> activeBarStart is 0 and value is 70. </ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="0" | ||
value="70" | ||
> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked"> activeBarStart is 0 and value is -70. </ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="0" | ||
value="-70" | ||
> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked"> activeBarStart is -30 and value is 0. </ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="-30" | ||
value="0" | ||
> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked"> activeBarStart is 30 and value is 0. </ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="30" | ||
value="0" | ||
> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked">activeBarStart is between steps</ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="25" | ||
value="0" | ||
></ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked">invalid activeBarStart value (less than min)</ion-label> | ||
<ion-range class="ion-no-padding" min="0" max="100" snaps="10" step="10" pin="true" active-bar-start="-30"> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked">invalid activeBarStart value (greater than max)</ion-label> | ||
<ion-range class="ion-no-padding" min="0" max="100" snaps="10" step="10" pin="true" active-bar-start="110"> | ||
</ion-range> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked"> activeBarStart is ignored with dual knobs enabled. </ion-label> | ||
<ion-range | ||
class="ion-no-padding" | ||
min="-100" | ||
max="100" | ||
snaps="10" | ||
step="10" | ||
pin="true" | ||
active-bar-start="-30" | ||
dual-knobs="true" | ||
value="30" | ||
></ion-range> | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
</ion-app> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
core/src/components/range/test/activeBarStart/range.e2e.ts
This file contains 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,12 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from '@utils/test/playwright'; | ||
|
||
test.describe('range: activeBarStart', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.goto(`/src/components/range/test/activeBarStart`); | ||
|
||
await page.setIonViewport(); | ||
|
||
expect(await page.screenshot()).toMatchSnapshot(`range-activeBarStart-diff-${page.getSnapshotSettings()}.png`); | ||
}); | ||
}); |
Binary file added
BIN
+181 KB
...ange.e2e.ts-snapshots/range-activeBarStart-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
+57 KB
...nge.e2e.ts-snapshots/range-activeBarStart-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
+143 KB
...ange.e2e.ts-snapshots/range-activeBarStart-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
+181 KB
...ange.e2e.ts-snapshots/range-activeBarStart-diff-ios-rtl-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
+56.9 KB
...nge.e2e.ts-snapshots/range-activeBarStart-diff-ios-rtl-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
+143 KB
...ange.e2e.ts-snapshots/range-activeBarStart-diff-ios-rtl-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
+127 KB
...range.e2e.ts-snapshots/range-activeBarStart-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
+39.7 KB
...ange.e2e.ts-snapshots/range-activeBarStart-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
+97.4 KB
...range.e2e.ts-snapshots/range-activeBarStart-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.
Binary file added
BIN
+126 KB
...range.e2e.ts-snapshots/range-activeBarStart-diff-md-rtl-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
+39.7 KB
...ange.e2e.ts-snapshots/range-activeBarStart-diff-md-rtl-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
+97.1 KB
...range.e2e.ts-snapshots/range-activeBarStart-diff-md-rtl-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.
This file contains 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 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