Commit Graph

2526 Commits

Author SHA1 Message Date
Priyam Seth 17f74a3f57 compose: Show warning while composing to a resolved topic.
This commit creates the function warn_if_topic_resolved that checks if
the topic to which the user is composing is resolved or not. First it
checks if the stream exists and then if the topic name starts with the
RESOLVED_TOPIC_PREFIX. If the conditions are true, a warning banner is
shown to the user.

It also shows to the user a button to unresolve the topic, if he has
the permission to do so.

Fixes #20584.
2022-02-01 17:50:17 -08:00
Tim Abbott 4989a300f8 message_edit: Fix internationalization of edited notices.
The previous internationalization approach didn't support languages
with a different word order than English.

We also switch to using "moved" to explain topic/stream moves,
consistent with how the message feed explains it.
2022-02-01 14:09:19 -08:00
somesh202 2b10f958bb message-edit-history: Show the edited stream in the edit history.
Previously, message edit history never displayed stream moves.

Fixes #20452.
2022-02-01 12:22:46 -08:00
jai2201 38003408cb settings: Make authentication settings more like other panels.
This may still needs further work to replace the table with a more
standard implementation.

Fixes part of #21001.
2022-02-01 11:28:27 -08:00
Sahil Batra 8565aad3fa stream_settings: Fix color of icon of the title in right column.
This commit fixes two things -

- We use the exact same color that is used for stream name in
day mode.

- Previously, we were passing black color explicitly to the
stream_privacy_icon template. This commit changes it to pass
different color in the night mode which is the same used for
stream name in night mode.
2022-02-01 11:25:01 -08:00
Aman Agrawal b4075b78eb message_feed_errors: Don't show search public stream to spectators.
Fixes #20299.
2022-01-31 17:12:03 -08:00
Aman Agrawal f00db27b64 message_feed_errors: Convert to handlebars. 2022-01-31 17:10:05 -08:00
Aman Agrawal 8f2e973ab2 message_list_view: Cleanup unused bookend code.
`bookend_top` is already defined firmly for `group` in
`add_subscription_marker`, so no need to redefine it.

`bookend_bottom` is no longer used anywhere in the codebase. Not
sure what the history is here.
2022-01-31 16:50:54 -08:00
Aman Agrawal 93a03dcf3a message_list_view: Mark trailing bookend using a new variable.
We need to mark trailing bookends differently to identify them
in DOM easily. This fixes a bookend replication bug which can
happen sometimes when rendering.
2022-01-31 16:42:46 -08:00
Tim Abbott 6065d66d3d bookend: Simplify can_toggle_subscription variable flow. 2022-01-31 16:39:16 -08:00
Aman Agrawal 0ce2ae1782 bookend: Use it to advertise recent topics for spectators.
We show a minimal text "Browse recent topics" at the end of
every narrow. This will help new users to find additional
content on the app.

Fixes #19844
2022-01-31 16:32:09 -08:00
Aman Agrawal 0a614fe985 bookend: Move conditional bookend content inside the template.
We move the stream subscribed/unsubscribed bookend info from
js files to bookend handlebar.

Tweaked by tabbott to override the check-templates indentation logic.
2022-01-31 16:32:09 -08:00
Anders Kaseorg 90e202cd38 docs: Consistently hyphenate “web-public”.
In English, compound adjectives should essentially always be
hyphenated.  This makes them easier to parse, especially for users who
might not recognize that the words “web public” go together as a
phrase.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-28 17:45:45 -08:00
Sahil Batra 12efde8a51 stream-settings: Refactor code to pass sub object to title template.
This commit refactors the code to directly pass sub object to
selected_stream_title template instead of passing name, is_web_public
and invite_only as different parameters.
2022-01-28 11:39:15 -08:00
Aman Agrawal 38e044173d login_to_access: Remove icons for login buttons.
They don't serve the purpose of adding clarity to button.
2022-01-28 08:30:56 -08:00
Sahil Batra 7265a76fc6 stream-settings: Show icon according to in the right column title.
We were showing # for all types of streams in the title at the top
in the right column of stream settings overlay. This commit fixes
it to show globe icon for web-public streams and lock icon for
private streams.
2022-01-26 12:50:05 -08:00
Ganesh Pawar 49e9cf10de user_status: Migrate modal to dialog_widget. 2022-01-21 16:17:25 -08:00
Ganesh Pawar f43d3b9986 change_email: Migrate modal to dialog_widget. 2022-01-21 16:12:34 -08:00
Ganesh Pawar 84ed22d59a api_key_modal: Place the error element at the top of the modal.
This is consistent with other modal behaviour.
2022-01-21 16:12:34 -08:00
Tim Abbott a020d7a80d user_profile: Fix unsubscribing other users from streams.
This fixes a bug introduced with the Micromodal migration in
7a505e3857, where the data-user-id
declaration for this modal was lost.
2022-01-21 15:45:11 -08:00
Anders Kaseorg 3eb2791c3e CVE-2021-3853: Fix HTML escaping in recipient_row.
Commit 44f935695d (#20462) incorrectly
added these extra braces while intending to add whitespace control.
This triple-brace syntax was asking Handlebars to skip escaping the
string.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-18 21:28:21 -08:00
Sahil Batra bb6dbb6383 todo_widget: Tag "Task list" heading for translation. 2022-01-18 14:15:34 -08:00
Ganesh Pawar 21fa68ae7e org edit_bot_modal: Fix styling issues. 2022-01-11 09:15:06 -08:00
Anders Kaseorg 03f073d762 compose: Fix Enter to send switch internationalization.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-07 14:38:10 -08:00
Aman Agrawal 4d7cbc0a63 compose: Move emoji button outside of popover.
Since we more space after moving Help button below, we stop hiding
emoji icon in a popover on small screens.
2022-01-05 16:03:53 -08:00
Aman Agrawal e4b8b9a24e compose: Move `Help` icon beside `Enter send` button. 2022-01-05 16:03:53 -08:00
Aman Agrawal db09639f6c compose: Change UI which toggles `enter_sends` setting.
Use a popover which displays both the options instead of long text.
We only use a small text indicating the current state which user
can click on to trigger the popover.
2022-01-05 16:03:53 -08:00
Sahil Batra b642615e73 settings: Rephrase text in user deactivation modal. 2022-01-04 14:42:19 -08:00
Sahil Batra 2eb1f0195d settings: Show only real email in user deactivation modal.
We show email of the user being deactivated only if real email is
accessible and not the fake email generated using user id.
2022-01-04 14:42:19 -08:00
Steve Howell 507da749b7 stream edit: Tighten up selectors for handlers.
Even though we intend to shortly share lots of code
for editing stream subscribers with the create-stream
UI, we don't want to confuse click handlers and
containers too much.
2021-12-30 11:36:52 -08:00
Archit Hadge 25ccd4a7db settings: Change "N minutes" options to Custom.
We change the various "Up to N minutes" settings option labels to
"Custom", since the N is a little too mathy for some users.

Since the new prompts for the value of N are longer, we need to move
those prompts to the next line. Mainly this means switching from
`dependent-inline-block` to `dependent-block`, but we also need to
move the block out of the containing input-group for the CSS to be
happy.

Substantially rewritten by tabbott to use CSS for positioning and
change the message deleting copy of this issue.

Fixes #20177.
2021-12-09 11:52:27 -08:00
Swati Bhageria 2d766f3e78 message list: Display MOVED for messages with only topic edits.
This avoids the somewhat confusing visuals of showing messages as
EDITED where the content had not been changed, which also obscured
situations where a message had both been edited and moved.

It's possible we could do better with some sort of fancier block-move
visual styling, but it's a bit tricky to do well given that we support
moving multiple messages at once.

Fixes #20451.
2021-12-09 10:50:01 -08:00
Nikhil Maske 091772b534 hotspots: Remove intro_reply hotspot.
Zulip shows two guides on How to reply, first one by
the welcome bot and second one is intro_reply hotspot.
To simply and avoid redundancy, intro_reply hotspot is
removed.

Fixes #20482.
2021-12-07 21:55:59 -08:00
Sahil Batra a1a5a1643f settings: Remove unused show_email parameter.
We show "Email" column heading always in users list and
subscriber list irrespective of the email-address visibility
setting after 46660e5, so we do need to pass show_email
parameter to render_admin_tab and render_stream_settings.
2021-12-07 21:42:23 -08:00
S-Abhishek 186d1a83e9 narrow_banner: Move empty narrow messages to handlebar templates.
Removed existing empty narrow divs from app/home.html and created
a new javascript module to dynamically load empty narrow messages
using handlebar template.

Fixes #18797
2021-12-07 13:38:48 -08:00
Steve Howell 1509e7f355 templates: Always indent "each" blocks. 2021-12-06 14:58:29 -08:00
Steve Howell f5bb43aba2 bug fix: Restore placeholder text for adding members.
In 4792af5682 I reformatted the template in such a way
that the div was no longer empty, and therefore
the :empty pseudoclass was not properly applied to
show the placeholder.
2021-12-04 15:35:24 -08:00
Steve Howell 44f935695d templates: Improve comments for recipient_row.hbs.
We also squash some whitespace in the HTML, although
it's mostly irrelevant since you can't copy/paste
the text.
2021-12-04 15:35:24 -08:00
Sahil Batra 08038ef140 settings: Refactor set_notification_batching_ui function.
This commit refactors the set_notification_batching_ui to
use settings_org.change_element_block_display_property function
for toggling the visibility of custom input.

We add id to the email_notification_batching_period_edit_minutes
element such that we can use change_element_block_display_property
function because it requires id of element as an argument.

This commit also removes the value attribute of the custom
input since its value was set undefined in the template
and then was set in set_notification_batching_ui, so there
is no use of keeping the value attribute in templates.

This is a prep commit for fixing the behavior of this element
in realm-level default settings.
2021-12-03 16:03:02 -08:00
Aman Agrawal ffd9d18577 compose: Enclose hotkeys in `kbd` tag.
We change how `kdb` is displayed in dark-theme for
compose so that they don't take too much user attention
when composing.
2021-12-02 15:11:15 -08:00
Aman Agrawal aaa7150b8a compose: Move overflowing buttons to a popover.
We don't hide popover on click for formatting buttons, emoji picker and time
picker.
Emoji and time picker popovers need a reference to be displayed,
hence we don't hide them.
Not hiding formatting buttons is based on past discussion.

The current instance of compose popover is stored locally
so that we can access it across different modules.

The basic approach for hiding / displaying a button is based on
width and is executed at `sm` breakpoint as per our
`css_variables.js`.
Used handlebars and `hide/show-sm` css class to make this
work. This avoids using too much JS to hide/display elements.
2021-12-02 15:11:15 -08:00
Aman Agrawal 63c3f74056 compose: Rearrange compose bottom to separate out enter sends.
* We move enter sends into its own row separate from compose
control buttons and send button. This makes sure compose control
icons don't wrap on narrow widths.

* Move char limit indicator parallel to enter sends button.

* Left align character exceeded count at bottom.
2021-12-02 15:11:15 -08:00
Aman Agrawal a64f6edc2a compose: Use loading spinner as loading indicator. 2021-12-02 15:11:15 -08:00
Aman Agrawal 25ee6a795e compose: Never hide send button.
`Press Enter to send` used to hide `Send` button, we remove that
behaviour.

We show the current state of `Enter` hotkey action via text below
`Send` button which can toggle behaviour on click.
2021-12-02 15:11:15 -08:00
Sahil Batra fc8db93f36 settings: Disable spectator access setting when server setting is False.
We disable the enable_spectator_access setting when the server level
setting, WEB_PUBLIC_STREAMS_ENABLED setting is set to False.

This commit adds a new argument is_disabled to settings_checkbox which
is used to disable the checkbox and set the color of label accordingly.

This commit also adds a help-link besides the label pointing to
"/help/web-public-streams" which is shown irrespective of the
setting being enabled or disabled.

Fixes #20417.
2021-12-02 14:33:51 -08:00
Sahil Batra 03a91a8b77 settings: Remove render_only parameter from enable_spectator_access checkbox.
The render_only parameter was passed to settings_checkbox partial of
realm_enable_spectator_access to hide the setting if the server-level
setting is set to False, but it was incorrect since we do not pass
page_params dict to the template and this was not working.

Initialy the render_only was set as page_params.development_environment
and then to page_params.server_web_public_streams_enabled in 260851cd0.
Both of these were incorrect since page_params is undefined in this
template.

We have now decided to disable the setting instead of hiding and this
will be done in next commit and this commit removes the render_only
parameter since it is not working anyways.
2021-12-02 14:33:51 -08:00
Sahil Batra eb50641af3 settings: Remove is_nested parameter and disableable class.
The is_nested paramter in settings_checkbox.hbs used to
set disableable class in the div element is not used
anywhere and thus we can remove both the is_nested parameter
and disableable class.

The is_nested paramater was first added in 3e0b420423 and
disableable class was added in 706f422c3.

The use of is_nested parameter was removed in a501abf3a1.
2021-12-02 14:33:51 -08:00
Ganesh Pawar 19c4a63d51 move_topic_modal: Use `dialog_error` to display error.
Fixes #20210
2021-12-02 14:02:27 -08:00
Steve Howell 2f0f27b841 templates: Fix minor whitespace errors.
(we also add validation)
2021-12-02 09:49:10 -08:00
Ketan1502 0a2649d9fe left sidebar: Add titles for remaining global filters.
Fixes part of #20284.
2021-12-01 17:07:55 -08:00