Skip to content

Commit bbb45e7

Browse files
committed
chore: improve textarea's for bio and post edit
1 parent 5dad9d1 commit bbb45e7

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

crates/rostra-web-ui/assets/style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,10 @@ emoji-picker {
740740
.m-profileSummary__bio {
741741
flex-basis: 100%;
742742
width: 100%;
743+
height: 10rem;
744+
border: 1px solid var(--color-button-border);
745+
border-radius: var(--border-radius-std);
746+
padding: 5pt;
743747
}
744748

745749
.m-profileSummary__buttons {
@@ -829,6 +833,7 @@ emoji-picker {
829833

830834

831835
.m-newPostForm__content {
836+
box-sizing: border-box;
832837
width: 100%;
833838
padding: 5pt;
834839
height: 10rem;
@@ -1469,10 +1474,17 @@ input:checked+.slider:before {
14691474
}
14701475

14711476
.m-newPostForm__textareaWrapper {
1477+
display: flex;
1478+
flex-direction: column;
14721479
position: relative;
14731480
width: 100%;
14741481
}
14751482

1483+
.m-newPostForm__textareaWrapper textarea {
1484+
resize: vertical;
1485+
/* Allows resizing only vertically (up/down) */
1486+
}
1487+
14761488
/* Global Notification System */
14771489
.o-notificationArea {
14781490
position: fixed;

crates/rostra-web-ui/src/routes/profile_self.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,6 @@ impl UiState {
204204
name="name"
205205
value=(self_profile.display_name) {
206206
}
207-
textarea."m-profileSummary__bio"
208-
placeholder="Bio..."
209-
type="text"
210-
dir="auto"
211-
name="bio"
212-
"x-on:keyup.enter.ctrl"="$el.form.requestSubmit()"
213-
{
214-
{(self_profile.bio)}
215-
}
216207

217208
div ."m-profileSummary__buttons" {
218209
button
@@ -222,6 +213,16 @@ impl UiState {
222213
}
223214
}
224215
}
216+
217+
textarea."m-profileSummary__bio"
218+
placeholder="Bio..."
219+
rows="8"
220+
dir="auto"
221+
name="bio"
222+
"x-on:keyup.enter.ctrl"="$el.form.requestSubmit()"
223+
{
224+
{(self_profile.bio)}
225+
}
225226
}
226227
})
227228
}

0 commit comments

Comments
 (0)