We move this function from `user_pill.js` to `pill_typeahead.js`.
The function has also been renamed to `set_up`.
The move was made because there are plans to update the pills
typeahead (i.e. to include user-groups/streams in the results).
Thus this function should not belong in `user_pill.js`.
This commit allows skipping over any disabled tabs
that are in the middle when using the left or right
arrow keys.
We also add `enable_tab` to the `components` API.
".stream-info-title" selector is used to hide both
"#add_new_stream_title" and "#stream_settings_title"
classes. This will be helpful when we add new html
elements to display in the title area..
`clear_edit_panel` can be removed as the next line to
where it is called makes it redundant, we only need
to de-select the stream row, as done in this commit.
Since the subscriptions container contains multiple toggler components,
it is helpful to know that the function's tab key returns all the active
tabs in the page (currently there are 2). Thus `tab` is changed to `tabs`.
Also, which togglers tab data is being used has been made more specific.
After the latest message in a stream is deleted, we should update
the max_message_id in the stream.
Removed false comment in message_util.get_messages_in_topic
this method only takes 2ms for 10,000 messages loaded locally.
Fixes#15992.
If the last message of the topic was deleted, we update the stored
message_id in the topic history so that the topic order in topic_list
is updated correctly.
ES and TypeScript modules are strict by default and don’t need this
directive. ESLint will remind us to add it to new CommonJS files and
remove it from ES and TypeScript modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Commit 114cc1ec25 (#15949) introduced a
subtle bug because sortablejs provides both a CJS module and an ES
module that expose different interfaces to CJS require() under
Webpack. This difference will disappear when we convert
settings_profile_fields to an ES module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We already have single-key shortcuts for all message controls but Zulip
should be usable from the keyboard without having to learn a bunch of
Zulip-specific keyboard shortcuts.
Prior to commit eb4a2b9d4e the center
area of the navbar was based on a structure that appended crumbs or
"tabs" as <li>s, forming a tab_bar and a tab_list.
However, in eb4a2b9d4e we apply a new
style and structure to the navbar which lets go of the convention of
tabs. Hence, we'd like to purge the tab_bar and tab_list labels from
our code base.
We purged tab_list in 1267caf5009118875f47fdafe312880af08024e1.
This commit purges tab_bar, it includes:
- A blanket search and replace of tab_bar with message_view_header.
- Splitting a single line comment in
tab_bar.js / message_view_header.js.
- The renaming of tab_bar.js to message_view_header.js.
- The renaming of tab_bar.hbs to message_view_header.hbs.
- A blanket search and replace of tab_data with
message_view_header_data.
- Replacing the single occurrence of tabbar with message_view_header
(it was within a comment.)
For mysterious reasons, this avoids the following message printed by
webpack on a cold cache after upgrading postcss-nested from 4.2.1 to
4.2.2:
Ignoring local source map at "/srv/zulip/<no source>" as resource is missing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Previously the title for all pages of the user and API documentation was
just "Zulip", which does not only bad for UX but also for accessibility.
We were already extracting the title from the Markdown for the og:title
tag, so we just need to set the <title> tag.
Since our documentation fetches pages with Ajax if you have JavaScript
enabled, we also need to save the titles in the article cache.
Part of #15948.