Commit Graph

8226 Commits

Author SHA1 Message Date
Anders Kaseorg 9368c33098 unread.js: Add setter for suppress_unread_counts.
After migration to an ES6 module, `suppress_unread_counts` would no
longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg e24ec31823 unread.js: Add setter for messages_read_in_narrow.
After migration to an ES6 module, `messages_read_in_narrow` would no
longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg 8472292906 pointer.js: Add setter for suppress_scroll_pointer_update.
After migration to an ES6 module, `suppress_scroll_pointer_update`
would no longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg f9bf414b58 pointer.js: Add setter for server_furthest_read.
After migration to an ES6 module, `server_furthest_read` would no
longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg e559662c8c pointer.js: Add setter for recenter_pointer_on_display.
After migration to an ES6 module, `recenter_pointer_on_display` would
no longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg 055ebe76aa pointer.js: Add setter for furthest_read.
After migration to an ES6 module, `furthest_read` would no longer be
mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg 6e4ae95994 message_viewport.js: Add setter for last_movement_direction.
After migration to an ES6 module, `last_movement_direction` would no
longer be mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg 15192d4417 message_list.js: Add setter for narrowed.
After migration to an ES6 module, `narrowed` would no longer be
mutable from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Anders Kaseorg 190524b6a0 alert_words.js: Add setter for words.
After migration to an ES6 module, `words` would no longer be mutable
from outside the module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-08 21:22:54 -07:00
Vaibhav dfdbc378b0 css: Move `.user_popover .popover-title` rules inside one block. 2019-07-08 20:13:08 -07:00
Vaibhav b205410e27 css: Use SCSS nesting in popovers.scss for `.user_popover`. 2019-07-08 20:13:08 -07:00
Vaibhav 58c0434474 css: Use SCSS nesting in popovers.scss for `.popover-avatar`. 2019-07-08 20:13:08 -07:00
Vaibhav 6ed3792d21 css: Reorder popovers.scss so `.popover-avatar` are in same place. 2019-07-08 20:13:08 -07:00
Vaibhav abadc1fd98 css: Move `.message-info-popover .popover-title` rules inside one block. 2019-07-08 20:13:08 -07:00
Vaibhav 6cedd4ccf5 css: Use SCSS nesting in popovers.scss for `.message-info-popovers`. 2019-07-08 20:13:08 -07:00
Vaibhav e25371310d css: Reorder popovers.scss so `.message-info-popover` are in same place. 2019-07-08 20:13:08 -07:00
Vaibhav eab0c70d1d css: Use SCSS nesting in popovers.scss for styles in media queries. 2019-07-08 20:13:08 -07:00
Vaibhav ac2074afa0 css: Use SCSS nesting in popovers.scss for `ul`. 2019-07-08 20:13:08 -07:00
Vaibhav 9ad6874b93 css: Use SCSS nesting in popovers.scss for `.streams_popover`. 2019-07-08 20:13:08 -07:00
Vaibhav 6e4ea91461 css: Reorder popovers.scss so `.streams_popover`s are in same place. 2019-07-08 20:13:08 -07:00
Vaibhav 845b85847b css: Use SCSS nesting in popovers.scss for `.popover` and title. 2019-07-08 20:13:08 -07:00
Vaibhav b764bd786f css: Reorder popovers.scss so `.popover` are in same place. 2019-07-08 20:13:08 -07:00
Yashashvi Dave d3e83483c8 static/js/common: Add `Ctrl` key mapping to `Cmd` for MacOS. 2019-07-08 20:07:49 -07:00
Anders Kaseorg 167f30aa57 css: Make paragraph-to-list spacing consistent with normal line spacing.
The -2px list margin was almost but not exactly cancelling the 3px
paragraph margin, resulting in a line spacing exactly 1px taller than
the normal line spacing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-08 19:58:21 -07:00
Anders Kaseorg b7e3f710b6 css: Specify message_content line-height in relative units.
This fixes (or at least reduces) a problem with inline `code blocks`
causing extra uneven vertical space below their line.  The absolute
line-height was being measured relative to the lower midline of the
smaller font-size in the code blocks.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-08 19:58:21 -07:00
Vaibhav 8af03b92a0 css: Use SCSS nesting in subscriptions.scss for `.stream-row .icon`. 2019-07-08 16:23:17 -07:00
Vaibhav d8efa258e5 css: Use SCSS nesting in subscriptions.scss for `.stream-row .check`. 2019-07-08 16:23:17 -07:00
Vaibhav 25cb9ff240 css: Reorder subscriptions.scss so `.stream-row .check` are in same place. 2019-07-08 16:23:17 -07:00
Anders Kaseorg f9dd7a8b4e typing_status.js: Remove var state.
It would conflict with `exports.state` after migration to an ES6
module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:50:23 -07:00
Anders Kaseorg 84bc2186eb settings_org.js: Remove var parse_time_limit.
It would conflict with `exports.parse_time_limit` after migration to
an ES6 module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:50:23 -07:00
Anders Kaseorg 653907e26a presence.js: Remove var presence_info.
It would conflict with `exports.presence_info` after migration to an
ES6 module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:50:23 -07:00
Anders Kaseorg ba90834a7a info_overlay.js: Remove var toggler.
It would conflict with `exports.toggler` after migration to an ES6
module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:48:33 -07:00
Anders Kaseorg 24831e5e85 buddy_list.js: Rename var height_to_fill to height.
It would conflict with `exports.height_to_fill` after migration to an
ES6 module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:48:33 -07:00
Anders Kaseorg bde31a54c7 bot_data: Rename delete to del.
`delete` is a reserved keyword that would interfere with the migration
to an ES6 module.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-07-04 16:48:33 -07:00
YashRE42 dd1a6a97bd group-pms: Update list when new group pm is made.
The function activity.process_loaded_messages(messages) would be called
from message_events.js, this would call people.huddle_string with the
same message object, it was expected that this would return a list of
ids but the message.display_recipient attribute which was being sent
here used a "user_id" field instead of an "id" field.

Fixes: #12503.
2019-07-03 16:39:41 -07:00
Vaibhav db9e25db0d css: Nest `.pill-image` inside `.pill` in input_pill.scss. 2019-07-03 15:06:31 -07:00
Vaibhav 88835b9367 css: Use SCSS nesting in input_pill.scss. 2019-07-03 15:06:31 -07:00
Vaibhav 1c59a4a53c css: Reorder input_pill.scss so `.pill-container .pill` are in same place. 2019-07-03 15:06:31 -07:00
Anders Kaseorg 9f08513acb bundles: Rename commons.js to common.js.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-03 15:03:22 -07:00
Puneeth Chaganti d92af69a03 url preview: Fix CSS to make url preview titles clickable.
06f3cb2b78 added some styling to make the
embed previews prettier, and in particular added a bottom fading gradient to
make the embed description text fade out slowly, when it is out of bounds.
The fading used an ::after pseudo-element which had 100% height of the
`.data-container` which contained the title and the description of the
preview. This pseudo-element got overlaid on the title and made it
un-clickable.

This commit retains the visual appearance of the fade, while reducing the
height of the ::after pseudo element, so that it never gets overlaid on the
title, keeping it clickable always.
2019-07-03 14:38:19 -07:00
Anders Kaseorg 079ddae4c8 minify-js: Remove; everything has been migrated to Webpack.
min/sockjs-0.3.4.min.js is not used.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-03 13:58:21 -07:00
Thomas Ip 3ffe78e483 templates: Fix wrong path to edit-embedded-bot-service template.
This bug is introduced in #12667.
2019-07-03 13:40:01 -07:00
Anders Kaseorg 5f3d36ae87 tex: Bundle KaTeX CLI using Webpack.
We don’t need a hacked copy anymore.  We run the installed version out
of node_modules in development, and a Webpack-bundled version of that
in production.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:50:03 -07:00
Anders Kaseorg b0be0d5285 settings_account: Use webpack asynchronous require to load zxcvbn.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:50:03 -07:00
Anders Kaseorg f346d0e511 dependencies: Use core-js for String.prototype polyfills.
It seems like the de facto standard ES polyfill library these days,
and we already depend on it through simplebar.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:50:03 -07:00
Anders Kaseorg 05663aa3fa webpack: Rectify "common" bundle with bundles/commons.js.
Moving bootstrap-typeahead from bundles/commons.js to bundles/app.js
and csrf.js from bundles/app.js to bundles/commons.js makes
bundles/commons.js equivalent to the "common" bundle, so we can
replace the latter with the former.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:38:26 -07:00
Anders Kaseorg 1b94733953 webpack: Remove resolve.modules override.
The minimal syntactic sugar it might provide isn’t worth the
unexpected side effects (including side effects on third party
modules).

For now, we allow zrequire to emulate the previous syntax in the Node
test suite, even though stealing part of the NPM namespace is
confusing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:38:26 -07:00
Thomas Ip f6aaf43029 refactor: Use explicit path when referencing handlebars templates. 2019-07-02 16:23:30 -07:00
Thomas Ip 8c199fd44c webpack: Use handlebars-loader to handle frontend templates.
And remove the compile-handlebars-templates system.
2019-07-02 16:23:29 -07:00
Tyler B. Thrailkill 85c7eba3f9 css: Call set_layout_width even if the sbwidth is 0.
Historically, the logic that was extracted into set_layout_width only
did something on non-macOS platforms, where sbwidth != 0
(i.e. scrollbars have nonzero width).

However, with the addition of the fluid layout width option, that
function does something if either sbwidth != 0 OR fluid_layout_width
is enabled.  At that point, we should just call that function
unconditionally.
2019-07-02 15:47:03 -07:00