* `.container` class is only used in `/activity/support` and
`/activity/remote/support` pages. It is also used in emails but
it has its own CSS.
* Since the CSS applied is localized and looks good, we just
move the CSS relevant to us to `activity.css` which is used
by both of these pages.
* Searched `"container"`, ` container `, `"container ` and
` container"` to look for the uses of this class.
String.prototype.replace and String.prototype.replaceAll interpret
certain sequences such as $$ within a string provided as the
replacement argument. Avoid this interpretation by providing a
function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The `advanceKeyCodes` option was introduced in #10092.
It included a buggy check for `$.inArray` that returned
a falsey value only when the keycode was the first
element of `advanceKeyCodes`.
Because the only instance of `advanceKeyCodes` right now
is for search and contains only one element, this change
is functionally equivalent.
I confirmed that updater() only returns a string or undefined.
composebox_typeahead.js
- compsebox calls `content_typeahead_selected` which returns the composebox
text content
- stream and PM: implicitly returns undefined
pill_typeahead.js
- implicitly returns undefined
search.js
- narrow_or_search_for_term — returns `get_search_bar_text` or empty string
custom_profile_fields.js, settings_playground.js
- no updater function
If no updater function is provided, then updater returns the
value passed to it, which is
`this.$menu.find(".active").data("typeahead-value")`, which is a string.
All existing typeaheads have values for highlighter that are one
of the following:
* render_search_list_item (a handlebars render function)
* render_typeahead_item which calls a handlebars render function
* another function in typeahead_helper which eventually calls
typeahead_helper
All current definitions of header(), which is renamed to
header_text() in this commit:
composebox_typeahead.js
- `get_header_html` uses `_.escape`
- `render_topic_typeahead_hint` — is a handlebars function
- third typeahead doesn’t have a header function
custom_profile_fields.js, pill_typeahead.js, search.js,
and settings_playground.js have typeaheads, but none of them
have header functions.
This particular codepath is never reached right now,
because set_value is only called when `naturalSearch`
is `true`, and the only instance of `naturalSearch`
isn't for a `contenteditable` field.
But we don't need to use `html()` here because it's
displaying a plain string typeahead option.
Before ES2016, `indexOf` and jQuery's `inArray`
were used more often. They return -1 for a missing
element, and 0 is the only integer that’s falsy, so
-1 is the only integer whose bitwise complement is
falsy. Using bitwise not (~) like this is no longer
common practice and is a lot more confusing to read.
Now that we have `includes` we can use that instead.
Happily, every last CSS property in these styles is already
described for the places <pre> appears in the Zulip UI:
1. In rendered message markdown
2. In the compose preview
3. In the information overlay (Message formatting)
The `line-height` value is set to `inherit` in zulip.css, rendering
this line moot. `inherit` will always force list items to take
their line height from the nearest ancestor that sets one.
* `font-size: 100%` is unnecessary, as `font-size: 16px` is set on
the `body` selector.
* `text-size-adjust` is unnecessary, as supporting browsers appear
to use `100%` as a default value anyway.