Commit Graph

19 Commits

Author SHA1 Message Date
Shubham Padia e5fd09aaaa i18n: Use user_notification_settings for tr_tag tests.
Before this, settings_tab.hbs was being used to test the `{{#tr}}`
syntax for tagging strings for translation. That was introduced in
82b5d9304b, when the template in question
was small enough to mock.

There are smaller templates than `user_notification_settings` but since
none of them are used as a partial in another template, we can't use
them for this test. This is because we can't test partial block
handling part of the tr tag in templates.js with those templates. Since
`user_notification_settings` has only 1 partial, it will atleast make it
easier for us to know which arguments to pass to the template; in
comparison to `settings_template` where it was hard to determine which
arguments were supposed to be passed to the template.

I've also renamed the test to not say `tr_tag` since it confused me with
the HTML <tr> tag when trying to read the test.

Fixes https://github.com/zulip/zulip/pull/30824#discussion_r1677204395
2024-07-15 12:35:41 -07:00
Shubham Padia b44fd5365c display_settings: Rename `get_all_preferences`.
We've renamed `get_all_preferences` to
`information_section_checkbox_group`. We've also converted it from a
function into a dictionary since it doesn't contain any page_params
variables anymore. This is a preparatory commit for adding a new
`Information section` as part of a layout change for this page.
2024-07-14 22:15:03 -07:00
Shubham Padia 60fda072e6 settings: Move dense mode setting to the General section. 2024-07-14 22:15:03 -07:00
Sayam Samal dae9b6b9ed popovers: Rename actions_popover.hbs. 2024-05-20 09:10:36 -07:00
Lauryn Menard d7f9f8333e web-stream-settings: Update strings for stream rename channel.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard 8bc183e16e web-i18n-test: Update translation data for stream rename channel.
Updates the page_params.translation_data that's set in this test
for renaming stream to channel.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Anders Kaseorg 1e4427caf5 tests: Fix incorrect uses of .indexOf(…) > 0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-03 15:13:33 -07:00
Karl Stolley 286d44bf33 settings: Add new web information density settings.
Note that these settings are not operative at present, and are only
visible in the settings UI in the development environment.
2024-03-27 12:58:32 -07:00
Anders Kaseorg b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e96ede0ef6 page_params: Split out state data for current user.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Vector73 2e71ec78e3 settings: Add "Automatically follow topics where I'm mentioned" setting.
Fixes: #26795
2023-12-11 23:26:11 -08:00
Aman Agrawal 75826d8409 handlebars: Move popover handlebars to a new popovers folder.
Organize related handlebars in a new folder together.
2023-10-05 08:19:49 -07:00
Aman Agrawal acd584c336 actions_popover: Rename template to remove `_content`. 2023-10-05 08:19:49 -07:00
Prakhar Pratyush 28fb5ea24d settings: Add UI for automatically follow and unmute topics settings.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.

The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.

Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Fixes #25914.
2023-10-04 13:04:29 -07:00
Karl Stolley 386d87635e popovers: Shorten 'Quote or reply' label.
This removes the previous "or forward" text from the message
actions popover, and keeps the documentation in sync with the
new text. Internationalization tests are updated, too.

Fixes #25603.
2023-05-16 12:36:29 -07:00
AcKindle3 02364dd69f web: Use `uri` instead of `url`.
Following the issue #23380 and PR #25038, this commit changes all
occurences of `uri` into `url` in all comments, local variables,
handlebars templates (.hbs) function names and their callers in
all `.js` and `.ts` files.
2023-04-10 10:26:48 -07:00
Anders Kaseorg a1f530fcc0 tests: Pass missing data to Handlebars templates.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
sbansal1999 9e4529c48b docs: Change extensions from .js to .ts for some filenames.
Since we are migrating from JavaScript to TypeScript
some files in the documentation are still with their
old extension. This commit changes those file extensions.
2023-03-12 15:17:53 -07:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00