Commit Graph

2132 Commits

Author SHA1 Message Date
Anders Kaseorg 835ee69c80 docs: Fix grammar errors found by mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 13:24:09 -07:00
Anders Kaseorg 4cb2eded68 typos: Fix typos caught by typos.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 11:55:16 -07:00
Anders Kaseorg 7b4a74cc4d codespell: Fix typos caught by codespell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 11:55:15 -07:00
Karl Stolley eea59e2edc compose_banners: Hide upload progress banner on error. 2023-10-09 11:55:01 -07:00
Karl Stolley d887fb57e7 compose_banners: Better align action and cancel buttons.
This uses the banner message's line-height to set a
max-height on the action and cancel buttons to maintain
a consistent vertical spacing.

Additional uses of flexbox here:

1. help the button to remain shorter when it's adjacent a
   single-line banner message, and
2. center the closing X icon relative to the current size
   of the action button, when one is present
2023-10-09 11:55:01 -07:00
Karl Stolley fe8fc98912 compose_banners: Structure innner <p> elements with .banner_message class.
This also styles those inner .banner_message elements to lose
margin inherited from Bootstrap. (This is now also applied to
the upload-message banner.)

It's better to achieve that with a class selector; using a `p`
element selector would mean that such a style would be evaluated
for all `<p>` elements in the DOM. Which is of course a whole lot,
thanks to Markdown alone.

Fixes: #26922
2023-10-09 11:55:01 -07:00
Karl Stolley 1581c6f847 compose_banners: Add .banner_content to elements that need it. 2023-10-09 11:55:01 -07:00
Karl Stolley 3fdf85872e compose_banners: Remove unnecessary upload-message styles. 2023-10-09 11:55:01 -07:00
Tim Abbott 756b465b47 bootstrap: Remove last vestiges of bootstrap-tooltip library.
Everything but this sliver of CSS has been deleted previously as part
of our migration off Bootstrap.
2023-10-09 11:39:12 -07:00
Aman Agrawal c69fe4b6a0 popover: Remove `.popover` class.
Since we are not using bootstrap popover, we don't have popovers
with that class.
2023-10-09 11:39:12 -07:00
Aman Agrawal 8430674aee popovers: Remove unused popover-content class.
Fixes #26821
2023-10-09 11:39:12 -07:00
Aman Agrawal a04117b6d3 user_group_info_popover: Remove bootstrap popover classes.
Added a `group-info-content` inplace of them and added the required
CSS.
2023-10-09 11:39:12 -07:00
Aman Agrawal 04c4b6e8b8 giphy: Move `popover-content` styles to `giphy-scrolling-container`. 2023-10-09 11:39:12 -07:00
Aman Agrawal 094ac010fb user_card_popover: Remove popover content class.
Added CSS styles that were removed due to this back. No visual
changes.
2023-10-09 11:39:12 -07:00
Aman Agrawal ce656da8d7 emoji_popover: Remove popover-content div.
`popover-content` class had no effect on emoji popover since
it was resetting `padding: 0` and background color was
already applied by tippy theme.

In short, removing `popover-content` had no visual changes.
2023-10-09 11:39:12 -07:00
Aman Agrawal 5cd2b0ed86 giphy: Remove old comment.
Destroying popover_instance is now part of how tippy popovers work.
2023-10-09 11:39:12 -07:00
Aman Agrawal 0976b9006e popover-title: Remove class.
Remove bootstrap-tooltip class `popover-title` from code.

It was only used in user_card_popover for showing user avatar,
so cleaned up properties that were duplicated or not required.
2023-10-09 11:39:12 -07:00
Anders Kaseorg b9fe1947f8 navigate: Move scroll_to_selected to message_viewport.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 11:32:16 -07:00
Anders Kaseorg 18bdfde9e7 recent_view_ui: Cut import of unread_ops.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 11:32:16 -07:00
Anders Kaseorg 95785739ac navbar_alerts: Move resize_app to resize.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 11:32:16 -07:00
Sahil Batra 7ffdeecd86 styles: Remove CSS for ".modal-header".
We do not use "modal-header" on any elements now, so
we can remove the redundant CSS rules defined for it.
2023-10-09 11:25:26 -07:00
Sahil Batra 747b62d050 bootstrap: Remove code for bootstrap modals.
We use micromodal library for all the modals now and thus
we no longer require the bootstrap modal code.
2023-10-09 11:25:26 -07:00
Sahil Batra 37d12250ed modal: Re-add required bootstrap CSS for ".modal-body".
This commit adds the required bootstrap CSS rules for
".modal-body" elements to modal.css so that we can remove
them from bootstrap.css.
2023-10-09 11:25:26 -07:00
Sahil Batra 5e263fc4ed subscriptions: Re-add bootstrap CSS for modal-footer elements.
We use "modal-footer" class in stream and user group creation form
and this commit adds bootstrap CSS rules for it to subscriptions.css
so that we can remove the CSS from bootstrap.css.
2023-10-09 11:25:26 -07:00
Prakhar Pratyush 5b7014e7d6 server_history: Prevent concurrent requests for the same stream_id.
This commit updates the 'get_server_history' function to return
early if a request is already in progress for a given stream_id,
thus preventing concurrent requests for a single stream_id.

We maintain a set 'request_pending_stream_ids', which contains all
the stream IDs for whom requests are in progress.

Using this set, we return early.

Fixes #26915.
2023-10-09 11:17:03 -07:00
N-Shar-ma 0cdb54cf65 compose: Ensure cursor is scrolled into view after content is inserted.
This fixes the bug where on pressing enter after the last line in a
textarea, the cursor would go to the new line but the textarea would
not scroll it into view unless more was typed. This was observed on
chromium browsers.

A new function `insert_and_scroll_into_view` is added to `compose_ui.js`
which blurs and refocuses the textarea after inserting the content, then
autosizes the textarea.
2023-10-09 11:13:53 -07:00
Aman Agrawal acdae9eae2 reload: Don't reload on 403 error for spectators.
Fixes #26280
2023-10-09 11:00:33 -07:00
Aman Agrawal 8299506e7a reload: Handle early attempts at reload when loading the app.
Trying to preserve state when app modules like message_lists
haven't been init results in errors.
2023-10-09 11:00:33 -07:00
Anders Kaseorg 5327bcc5ac user_group_settings_ui: Merge into user_group_edit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 10:58:50 -07:00
Anders Kaseorg 63b4e74cea views_util: Cut import of narrow.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-09 10:54:00 -07:00
Aman Agrawal e8ced3e74a hello: Fix google analytics not working.
Since GA was only imported in portico bundle which we don't use
in hello page due to bootstrap, GA was not loaded.
2023-10-08 17:30:02 -07:00
Anders Kaseorg 70748181da recent_view_ui: Cut import of user_card_popover.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:45:13 -07:00
Anders Kaseorg 27991bd5b0 topic_zoom: Merge into stream_list.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:43:55 -07:00
Anders Kaseorg a43ea3efaa pm_list: Cut import of topic_zoom.
topic_zoom.is_zoomed_in() can’t be true in pm_list.zoom_in, because
“more conversations” would not be visible in that state.  And it can’t
be true when pm_list.handle_narrow_activated calls pm_list.expand,
because “more topics” would not be visible in an all-DM view.  So the
only non-inert call is via click_handlers; move it there.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:43:55 -07:00
Anders Kaseorg 564e91f3a8 narrow: Cut import of hashchange.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 19:41:59 -07:00
evykassirer 4adfd57378 message_fetch: Rename batch size constants to specify narrow views.
This is in preparation for introducing a batch size constant for
the recent view.
2023-10-06 17:30:33 -07:00
Anders Kaseorg ba1895cb1c notifications: Rename to desktop_notifications.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg fcaf1fe7d5 notifications: Split out audible_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg 6ef08873d8 notifications: Split out compose_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg db20fd12e0 notifications: Split out message_notifications module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 16:22:40 -07:00
Anders Kaseorg e48771993b widgetize: Move widget registration to new widgets module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Anders Kaseorg 0c991d813f sent_messages: Lift event loop restarting to transmit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Anders Kaseorg 339b1351f8 echo: Pass transmit.send_message as a callback.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 13:17:51 -07:00
Aman Agrawal b9dd4a14c9 hello: Write better variable names. 2023-10-06 12:51:57 -07:00
Aman Agrawal cbb09f4ee6 hello: Fix client logos not changing on hello page.
Since `zulip.com` doesn't has `/hello` in URL, the JS code
for hello page events was not running. We extract it to a new
file and just always run it.
2023-10-06 12:51:57 -07:00
Prakhar Pratyush b274169ccc util: Fix the 'find_wildcard_mentions' function.
The function considers @**all**, @**everyone**, @**stream**,
and @**topic** as wildcard mentions.

Earlier, the function didn't have a check to match @**topic**
in the message_content.
2023-10-06 11:38:37 -07:00
Aman Agrawal 1a867a43a7 left_sidebar_inbox_popover: Move to new popovers folder. 2023-10-06 11:24:40 -07:00
Aman Agrawal 115de0e847 inbox_ui: Fix unable to insert new stream.
There were 2 issues:
* Wrong format for creating new Map object used.
* Use of `topic_dict` instead of `topics_dict`, which resulted
in `stream_key` being present in `topics_dict` even after stream
has been marked as read. This made inbox believe that the
stream was already rendered even though it was not.
2023-10-06 10:50:34 -07:00
Anders Kaseorg 9dc1e8ed17 sent_messages: Finish .received → .saw_event rename.
Commit 3cc2adcd3b (#25423) missed this
in the rename, resulting in extra creation of no-op timers.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 10:49:42 -07:00
N-Shar-ma 4e9c1293e2 compose: Only save as draft when the compose state is about to change.
Up until now, we unconditionally saved any message content as a draft
whenever the composebox was `start`ed. This led to a lot of unnecessary
saving of drafts even when the composebox stayed undisturbed.

To fix this, now we only save the draft when the compose state is about
to be overidden, which is by either changing the recipient narrow or by
restoring another draft.

Fixes: #26976.
2023-10-06 09:22:41 -07:00