Commit Graph

2200 Commits

Author SHA1 Message Date
m-e-l-u-h-a-n 5de115a964 streams: Use consistent settings HTML structure in stream types modal.
We had our input elements for stream settings inside li tags
and their alignment was managed using CSS. We move away from
this HTML structure to have inputs and labels inside divs for
two reasons. First is that if we want to later refactor the HTML
to have some different design, then having them inside `ul`
requires complex changes to CSS and eventually we would have
to move away from using `li`s for the part that is changed to
have a different design. Second `li`s are generally not used
to organize input elements.

Above is an explanation of why this change is a preparatory
commit for shifting to have a tabbed design in the stream edit page.

So following changes are done to have a more consistent
HTML structure in stream types modal:

* Added modal-body and removed the non-standard
usage of the unordered list for settings header and inputs.

* Updated relevant CSS rules to have the same design during refactor.

Co-authored-by: Pragati Agrawal <pragati22066@gmail.com>
2021-06-23 17:45:02 -07:00
Anders Kaseorg cbec20cfdf message_body: Fix -3px alignment kludge using whitespace control.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-23 09:10:50 -07:00
m-e-l-u-h-a-n e10a315efd temaplate: Separate stream and user group tabs in user profile modal.
We had stream and group tab inside a common div with class
`subscription-group-list` due to this adding any info
elements like alert boxes that were specific to one of them
became difficult. To fix this we keep them in their own
`.tabcontent` div. This change also makes the handling of
display of different tabs a lot easier and cleans
up unnecessary javascript code that was handling the
display of common parent div of stream and group tab.
2021-06-23 08:08:23 -07:00
m-e-l-u-h-a-n 775b8eb05f template: Correct sequence of stream and group tab.
We show stream tab before user-group tab but in the template
this order was reversed that created confusion while editing
any one of them. So we correct their order in the template
to reflect the order we show in UI.
2021-06-23 08:08:23 -07:00
sahil839 4df22564f4 settings: Use confirm_dialog for deactivating own account modal.
This refactor changes two things - position of the modal, as it
is moved up by some amount because of using confirm_dialog and
also loading spinner of confirm_dialog widget is used.
2021-06-23 08:05:25 -07:00
Anders Kaseorg b4a26bcafd lightbox_overlay: “Pan and Zoom” → “Pan & zoom”.
The ‘t’ helper operates on text strings, not HTML.  The ‘&’ works
fine, and is correctly escaped for output by Handlebars, like any text
string interpolated with ‘{{}}’.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-21 16:38:11 -07:00
aryanshridhar 477a066a4c delete_message: Move and rename the delete_message modal.
Moved the `delete_message` user-confirmation modal to
the `confirm_dialog` folder and renamed the modal to `confirm_delete_message.hbs`
to follow the common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar df556a199a settings_invites: Move and rename the revoke_invite modal.
Moved `revoke_invite` user-confirmation modal to the
`confirm_dialog` folder and renamed the modal to
`confirm_revoke_invite.hbs` to follow the common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar d0c683a8d7 settings_invites: Move and rename the resend_invite modal.
Moved `resend_invite` user-confirmation modal to the
`confirm_dialog` folder and renamed the modal to
to `confirm_resend_invite.hbs` to follow the common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar 83473ba647 settings_emoji: Move and rename the emoji_settings_warning modal.
Moved `emoji_settings_warning` modal to the `confirm_dialog`
folder and renamed the modal to `confirm_emoji_settings_warning.hbs`
to follow the common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar 4549cbe48c settings_users: Move and rename the deactivation_user modal.
Moved `deactivation_user` modal to the `confirm_dialog`
folder within `/static/templates` and renamed the modal to
to `confirm_deactivate_user.hbs` to follow the
common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar c5d65555fa deactivation_stream: Move and rename the deactivation_stream modal.
Moved `deactivation_stream` user-confirmation modal to
the `confirm_dialog` folder and renamed the modal to
`confirm_deactivate_stream.hbs` to follow the common naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar 803a6dd60a deactivate_realm: Move and rename the deactivate_realm modal.
Moved `deactivate_realm` modal to the `confirm_dialog` folder
within `/static/templates` and renamed the modal to
`confirm_deactivate_realm.hbs` to follow the naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar 7fc8d97daa avatar: Move delete_user_avatar_modal to confirm_dialog folder.
Moved `confirm_delete_user_avatar` modal to the `confirm_dialog`
folder.
2021-06-21 10:36:35 -07:00
aryanshridhar 1d5f63564a user_groups: Move confirm_delete_user_modal to confirm_dialog folder.
Moved `confirm_delete_user` modal to the `confirm_dialog`
folder.
2021-06-21 10:36:35 -07:00
aryanshridhar 48a7f95fc8 muting_ui: Move confirm_mute_user modal to confirm_dialog folder.
Moved `confirm_mute_user` modal to `confirm_dialog` folder.
2021-06-21 10:36:35 -07:00
aryanshridhar 3cad4c7837 starred_messages_ui: Move user-confirmation modals to confirm_dialog folder.
Moved `confirm_unstar_all_messages` and `confirm_unstar_all_messages_in_topic`
modals to the `confirm_dialog` folder.
2021-06-21 10:36:35 -07:00
aryanshridhar beab7ea1dc delete_topic: Move and rename the delete_topic modal.
Moved `delete_topic` modal to `confirm_dialog` folder and
renamed the modal to `confirm_delete_topic.hbs`
to follow the confirm_dialog naming conventions.
2021-06-21 10:36:35 -07:00
aryanshridhar 1db2fbcd77 stream_create: Move and rename the subscription_invites_warning modal.
Moved `subscription_invites_warning` modal to `confirm_dialog`
folder and renamed the modal to `confirm_subscription_invites_warning.hbs`
to follow the naming convention.
2021-06-21 10:36:35 -07:00
aryanshridhar db0a69648a subs: Move and rename the unsubscribe_private_stream modal.
Moved `unsubscribe_private_stream` modal to the newly created
`confirm_dialog` folder found within `static/templates`.

Later renamed the modal to `confirm_unsubscribe_private_stream.hbs`
to follow a common naming convention.
2021-06-21 10:36:35 -07:00
Ganesh Pawar 8c65b971c6 stream_creation_form: Replace `everyone` with `public` in stream_privacy_policy.
The passed `stream_privacy_policy_values` object
doesn't contain the `everyone` property.
2021-06-20 17:08:16 -07:00
Aman Agrawal ad59fae407 lightbox_overlay: Fix `&` not being rendered as desired.
The attempt to render `&` doesn't work. So, just replacing it
with `and` to make it always work.
2021-06-20 12:46:30 -04:00
Ganesh Pawar 147cd8a366 message_edit_history: Dynamically load modal rather than statically.
message_history_cancel_btn is shifted down since the modal isn't
present before `show_history` is called.
2021-06-18 18:13:00 -07:00
Ganesh Pawar f453db0df2 about_zulip: Mark strings for translation. 2021-06-18 18:13:00 -07:00
Aman Agrawal 563f8aba1e compose_mobile_button: Use tippyjs for popover.
There are several benefits of using tippyjs here:
* Removes dependency on bootstrap.
* We don't have to manually handle show/hide of popover.
* There cannot be any memory leak since we don't store
  the instance.
2021-06-18 17:13:19 -07:00
aryanshridhar 8cd9fc7a74 popovers: Close user popover when clicked on stream name.
Earlier, when a user clicked on any stream name from the
user_popover, the stream page would open in the background,
but the user popover wouldn't close.

Fixed it by explicitly binding it to a click handler,
which closes the user popover before redirecting to stream
page.
2021-06-18 16:07:45 -07:00
m-e-l-u-h-a-n 4c319268a1 templates: Remove form-inline class from stream setting forms.
It is a class provided by bootstrap and one of its most
important job is to set the display of inputs and labels in
the form in such a way that if there is sufficient
horizontal space then they are shown side by side.

As we override most of the bootstrap classes to organize
content, CSS rules set by it were not applied. So we remove
these safely without having any visual changes. Also, we had
only three instances of this class in the complete template
directory.
2021-06-18 12:24:02 -07:00
Tim Abbott 696236b6fc left sidebar: Implement basic resolve topic option.
Fixes part of #18751.
2021-06-18 09:24:48 -07:00
Gaurav Pandey 8fc3715ea8 settings: Remove language_list_dbl_col from page_params.
The language_list_dbl_col parameter in the page_params
is used by only the web client frontend. The value is
calculated in the backend and then passed as a page_param
which is unnecessary considering that the whole process
is beneficial for the front_end only. Hence move the entire
calculation code to the frontend.

Fixes part of #18673.
2021-06-17 17:02:27 -07:00
Gaurav Pandey 56d85fb833 settings: Remove default_language_name from page_params.
default_language_name was a part of page_params which is actually
redundant considering that we already have language_list and
default_language available to frontend which can be used to
get the default_language_name and hence prevents the backend
from sending an additional parameter.

Fixes part of #18673.
2021-06-17 16:56:21 -07:00
aryanshridhar e1c0273bd1 settings_emoji: Modify warning model text for a better understanding.
Modified and shortened the `emoji_settings_warning` modal message
to make it easily comprehensible for non-technical users.
2021-06-17 15:53:47 -07:00
Tim Abbott 1b91545b37 subs: Document adding user groups to streams. 2021-06-16 16:30:43 -07:00
sahil839 828759d2ba models: Replace allow_community_topic_editing with edit_topic_policy.
This commit replaces the allow_community_topic_editing boolean with
integer field edit_topic_policy and includes both frontend and
backend changes.

We also update settings_ui.disable_sub_settings_onchange to not
change the color of label as we did previously when the setting
was a checkbox. But now as the setting is dropdown we keep the
label as it is and we don't do anything with label when disabling
dropdowns. Also, this function was used only here so we can safely
change this.
2021-06-16 14:59:36 -07:00
Aman Agrawal f26a76a9d8 message_controls: Hide irrelevant icons for spectators. 2021-06-16 10:19:07 -07:00
Aman Agrawal 0a84123f0b recipient_row: Hide edit & mute icons for spectator. 2021-06-16 10:18:27 -07:00
Aman Agrawal 5ffc95f6bb compose: Show login and hide drafts for spectators. 2021-06-16 10:18:22 -07:00
Aman Agrawal c0f23569b8 navbar: Show login button for spectators. 2021-06-16 10:16:04 -07:00
Riken Shah b2ab448b71 gear_menu: Extract the gear menu as a handlebars template.
For this extraction, we need to move some context
parameter (from home_real in `views/home.py`) to extra
page_params parameter (of
build_page_params_for_home_page_load in
`lib/home.py`) so handlebars template can access them.

While moving I confirmed that these parameters are not
used elsewhere if some parameter is used elsewhere
(like `apps_page_url`) then I didn't remove it from the
context list, I just added it to the page_params list.

Fixes: #18795.
2021-06-15 12:17:45 -07:00
Ganesh Pawar 5e4b1e1867 deprecated_feature_notice: Migrate to handlebars. 2021-06-15 11:59:01 -07:00
Ganesh Pawar 1d4b6c1320 about_zulip: Migrate to handlebars.
This results in moving the `zulip_merge_base` parameter to
page_params, so that it's available to JavaScript.

Since this is technically a tiny overlay, it needs to be initialized
before hashchange.js.
2021-06-15 11:55:20 -07:00
Ganesh Pawar c220c01ad2 user_status: Migrate to handlebars.
We also reorganize the click handlers to live in the main UI file for
the element, and depend less on initialization order.
2021-06-15 11:32:33 -07:00
Ganesh Pawar 8744b42beb message_history: Migrate to handlebars. 2021-06-15 11:31:01 -07:00
sahil839 aa5d2199b1 invite: Use handlebar template for invite-user overlay.
Fixes a part of #18794.
2021-06-14 13:46:57 -07:00
Ganesh Pawar f5f5943ee0 lightbox_overlay: Migrate to handlebars. 2021-06-14 13:41:36 -07:00
Tim Abbott 6a7d4d96c5 settings: Fix size of dropdown_list_widget elements.
We remove the small CSS class, which set the font size as something
tiny, and also restructure it with a fixed height and more natural
markup for the reset link.
2021-06-11 16:58:52 -07:00
Tim Abbott 01bfb621ba css: Rename settings forgot password CSS class.
"info" in not a sensible name for a broadly used CSS class.
2021-06-11 15:08:45 -07:00
Tim Abbott 90041ff453 css: Deduplicate CSS for message_control_button elements.
Each copy set the same 3 properties, with the actions menu relying on
the terribly named "info" class for its copy.
2021-06-11 15:08:14 -07:00
Tim Abbott 420500ab25 user_profile_modal: Fix duplicate 'Last active' notice.
This fixes a regression in 16bd6e6b1d
that caused the user profile modal to display "Last active: Last active: ...".

I'm not convinced these are the best visuals, but the whole modal
needs a visual refresh.
2021-06-11 07:59:59 -07:00
m-e-l-u-h-a-n b080417960 popovers: Add tabs for profile, groups and streams in user_info modal.
Fixes: #16233.

Co-authored-by: Abhirup Pal <abhiruppalmethodist@gmail.com>
2021-06-11 07:56:32 -07:00
Ganesh Pawar 19fb6114d7 message_edit: Migrate to using `confirm_dialog`. 2021-06-10 12:23:48 -07:00