Commit Graph

12749 Commits

Author SHA1 Message Date
Tim Abbott e7c62c4190 stream_data: Rephrase descriptions of stream permissons.
The previous phrasing used incorrect terminology (E.g. "stream
members", not "stream subscribers", which is really confusing given
that we have a "member" role which is also relevant in this text).
2021-09-14 11:29:32 -07:00
Aman Agrawal 7c8e19758a stream_data: Add web_public as a stream privacy mode.
Show web_public descriptions for web public streams.

(Temporarily limited to development environments, since this feature
is not available yet).
2021-09-14 11:12:47 -07:00
Sahil Batra cc65ed103c settings: Use correct object in notification settings template.
In commit 40f4316, we changed the code to pass user settings
with settings_object variable, but this change was missed
during rebasing.
2021-09-14 10:13:44 -07:00
Jonny Tran 87cd743f99
settings_overlay: Change privacy icon to a lock.
This avoids duplication with the `fa-user` for the user's profile, and is also just
more intuitive for account/security settings.

Fixes #19737.
2021-09-14 10:13:16 -07:00
Rohitt Vashishtha 9299ad7843 styles: Remove incorrect css block for datepicker input.
This block didn't work consistently across .night-mode and
.color-scheme-automatic classes, and the default style for
this field already works for the day and night themes both.
2021-09-13 17:12:49 -07:00
Rohitt Vashishtha ddcea9c64b postcss: Cleanly import flatpickr dark theme.
We add postcss-import for night_mode.css only. This plugin inlines
the imports of external files, instead of letting the file go via
our usual webpack toolchain.

We do this so that we can use the postcss-prefixwrap plugin to scope
the third-party CSS properly and use it inside our night-mode class.

Fixes #10607.

[anders@zulip.com: Replace postcss-wrap with postcss-prefixwrap.]

Co-authored-by: Anders Kaseorg <anders@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 17:12:49 -07:00
Anders Kaseorg d840d80ed4 tsconfig: Enable noImplicitOverride.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 10:10:34 -07:00
Sahil Batra 0c11ced0a0 settings: Refactor settings_display.js to use settings_object variable.
This commit changes the settings_display.js code to reference the
user_setings object using settings_object variable. This will help
to easily use the same code for realm-level defaults where instead
of user_settings realm_user_settings_defaults object will be used.
2021-09-13 08:32:31 -07:00
Sahil Batra 40f4316972 settings: Pass user settings using settings_object variable.
Instead of passing user settings directly as user_settings
variable to the settings templates, we pass them using
settings_object variable.

This change is important so that we can use the exisiting
display_settings and notification_settings template for
realm-level default settings by passing realm-level
settings using settings_source variable.
2021-09-13 08:32:31 -07:00
Sahil Batra afeb4b2113 settings: Add condition for time and default language settings UI.
We would have the UI for default language and time settign only for
user settings for now and not for realm-level settings because we
still need to migrate the backend to support the new model and will
be done in further commits.
2021-09-13 08:32:31 -07:00
Sahil Batra cb9109dccf templates: Add condition for showing stream notification settings.
We need to show the stream-specific notification settings only in
user notification settings and not for realm-level default settings.
This commit is a prep commit and adds a condition to make sure that
stream-specific settings are shown only for user-settings.
2021-09-13 08:32:31 -07:00
Jonny Tran e682152e98 lightbox: Fix alignment of x button in image view menu.
Fixes #19711.
2021-09-13 08:31:11 -07:00
Sahil Batra 6651842dc6 settings: Split email notification settings.
This commit splites email notification settings in two
parts - one with heading "Email message notifications"
containing batchning period, message-content and
organization-name settings and the other with heading
"Other emails" containing login, digest and marketing
emails settings.

Fixes #19717.
2021-09-12 16:43:55 -07:00
Sahil Batra 60112405ba settings: Restructure 'Personal settings > Notifications' section.
We remove the 'Other notification settings' heading and increase the
font size of 'Desktop message notifications' and 'Mobile message
notifications' headings as these are now on the same level with
'Notification triggers' heading.

We also add status elements to show saving indicator along the mobile,
desktop and email headings which was previously shown with the
"Other notification settings" heading.
2021-09-12 16:43:55 -07:00
Sahil Batra 14e383ad7a settings: Rename headings in notification settings UI.
This commit renames 'desktop' and 'mobile' headings in
notification settings UI to 'desktop message notifications'
and 'mobile message notifications' respectively.
2021-09-12 16:43:55 -07:00
Riken Shah fbf5c41a56 buddy_list: Show still image for animated emojis.
This commit changes the behavior of how we show
animated emojis in the buddy list. We now show still
image of animated emoji and when hovered show the
animated emoji.

Fixes #19521
2021-09-12 16:24:29 -07:00
Eeshan Garg 9c501f3efc navbar_alerts: Add alerts for demo org deadlines.
This commit displays a banner at the top for demo orgs letting the
user know that the org will be automatically deleted in the
specified number of days. The alerts are prioritized as follows:

- If there are <=7 days left till deletion, the alert is prioritized
  above desktop notification queries and is colored red.
- If there are more then 7 days left till deletion, the alert is
  prioritized below desktop notification queries.

This is a part of #19523.
2021-09-10 16:31:54 -07:00
Sahil Batra 270a082ecb settings: Increase width of message edit and delete limit setting.
This commit increases the width of message edit and delete limit
dropdowns to 325px to make them consistent with most of the other
settings in the page and also such that there is enough space
for all options in German translation.
2021-09-10 14:29:32 -07:00
Sahil Batra 3a036d7532 settings: Fix width of edit_topic_policy dropdown.
We increase the width of edit_topic_policy dropdown
such that there is enough space for all the options
in German translation.
2021-09-10 14:29:32 -07:00
Sahil Batra 1b5b7b8c2b settings: Specify moderators in dropdown options.
We change the label of various organization settings
to specify moderators.

Labels for 'admins only', 'admins and moderators'
and 'nobody' are still same.

The updated labels are -
- 'Admins, moderators and full members'
- 'Admins, moderators and members'
- 'Admins, moderators, members and guests'

These options will be replaced by user groups in
future but this is an intermediate fix.

Fixes #19562.
2021-09-10 14:29:32 -07:00
Abhijeet Prasad Bodas e023c13cdc email notifications: Frontend work for custom batching periods.
This utilizes the API added in 5db4fe8652.

We still need /help/ documentation updates for this feature.

Fixes #15280.
2021-09-10 14:28:33 -07:00
Aman Agrawal a65af97692 recent_topics: Use `plural` syntax to conditionally display text.
We can use this format to display text in plural form or not based
on a number. This helps translators easily translate text and
users get a better formatted text.
2021-09-08 17:12:32 -07:00
Aman Agrawal cf5a154413 recent_topics: Handle no rows case on `r` keypress.
When there are no rows for user to reply on `r` keypress,
we open compose box with everything empty.
2021-09-08 17:12:32 -07:00
Anders Kaseorg 1376feda93 docs: Add missing space in “emoji set”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 15:31:28 -07:00
Anders Kaseorg 85fec56697 docs: Update links for zulip-mobile branch rename.
GitHub redirects these, but we should use the canonical URLs.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 15:30:37 -07:00
sahil839 d74f6a5de6 drafts: Rename stream to stream_name in formatted draft object.
We are renaming stream to stream_name in formatted draft object
just to be more explicit and be clear that we are storing that
stream name in this variable.
2021-09-08 15:18:11 -07:00
sahil839 238ba1c36f drafts: Save stream_id along with stream names for drafts.
This commit changes snapshot_message to store stream_id for
drafts along with stream names. The stream_id field is
undefined if draft is for empty or invalid stream name.

After this change:
  - If draft has a valid stream_id stored and it maps to
    a stream, then we display the stream name from the
    obtained stream object.

  - If draft.stream_id is undefined or doesn't map to a stream,
    then we display the name stored in draft.stream, which can
    be invalid (no stream of this name existed ever), can be
    empty and can also be name of a deactivated stream.

This change helps us to show correct stream-name for drafts
in case of renaming a stream.

Fixes #15155.
2021-09-08 15:18:10 -07:00
Mateusz Mandera 10d356d2de docs: Add instructions for AzureAD SAML on Zulip Cloud. 2021-09-08 13:05:54 -07:00
Anders Kaseorg a4dbc1edd4 docs: Format Markdown with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 12:06:24 -07:00
Anders Kaseorg 35c1c8d41b docs: Apply sentence single-spacing from Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 12:06:24 -07:00
Anders Kaseorg 915884bff7 docs: Apply bullet style changes from Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 12:06:24 -07:00
Palash Raghuwanshi c16d041479 stream settings: Make right panel title larger.
Also remove 'Settings for' from the start of the title.

Fixes #19524.
2021-09-07 17:01:54 -07:00
Anders Kaseorg 3845ac2b56 compose_ui: Fix ESLint no-case-declaration error.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-07 15:43:38 -07:00
Aman Agrawal 1347ee98ee compose: Extract function to format text in compose_ui.
Along with the extraction, we do some simplifications of inserting
text in compose too. This same function can now be used in
compose formatting popover too.

We use "text-field-edit", which has good cross-browser `undo` /
`redo` support, to do the text replace for us instead of writing
that logic ourselves.
2021-09-07 14:57:17 -07:00
Sahil Batra b8a1b13166 message_edit: Fix bug when multiple message edit forms are opened.
There is a bug when multiple message edit forms are opened at the
same time where undefined value of stream_id is sent to the server.
This happens because a global variable stream_widget is used to get
the id of stream selected in dropdown and value of stream_widget
variable keeps on changing when we open multiple message edit forms.
Thus, stream_widget can have the dropdown widget of already closed
edit form resulting in undefined value of stream id.

This commit changes the save_message_row_edit function to access
the dropdown element directly using message id instead of using
stream_widget.value() and thus we always use the correct dropdown
element to get the stream id.

We also move the stream_widget variable to be inside edit_message
function instead of being global variable for the module.

Fixes #19663.
2021-09-07 14:50:04 -07:00
Signior-X 459ce92109 compose: Make the route of message sending through drafts.
Before this commit, the message or any draft is deleted as soon
as the compose box is closed. So, it removes that by removing
delete_active_drafts and instead this commit will add the deletion
process of drafts in reify_message_id that is called when a
message is successfully sent and received.

Now, see there are two types of messages, one that are locally
echoed and the second ones are that aren't locally echoed but
sent directly to server. This commit only saves the message in
draft if it is locally echoed as they are the only messages
that show message failed in message list. The non locally echoed
ones aren't remove from the compose box until they are
successfully sent. Now as the draft-id is stored in the message
data for locally echoed messages, as they are echoed from the
server, they are deleted using that draft-id.

This also adds node tests for echo reify_message_id for testing
this feature that this commit is adding.

Fixes #17697
2021-09-07 14:36:05 -07:00
Anders Kaseorg 87e2166054 apps: Remove buggy SPA tumor from apps page.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-07 12:08:26 -07:00
Aman Agrawal fd77ebcc2a recent_topics: Set focus to filter button after click.
Since, the filter button is replaced with a different button
after click, the `current_focus_elem` points at incorrect
element. `revive_current_focus` follows a good
method to locate the filter button, hence
we use it to correct the element `current_focus_elem` points at.
2021-09-07 09:52:08 -07:00
Sahil Batra 89e5c7b9f9 settings: Fix live update of notification sound dropdown.
This commit fixes the live update of notification sound
setting dropdown. We already update the notification sound
source to play the correct sound after changing the setting.
2021-09-07 09:50:39 -07:00
Aman Agrawal 31de905955 login_to_access: Rename module to `spectators`.
This allows us to call spectators.login_to_access which
is more clear for what it does.
2021-09-07 09:47:28 -07:00
Aman Agrawal 354dfb02e5 stream_select_dropdown: Correct alignment of stream select element.
We left align the text to match with the design used across the
app for similar stream select elements.
2021-09-07 09:44:35 -07:00
Aman Agrawal d9b1981335 message_edit_form: Change class name of stream select element.
We set the class name to be same as the one used in move topic
to stream popover so that a single class can be used to control
the look of both dropdowns.
2021-09-07 09:43:31 -07:00
nooblag 18ca7bf7f9 rendered_markdown: Rework CSS for markdown headings.
Extracted by tabbott from the original pull request, with additional
changes to document the surprising margin-top in our current
implementation and avoid a bit of unnecessary CSS.
2021-09-06 16:37:10 -07:00
Eeshan Garg 64deaaceb7 help_docs: Fix improper indentation for ordered lists.
On our Markdown help docs, ordered lists that aren't encapsulated
in tabs don't have custom CSS that tells them how to display
themselves with proper indentation. An example of a doc that has
this issue is /help/saml-authentication. This commit adds some CSS
that targets such ordered lists.
2021-09-06 16:22:01 -07:00
Aman Agrawal 5151e916ea click_handlers: Don't hide compose when clicking on tippy popovers. 2021-09-06 09:35:58 -07:00
Aman Agrawal 34a37f55d6 spectators: Rename is_web_public_compatible functions. 2021-09-06 09:00:16 -07:00
Aman Agrawal f5e4dca8f2 login_to_access_modal: Restore current hash after login. 2021-09-06 09:00:16 -07:00
Aman Agrawal a67cff4964 reactions: Don't process clicks from spectators.
The reaction count goes up locally if we don't have this check.
This is misleading for spectators.
2021-09-06 09:00:16 -07:00
Aman Agrawal 9bd2701f5b message_fetch: Don't re-fetch recent msgs for spectator.
Since a spectator cannot have unread counts, we always
fetch the most recent messages. Hence, there is no need to
separately fetch this in this case.
2021-09-06 09:00:16 -07:00
Aman Agrawal fcfc81cdf3 compose: Prompt user to login when trying to compose. 2021-09-06 09:00:16 -07:00