Skip to content

Commit 08a2a0c

Browse files
committed
Revert "Merge branch 'next' into ROU-11968-button"
This reverts commit ed387c2, reversing changes made to 09e9033.
1 parent 54d9dcb commit 08a2a0c

21 files changed

+19
-75
lines changed

core/src/components/badge/badge.ionic.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,17 @@
160160
// Badge in Button
161161
// --------------------------------------------------
162162

163-
:host(:not(:empty).in-button) {
164-
--padding-start: #{globals.$ion-scale-050};
165-
--padding-end: #{globals.$ion-scale-050};
163+
:host([vertical]:not(.in-tab-button).in-button.badge-small) {
164+
@include globals.position(null, calc(-1 * var(globals.$ion-space-050)));
165+
}
166166

167-
@include globals.typography(globals.$ion-body-action-xs);
167+
:host([vertical]:not(.in-tab-button).in-button.badge-medium),
168+
:host([vertical]:not(.in-tab-button).in-button.badge-large) {
169+
@include globals.position(null, globals.$ion-space-050);
170+
}
168171

172+
:host(:not(:empty).in-button) {
173+
@include globals.typography(globals.$ion-body-action-xs);
169174
min-width: globals.$ion-scale-400;
170175
height: globals.$ion-scale-400;
171176

core/src/components/badge/badge.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class Badge implements ComponentInterface {
8080
const theme = getIonTheme(this);
8181
const { size } = this;
8282

83-
// TODO(FW-6355): Remove theme check when sizes are defined for all themes.
83+
// TODO(ROU-10747): Remove theme check when sizes are defined for all themes.
8484
if (theme !== 'ionic') {
8585
return undefined;
8686
}
@@ -133,7 +133,6 @@ export class Badge implements ComponentInterface {
133133
[`badge-vertical-${this.vertical}`]: this.vertical !== undefined,
134134
'in-button': hostContext('ion-button', this.el),
135135
'in-tab-button': hostContext('ion-tab-button', this.el),
136-
'long-badge': (this.el.textContent?.trim().length ?? 0) > 2,
137136
})}
138137
>
139138
<slot></slot>

core/src/components/badge/test/hint/badge.e2e.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,5 @@ configs({ directions: ['ltr'], modes: ['md', 'ios', 'ionic-md'] }).forEach(({ co
5656

5757
await expect(container).toHaveScreenshot(screenshot(`badge-hint-button-bottom`));
5858
});
59-
60-
test('should not have visual regressions for different button sizes', async ({ page }) => {
61-
await page.goto('/src/components/badge/test/hint', config);
62-
63-
const container = page.locator('#button-size');
64-
65-
await expect(container).toHaveScreenshot(screenshot(`badge-hint-button-size`));
66-
});
6759
});
6860
});
-9 Bytes
Loading
11 Bytes
Loading
-22 Bytes
Loading

0 commit comments

Comments
 (0)