Commit Graph

10 Commits

Author SHA1 Message Date
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
Tim Abbott 53d9797044 stream_data: Rename is_subscribed to is_subscribed_by_name.
Generally the stream_data module aims to do lookup by ID, not name,
wherever possible, so we should represent that in the function names.
2021-11-22 15:44:30 -08:00
akshatdalton 272901326c narrow_banner: Add banner for no resolved topics found search. 2021-07-13 23:36:24 -07:00
Aman Agrawal 0d8a7efa09 compose_closed_ui: Show default label for empty narrows.
The default label for empty narrows depends on whether it's a
stream/topic narrow or a PMs narrow.

We leave some default text in compose.hbs for reply label
because it take some time for the js to display the
correct label.
2021-05-11 23:57:57 -07:00
Anders Kaseorg 2004a85fb1 i18n: Automatically convert remaining JavaScript messages to FormatJS.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 17:41:10 -07:00
Anders Kaseorg 6cf398f157 narrow_banner: Escape preamble message.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 17:41:10 -07:00
Steve Howell 93471ed3e4 refactor: Extract can_toggle_subscription(sub).
We don't want to rely so much on calculated fields,
and the `should_display_subscription_button` name
is a bit misleading in certain contexts.
2021-04-05 09:52:19 -07:00
YashRE42 dc02d4550f narrow_banner: Refactor first_operand conditionals to use switch/case. 2021-04-01 07:38:39 -07:00
YashRE42 f85f0c4b0b narrow_banner: Refactor empty banner is: operands to use switch/case. 2021-04-01 07:38:39 -07:00
Steve Howell c67f82b073 refactor: Extract narrow_banner module.
This is a mostly verbatim extraction.

I re-phrased one line of code to work around a lint
false alarm. (Look for `preamble` in the diff.)

There are about 8 lines missing coverage here, so
the new module might be a good candidate to get
100% line coverage on.

Before this change, you would need to remove 74
edges from our dependency graph to make it
acyclic. Now it's 72.
2021-03-28 15:55:55 -07:00