Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

modals: Use modal_textarea class for textarea in modals.

Sahil Batracc36f5300d83
diff --git a/web/styles/compose.css b/web/styles/compose.css
index 167a47f82df..2bdf6253e7e 100644
--- a/web/styles/compose.css
+++ b/web/styles/compose.css
@@ -1975,7 +1975,6 @@ textarea.new_message_textarea {
}
& .saved-snippet-content {
- width: 97%;
resize: vertical;
}
}
diff --git a/web/styles/modal.css b/web/styles/modal.css
index cd29c6cd735..51c29c57966 100644
--- a/web/styles/modal.css
+++ b/web/styles/modal.css
@@ -312,7 +312,6 @@
margin-top: 10px;
.email_field_textarea {
- width: 97%;
resize: vertical;
margin-bottom: 10px;
min-height: 2em;
@@ -496,6 +495,11 @@
opacity: var(--opacity-readonly-modal-input);
}
+.modal-textarea {
+ width: 100%;
+ box-sizing: border-box;
+}
+
#add-realm-domain-widget {
.modal_text_input {
width: 14.7143em; /* 206px at 14px em */
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index 0d4b5c74f9c..7f8947f6099 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -922,10 +922,8 @@ ul.popover-group-menu-member-list {
}
#message-report-description {
- width: 100%;
min-height: 2em;
resize: vertical;
- box-sizing: border-box;
}
#move_messages_count {
diff --git a/web/styles/settings.css b/web/styles/settings.css
index fea0bd671c8..f8372d59f34 100644
--- a/web/styles/settings.css
+++ b/web/styles/settings.css
@@ -1621,8 +1621,9 @@ label.preferences-radio-choice-label {
max-width: calc(100% - 6px);
}
- & textarea {
+ .modal-textarea {
/* Subtract (1px border and 6px padding) on each side */
+ box-sizing: content-box;
width: calc(var(--modal-input-width) - 14px);
max-width: calc(100% - 14px);
}
@@ -1759,7 +1760,8 @@ label.preferences-radio-choice-label {
margin-bottom: 20px;
}
-.settings-textarea {
+.settings-textarea,
+.modal-textarea {
color: var(--color-text-default);
background-color: hsl(0deg 0% 100%);
border-radius: 4px;
@@ -2191,6 +2193,7 @@ label.preferences-radio-choice-label {
.settings_url_input,
.settings_text_input,
.settings-textarea,
+ .modal-textarea,
.pill-container {
margin-bottom: 0;
diff --git a/web/styles/subscriptions.css b/web/styles/subscriptions.css
index 612d63f6438..b74de0c88ba 100644
--- a/web/styles/subscriptions.css
+++ b/web/styles/subscriptions.css
@@ -1369,10 +1369,8 @@ div.settings-radio-input-parent {
#change_stream_description,
#new_channel_folder_description,
#edit_channel_folder_description {
- width: 100%;
height: 80px;
margin-bottom: 4px;
- box-sizing: border-box;
min-height: 2em;
resize: vertical;
}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index f2879cd1f54..cf82386163f 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -1481,8 +1481,6 @@ div.topic_edit_spinner .loading_indicator_spinner {
#invite_welcome_custom_message_text {
resize: vertical;
height: 8em;
- width: 100%;
- box-sizing: border-box;
}
.custom-time-input-value {
diff --git a/web/templates/add_saved_snippet_modal.hbs b/web/templates/add_saved_snippet_modal.hbs
index 324070a193c..439e74653fb 100644
--- a/web/templates/add_saved_snippet_modal.hbs
+++ b/web/templates/add_saved_snippet_modal.hbs
@@ -3,7 +3,7 @@
<label for="title" class="modal-field-label">{{t "Title" }}</label>
<input id="new-saved-snippet-title" type="text" name="title" class="modal_text_input saved-snippet-title" value="" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
<div>{{t "Content" }}</div>
- <textarea class="settings-textarea saved-snippet-content" rows="4">
+ <textarea class="modal-textarea saved-snippet-content" rows="4">
{{~prepopulated_content~}}
</textarea>
</form>
diff --git a/web/templates/confirm_dialog/confirm_deactivate_user.hbs b/web/templates/confirm_dialog/confirm_deactivate_user.hbs
index 3d4142fc626..108d8f52320 100644
--- a/web/templates/confirm_dialog/confirm_deactivate_user.hbs
+++ b/web/templates/confirm_dialog/confirm_deactivate_user.hbs
@@ -41,6 +41,6 @@
{{/tr}}
</p>
<p>{{t "The administrators provided the following comment:" }}</p>
- <textarea class="email_field_textarea settings-textarea" rows="8" maxlength="2000"></textarea>
+ <textarea class="email_field_textarea modal-textarea" rows="8" maxlength="2000"></textarea>
</div>
</div>
diff --git a/web/templates/edit_saved_snippet_modal.hbs b/web/templates/edit_saved_snippet_modal.hbs
index 1fbeaeaf190..f1ba941c7ed 100644
--- a/web/templates/edit_saved_snippet_modal.hbs
+++ b/web/templates/edit_saved_snippet_modal.hbs
@@ -3,7 +3,7 @@
<label for="title" class="modal-field-label">{{t "Title" }}</label>
<input id="edit-saved-snippet-title" type="text" name="title" class="modal_text_input saved-snippet-title" value="{{title}}" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
<div>{{t "Content" }}</div>
- <textarea class="settings-textarea saved-snippet-content" rows="4">
+ <textarea class="modal-textarea saved-snippet-content" rows="4">
{{~content~}}
</textarea>
</form>
diff --git a/web/templates/invite_user_modal.hbs b/web/templates/invite_user_modal.hbs
index df1606896d1..1f28ed536ec 100644
--- a/web/templates/invite_user_modal.hbs
+++ b/web/templates/invite_user_modal.hbs
@@ -119,7 +119,7 @@
{{/if}}
<div id="invite_welcome_message_custom_text_container">
<label for="invite_welcome_custom_message_text" class="modal-field-label">{{t "Message text" }}</label>
- <textarea id="invite_welcome_custom_message_text" name="invite_welcome_message_custom_text" class="settings-textarea" maxlength="8000" rows="3">
+ <textarea id="invite_welcome_custom_message_text" name="invite_welcome_message_custom_text" class="modal-textarea" maxlength="8000" rows="3">
{{~default_welcome_message_custom_text~}}
</textarea>
</div>
diff --git a/web/templates/report_message_modal.hbs b/web/templates/report_message_modal.hbs
index c8566178884..b908d6b8d0d 100644
--- a/web/templates/report_message_modal.hbs
+++ b/web/templates/report_message_modal.hbs
@@ -12,6 +12,6 @@
<label for="message-report-description" class="modal-field-label">
{{t "Can you provide more details?" }}
</label>
- <textarea id="message-report-description" class="modal_text_input" rows="4" maxlength=1000></textarea>
+ <textarea id="message-report-description" class="modal-textarea" rows="4" maxlength=1000></textarea>
</div>
</form>
diff --git a/web/templates/settings/custom_user_profile_field.hbs b/web/templates/settings/custom_user_profile_field.hbs
index 961ad37e52e..2a96eb924c0 100644
--- a/web/templates/settings/custom_user_profile_field.hbs
+++ b/web/templates/settings/custom_user_profile_field.hbs
@@ -7,7 +7,7 @@
<div class="settings-profile-user-field-hint">{{ field.hint }}</div>
<div class="settings-profile-user-field {{#if is_empty_required_field}}empty-required-field{{/if}} {{#unless editable_by_user}}not-editable-by-user-input-wrapper{{/unless}}{{#if (and is_date_field editable_by_user)}}editable-date-field{{/if}}">
{{#if is_long_text_field}}
- <textarea id="id_custom_profile_field_input_{{ field.id }}" maxlength="500" class="custom_user_field_value settings-textarea" name="{{ field.id }}" {{#unless editable_by_user}}disabled{{/unless}}>{{ field_value.value }}</textarea>
+ <textarea id="id_custom_profile_field_input_{{ field.id }}" maxlength="500" class="custom_user_field_value {{#if for_manage_user_modal}}modal-textarea{{else}}settings-textarea{{/if}}" name="{{ field.id }}" {{#unless editable_by_user}}disabled{{/unless}}>{{ field_value.value }}</textarea>
{{else if is_select_field}}
<select id="id_custom_profile_field_input_{{ field.id }}" class="custom_user_field_value {{#if for_manage_user_modal}}modal_select{{else}}settings_select{{/if}} bootstrap-focus-style" name="{{ field.id }}" {{#unless editable_by_user}}disabled{{/unless}}>
<option value=""></option>
diff --git a/web/templates/stream_settings/change_stream_info_modal.hbs b/web/templates/stream_settings/change_stream_info_modal.hbs
index bc29a342c3f..ed617cef222 100644
--- a/web/templates/stream_settings/change_stream_info_modal.hbs
+++ b/web/templates/stream_settings/change_stream_info_modal.hbs
@@ -10,5 +10,5 @@
{{t 'Description' }}
{{> ../help_link_widget link="/help/change-the-channel-description" }}
</label>
- <textarea id="change_stream_description" class="settings-textarea" name="stream_description" maxlength="{{ max_stream_description_length }}">{{ stream_description }}</textarea>
+ <textarea id="change_stream_description" class="modal-textarea" name="stream_description" maxlength="{{ max_stream_description_length }}">{{ stream_description }}</textarea>
</div>
diff --git a/web/templates/stream_settings/create_channel_folder_modal.hbs b/web/templates/stream_settings/create_channel_folder_modal.hbs
index 21dd54e3151..2cd6de5eaaa 100644
--- a/web/templates/stream_settings/create_channel_folder_modal.hbs
+++ b/web/templates/stream_settings/create_channel_folder_modal.hbs
@@ -8,5 +8,5 @@
<label for="new_channel_folder_description" class="modal-field-label">
{{t 'Description' }}
</label>
- <textarea id="new_channel_folder_description" class="settings-textarea" name="channel_folder_description" maxlength="{{ max_channel_folder_description_length }}"></textarea>
+ <textarea id="new_channel_folder_description" class="modal-textarea" name="channel_folder_description" maxlength="{{ max_channel_folder_description_length }}"></textarea>
</div>
diff --git a/web/templates/stream_settings/edit_channel_folder_modal.hbs b/web/templates/stream_settings/edit_channel_folder_modal.hbs
index c83bcd21287..d68aeeeda5b 100644
--- a/web/templates/stream_settings/edit_channel_folder_modal.hbs
+++ b/web/templates/stream_settings/edit_channel_folder_modal.hbs
@@ -8,5 +8,5 @@
<label for="edit_channel_folder_description" class="modal-field-label">
{{t 'Description' }}
</label>
- <textarea id="edit_channel_folder_description" class="settings-textarea" name="channel_folder_description" maxlength="{{ max_channel_folder_description_length }}">{{~description~}}</textarea>
+ <textarea id="edit_channel_folder_description" class="modal-textarea" name="channel_folder_description" maxlength="{{ max_channel_folder_description_length }}">{{~description~}}</textarea>
</div>
diff --git a/web/templates/user_group_settings/change_user_group_info_modal.hbs b/web/templates/user_group_settings/change_user_group_info_modal.hbs
index 99138c41a05..8a0e2fef54a 100644
--- a/web/templates/user_group_settings/change_user_group_info_modal.hbs
+++ b/web/templates/user_group_settings/change_user_group_info_modal.hbs
@@ -10,6 +10,6 @@
<label for="change_user_group_description" class="modal-field-label">
{{t 'User group description' }}
</label>
- <textarea id="change_user_group_description" class="settings-textarea" name="user_group_description">{{ group_description }}</textarea>
+ <textarea id="change_user_group_description" class="modal-textarea" name="user_group_description">{{ group_description }}</textarea>
</div>
{{/if}}