Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8e44a84
Adding half row height to textarea wrapper
rugoncalves Feb 16, 2026
6d2cf2f
Adding tests
rugoncalves Feb 16, 2026
be69a19
Trying out to increase height differently
rugoncalves Feb 16, 2026
ed3e0d3
Change labels in tests
rugoncalves Feb 16, 2026
98c4643
Adding paddings
rugoncalves Feb 16, 2026
8d105ba
chore(): add updated snapshots
Ionitron Feb 16, 2026
06dba03
Fixing the visual tests
rugoncalves Feb 16, 2026
1002e0a
chore(): add updated snapshots
Ionitron Feb 16, 2026
00b375b
Specifying when height should be 0
rugoncalves Feb 16, 2026
3c2ae2f
chore(): add updated snapshots
Ionitron Feb 16, 2026
dbbde87
Removing setting height = 0
rugoncalves Feb 16, 2026
a64bba9
chore(): add updated snapshots
Ionitron Feb 16, 2026
682c40f
Re-adding the height: 0
rugoncalves Feb 16, 2026
d17e70c
Enforcing respect over row parameter
rugoncalves Feb 16, 2026
4f4283a
Fix on the height
rugoncalves Feb 16, 2026
388c87b
chore(): add updated snapshots
Ionitron Feb 16, 2026
fe037ef
Removing extra leading space
rugoncalves Feb 16, 2026
7780e6d
Merge branch 'ROU-12443-v4' of https://github.com/ionic-team/ionic-fr…
rugoncalves Feb 16, 2026
8390653
Removing forced height
rugoncalves Feb 16, 2026
75b34a5
chore(): add updated snapshots
Ionitron Feb 16, 2026
10cbe31
Fix lint
rugoncalves Feb 16, 2026
5b8a456
Merge branch 'ROU-12443-v4' of https://github.com/ionic-team/ionic-fr…
rugoncalves Feb 16, 2026
0deda70
Update comments
rugoncalves Feb 18, 2026
d864510
Changing test name
rugoncalves Feb 18, 2026
c8c1fb1
Removing property label-placement from tests
rugoncalves Feb 18, 2026
f833b25
Removing property helper-text from tests
rugoncalves Feb 18, 2026
373f66a
Improving consistency
rugoncalves Feb 18, 2026
527fac6
Fix test missing quote
rugoncalves Feb 18, 2026
e05db9f
Reviewing the order of the css in ionic theme
rugoncalves Feb 18, 2026
5f0075a
Improved comment
rugoncalves Feb 18, 2026
56a5638
Remove old screenshots
rugoncalves Feb 18, 2026
d460dcc
Adding test with icon in the start and end slots
rugoncalves Feb 18, 2026
3fb17c6
Removing test for fill outline and solid
rugoncalves Feb 18, 2026
b68a30e
Simplifying tests for rows
rugoncalves Feb 18, 2026
7866bb3
Update core/src/components/textarea/textarea.common.scss
rugoncalves Feb 18, 2026
8b5def6
Removing unneeded margin
rugoncalves Feb 18, 2026
c39f687
Merge branch 'ROU-12443-v4' of https://github.com/ionic-team/ionic-fr…
rugoncalves Feb 18, 2026
27412d7
chore(): add updated snapshots
Ionitron Feb 18, 2026
e98eeb4
Merge branch 'ROU-12443-v4' of https://github.com/ionic-team/ionic-fr…
rugoncalves Feb 18, 2026
8913885
chore(): add updated snapshots
Ionitron Feb 18, 2026
ce3a0a8
Changes requested for tests
rugoncalves Feb 18, 2026
6966803
Remove screenshots
rugoncalves Feb 18, 2026
a95083b
Reverting test name change
rugoncalves Feb 18, 2026
cad746a
chore(): add updated snapshots
Ionitron Feb 18, 2026
787dadf
test(textarea): change text from small
thetaPC Feb 18, 2026
bc31434
test(textarea): change text from medium
thetaPC Feb 18, 2026
afe5120
test(textarea): change text from large
thetaPC Feb 18, 2026
7fa136f
chore(): add updated snapshots
Ionitron Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions core/src/components/textarea/test/rows/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Textarea - Rows</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<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>
.grid {
display: grid;
grid-template-columns: repeat(3, minmax(250px, 1fr));
grid-row-gap: 20px;
grid-column-gap: 20px;
}

h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
}

@media screen and (max-width: 800px) {
.grid {
grid-template-columns: 1fr;
padding: 0;
}
}
</style>
</head>

<body>
<ion-app>
<ion-header>
<ion-toolbar>
<ion-title>Textarea - Rows</ion-title>
</ion-toolbar>
</ion-header>

<ion-content id="content" class="ion-padding">
<div class="grid">
<!-- Different row values -->
<div class="grid-item">
<h2>Rows: 1</h2>
<ion-textarea
rows="1"
label="Small"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<div class="grid-item">
<h2>Rows: 3</h2>
<ion-textarea
rows="3"
label="Medium"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<div class="grid-item">
<h2>Rows: 8</h2>
<ion-textarea
rows="8"
label="Large"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<!-- Different sizes -->
<div class="grid-item">
<h2>Rows: 3, Size Small</h2>
<ion-textarea
rows="3"
size="small"
label="Small Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<div class="grid-item">
<h2>Rows: 3, Size Medium</h2>
<ion-textarea
rows="3"
size="medium"
label="Medium Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<div class="grid-item">
<h2>Rows: 3, Size Large</h2>
<ion-textarea
rows="3"
size="large"
label="Large Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>

<!-- Auto-grow -->
<div class="grid-item">
<h2>Rows: 3, Auto-grow</h2>
<ion-textarea
rows="3"
auto-grow="true"
label="Comments"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>
</div>
</ion-content>
</ion-app>
</body>
</html>
88 changes: 88 additions & 0 deletions core/src/components/textarea/test/rows/textarea.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

/**
* This behavior does not vary across directions
* This behavior only applies to the `ionic` theme.
*/
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('textarea: rows'), () => {
test('should respect rows attribute', async ({ page }) => {
await page.setContent(
`
<div id="container" style="display: flex; flex-direction: column; gap: 20px;">
<ion-textarea
rows="1"
label="Comments"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
<ion-textarea
rows="3"
label="Comments"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
<ion-textarea
rows="8"
label="Comments"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>
`,
config
);

const container = page.locator('#container');
await expect(container).toHaveScreenshot(screenshot(`textarea-rows`));
});

test('should respect rows attribute with different sizes', async ({ page }) => {
await page.setContent(
`
<div id="container" style="display: flex; flex-direction: column; gap: 20px;">
<ion-textarea
rows="3"
size="small"
label="Small Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
<ion-textarea
rows="3"
size="medium"
label="Medium Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
<ion-textarea
rows="3"
size="large"
label="Large Size"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>
`,
config
);

const container = page.locator('#container');
await expect(container).toHaveScreenshot(screenshot(`textarea-rows-sizes`));
});

test('should respect rows when auto-grow is enabled', async ({ page }) => {
await page.setContent(
`
<div id="container" style="display: flex; flex-direction: column; gap: 20px;">
<ion-textarea
rows="3"
auto-grow="true"
label="Comments"
value="1&#10;2&#10;3&#10;4&#10;5&#10;6&#10;7&#10;8&#10;9&#10;0"
></ion-textarea>
</div>
`,
config
);

const container = page.locator('#container');
await expect(container).toHaveScreenshot(screenshot(`textarea-rows-autogrow`));
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions core/src/components/textarea/textarea.ionic.outline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
border-top: none;
}

// Textarea Fill: Outline, Native Textarea
// ----------------------------------------------------------------

:host(.textarea-fill-outline) textarea {
margin-top: globals.$ion-space-100;
}

// Focus
// ----------------------------------------------------------------

Expand Down
Loading
Loading