-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(tab-bar): add expand and shape props for ionic theme #29888
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
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a589deb
refactor(tab-bar): add expand prop for ionic theme
thetaPC f555a14
refactor(tab-bar): add shape prop
thetaPC 6ba19d8
refactor(tab-bar): use correct padding with safe area
thetaPC 2b0db02
chore(tab-bar): run build
thetaPC 872e121
refactor(tab-bar): update padding and positions
thetaPC 0fec029
refactor(tab-bar): remove extra bottom
thetaPC a8ce57b
refactor(segment): revert
thetaPC 710eac3
refactor(tab-bar): update styles
thetaPC 8e05a78
refactor(tab-bar): clean up test pages
thetaPC bc8b59f
test(tab-bar): add expand tests
thetaPC a9fa56a
test(tab-bar): add shape snapshots
thetaPC bb3857b
test(alert): remove faulty snapshot
thetaPC fe21082
chore(): add updated snapshots
Ionitron 7664b28
refactor(tabs): revert test page
thetaPC d85729c
Merge branch 'ROU-11202' of github.com:ionic-team/ionic-framework int…
thetaPC f703a4c
refactor(tab-bar): add round shape default
thetaPC 9f9c9a8
test(tab-bar): update snapshots
thetaPC 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en" dir="ltr"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>Tab Bar - Expand</title> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" | ||
| /> | ||
| <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> | ||
| <link rel="stylesheet" href="../../../../../css/ionic.bundle.css" /> | ||
| <link rel="stylesheet" href="../../../../../scripts/testing/styles.css" /> | ||
| </head> | ||
|
|
||
| <body> | ||
| <ion-app> | ||
| <ion-content> | ||
| <h2>Default</h2> | ||
| <ion-tab-bar> | ||
| <ion-tab-button tab="1"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="2"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="3"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
| </ion-tab-bar> | ||
|
|
||
| <h2>Full</h2> | ||
| <ion-tab-bar expand="full"> | ||
| <ion-tab-button tab="1"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="2"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="3"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
| </ion-tab-bar> | ||
|
|
||
| <h2>Compact</h2> | ||
| <ion-tab-bar expand="compact"> | ||
| <ion-tab-button tab="1"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="2"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="3"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
| </ion-tab-bar> | ||
| </ion-content> | ||
| </ion-app> | ||
|
|
||
| <style> | ||
| ion-content { | ||
| --background: #f6f6f6; | ||
| } | ||
| </style> | ||
| </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,39 @@ | ||
| import { expect } from '@playwright/test'; | ||
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| /** | ||
| * This behavior only applies to the `ionic` theme. | ||
| */ | ||
| configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('tab-bar: expand'), () => { | ||
| test.describe(title('compact'), () => { | ||
| test('should not have visual regressions', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-tab-bar expand="compact"> | ||
| <ion-tab-button tab="1"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="2"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
|
|
||
| <ion-tab-button tab="3"> | ||
| <ion-icon name="triangle-outline"></ion-icon> | ||
| <ion-label>Label</ion-label> | ||
| </ion-tab-button> | ||
| </ion-tab-bar> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const tabBar = page.locator('ion-tab-bar'); | ||
|
|
||
| await expect(tabBar).toHaveScreenshot(screenshot(`tab-bar-expand-compact`)); | ||
| }); | ||
| }); | ||
| }); | ||
| }); |
Binary file added
BIN
+1.26 KB
....ts-snapshots/tab-bar-expand-compact-ionic-md-ltr-light-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
+1.55 KB
...ts-snapshots/tab-bar-expand-compact-ionic-md-ltr-light-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
+1.29 KB
....ts-snapshots/tab-bar-expand-compact-ionic-md-ltr-light-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.
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.