Commit Graph

8137 Commits

Author SHA1 Message Date
Vaibhav ae47ddc16e css: Use SCSS nesting in reactions.scss for `.reaction_button`. 2019-05-20 12:01:49 -07:00
Vaibhav e8c072a4c8 css: Reorder reactions.scss so that `.reaction_button` are in one place. 2019-05-20 12:01:49 -07:00
Vaibhav c4b683a638 css: Use SCSS nesting in reactions.scss for `.message_reaction`. 2019-05-20 12:01:49 -07:00
Vaibhav 9ef3a660b3 css: Reorder reactions.scss so `.message_reaction` are in same place. 2019-05-20 12:01:49 -07:00
Vaibhav 9e1ee434a7 css: Use SCSS nesting in reactions.scss for `.private-message`.
Precisely for `.private-message .message_reactions .message_reaction`.
2019-05-20 12:01:49 -07:00
Vaibhav 129dfec297 css: Use SCSS nesting in reactions.scss for `.message_reactions`. 2019-05-20 12:01:49 -07:00
Vaibhav c726198cbc css: Reorder reactions.scss so `.message_reactions` are in same place.
This atomically makes `.private-message` in same place too.
2019-05-20 12:01:49 -07:00
Vaibhav 7d8ced7375 css: Use SCSS nesting in reactions.scss for `.emoji-popover-emoji`. 2019-05-20 12:01:49 -07:00
Vaibhav eb8a8fa0dc css: Reorder reactions.scss so `.emoji-popover-emoji` are in same place. 2019-05-20 12:01:49 -07:00
Vaibhav a20b48589f css: Use SCSS nesting in reactions.scss for emoji popover rules. 2019-05-20 12:01:38 -07:00
Vaibhav 8eaa12c49a css: Reorder reactions.scss so `.emoji-popover` are in same place. 2019-05-20 11:53:34 -07:00
Vaibhav 09745d6637 css: Remove redundant `.reaction_button` rule from reactions.scss.
The removed rule does not apply in any case since it's always overridden
by `.message_reaction + .reaction_button` rule defined later on.
2019-05-20 11:53:34 -07:00
YashRE42 9b32c844df navbar: Fix stream + topic jump at 500px.
This resolves a bug where the "stream" tab item would be missaligned
with the rest of navbar and leave some empty space.
2019-05-20 11:26:22 -07:00
Kanishk Kakar 77ab9a0eb0 docs: Update desktop repo URL. 2019-05-20 11:01:11 -07:00
Anders Kaseorg 01613e71fb ui: Replace set_up_scrollbar with data-simplebar attribute.
With perfectScrollbar, we needed to call a function from JavaScript to
enable a scrollbar on a new element, but simplebar has a much simpler
default API one can do by using data-simplebar attributes in the HTML.

So we can delete all the scrollbar creation/deletion code.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-19 18:06:38 -07:00
Anders Kaseorg 3daa4fa64d pm_list: Set up #private-container once and replace its contents.
Instead of deleting and rebuilding #private-container every time its
contents need to be updated, just replace its contents.  This
eliminates some scrollbar flashing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-17 12:06:51 -07:00
Anders Kaseorg 141088586b Completely replace perfect-scrollbar with SimpleBar.
perfect-scrollbar replaces both the appearance and the behavior of the
scrollbar, and its emulated behavior will never feel native on most
platforms.  SimpleBar customizes the appearance while preserving the
native behavior.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-05-17 12:06:51 -07:00
Hemanth V. Alluri e23d5e9631 devtools: Set default stream and topic in integrations dev panel.
This makes it a lot faster to just send a message with a few clicks.
2019-05-17 11:53:05 -07:00
Hemanth V. Alluri 2bd9c8cb42 devtools: Add custom HTTP headers support to the integrations dev panel.
This commit introduces a simple field where the user can now specify custom
HTTP headers. This commit does not introduce an improved system for storing
HTTP headers as fixtures - such a change would modify both the existing unit
tests as well as this devtool.
2019-05-17 11:50:53 -07:00
Hemanth V. Alluri 5b4979806c devtools: Don't clear fields on fixture submission error. 2019-05-17 11:50:39 -07:00
Rishi Gupta 17774a80cb org settings: Update organization logo section.
This section was taking up too much visual weight, and drowning out other
elements on the page.

Once we remove the Upload buttons, we can likely shrink this further.

We remove the box-radius since at the smaller size it interferes with how
the logos look (and will look in the app).

We remove the margin-top to make this consistent with the spacing around
organization profile picture.

We change the max width from 730 to 500 since the Upload new logo button is
214px in length (not including margin), and those buttons are now inline
instead of on the next line.
2019-05-17 11:48:17 -07:00
Rishi Gupta e9a180dcb4 org settings: Fix box-shadow in organization logos section.
The box-shadow was
* Not being applied to the images (the images get their box shadow from a
  more specific rule)
* Being unintentionally applied to the upload/delete buttons
* Being unintentionally applied to the container housing the buttons and
  error messages.

The last one especially looked bad, since it added boxes where there
otherwise wouldn't be a box.
2019-05-17 11:48:17 -07:00
Mohit Gupta 1902f5210c message_flags: Batch read flag requests to at most 1k message IDs at a time.
Send at most 1k message ids in a single read flag request to avoid locking
large number of rows in server database in a single request and avoid long
processing time.

Fixes #11956.
2019-05-15 17:56:48 -07:00
Hemanth V. Alluri bae8295c52 devtools: Add integrations dev panel.
This commit adds a new developer tool: The "integrations dev panel"
which will serve as a replacement for the send_webhook_fixture_message
management command as a way to test integrations with much greater ease.
2019-05-15 13:07:44 -07:00
vinitS101 611f1f8fd2 left_sidebar: Add "+Add streams" to bottom of streamlist.
Added a new button at the bottom of the stream list which redirects
users to '/#streams/all' where they can create new streams or subscribe
to new streams.
The button is not visible to guests.

Fixes #11642.
2019-05-14 16:12:51 -07:00
vinitS101 e8c1523aa2 left_sidebar: Gear icon now redirects to '/#streams/subscribed'.
The gear icon above the streamlist now redirects to
'/#streams/subscribed' instead of '/#streams/all'.
2019-05-14 16:12:51 -07:00
vinitS101 a06f35182d copy_and_paste: Extract functions for div creation and removal.
This moves div creation and removal code in the copy_handler function
to separate functions for more reusability.
2019-05-13 18:07:21 -07:00
Vaibhav d3b201337e copy_and_paste: Bind default copy handler to hotkeys.
This removes the 'copy' event listener and binds the copy handler
to `Ctrl+C` or `Cmd+C` (OSX) keys;
2019-05-13 17:58:12 -07:00
Yashashvi Dave 3c4971edc1 subscriptions: Fix error when guest user is subscribed to public stream.
When guest user is subscribed to public stream, it throws json
error. Because when guest user is subscribed to public stream,
the `stream-sub-count` element is not initialized.
This commit fix this error, by editing the function
`rerender_subscribers_count` to intialize the element
first, when guest user is subscribed.
2019-05-13 17:47:22 -07:00
Yashashvi Dave b5b5700338 hashchange: Redirect guest user on not-allowed stream settings hash. 2019-05-13 17:27:32 -07:00
Yashashvi Dave 3f38fc6b79 streams: Redirect to subscribed-tab on unsubscription for guest user.
This commit add code to redirect guest users to
subscribed-stream-tab and removes the recently-unsubscribed
stream from settings tab on unsubscription.
2019-05-13 17:27:32 -07:00
Yashashvi Dave b68c1bb6ac streams: Disable "All streams" tab for guest users.
Fixes #10980
2019-05-13 17:27:32 -07:00
Yashashvi Dave 2598db4a77 streams: Hide unsubscribed streams in settings to guest users. 2019-05-13 17:27:32 -07:00
Yashashvi Dave 80ceb1a46d components: Add `disable_tab` attribute. 2019-05-13 17:27:32 -07:00
Yashashvi Dave cb85ca8601 models: Alter video_chat_provider field type to integer.
Migration rewritten by tabbott because it did not work.
2019-05-13 12:02:28 -07:00
Tim Abbott 243db9a22f css: Fix width calculations for fluid width.
Apparently, while b38ae6e0ed was correct
for the default Zulip UI, it was not correct for the fluid width case,
where we did actually want to override the 1400px width rule for the
non-fixed `.app-main` element.

The right fix here is to add an additional CSS rule tweak to our
scrollbar logic.  This has been carefully tested with both initial
setting states as well as toggling the state.
2019-05-13 11:27:00 -07:00
Tim Abbott b38ae6e0ed scrollbar: Fix incorrect CSS selector.
In a838de63d8, we incorrectly changed
the selector for accessing .fixed-app .app-main to just be .app-main,
which resulted in it affecting parts of the site it should not have.

The end result was a significant layout regression of the floating
recipient bar at some widths.
2019-05-10 11:45:46 -07:00
Tim Abbott 349c6f972b scroll_bar: Calculate the scrollbar width only once.
We wouldn't do it often in any case, but this is a cleaner workflow in
case a future design has us call these size adjustment functions more
often.
2019-05-10 11:44:27 -07:00
Puneeth Chaganti 4383c819cf digest: Fix visibility toggling of digest notifications checkbox. 2019-05-10 09:08:02 -07:00
Puneeth Chaganti 28df5f83dd digest: Always render digest day options as js controls visibility. 2019-05-10 09:08:02 -07:00
Tim Abbott abae98a901 css: Add detailed comment explaining our 1400px max-width.
The reference to this being overriding in scroll_bar.js and how it
causes flashes is valuable.
2019-05-09 14:07:27 -07:00
Tim Abbott beb3059547 css: Remove long-dead "sticky" CSS rules.
The code that uses these rules was removed in
f1e90086f5.
2019-05-09 13:58:41 -07:00
Pragati Agrawal a838de63d8 settings: Add option for fixed/fluid width.
This adds a new option for "fluid width" under `Display settings` section
of SETTINGS/DISPLAY SETTINGS tab.

Fixes: #11844.
2019-05-09 13:57:57 -07:00
Pragati Agrawal 389c56e88d settings_display: Refactor settings_display.
This commit refactors settings_display in order to make code more precise
and clear.
2019-05-09 13:49:43 -07:00
Harshit Bansal b553507412 subscriptions: Migrate notification setting defaults model.
This commit migrates the Subscription's notification fields from a
BooleanField to a NullBooleanField where a value of None means to
inherit the value from user's profile.

Also includes a migrations to set the corresponding settings to None
if they match the user profile's values. This migration helps us in
getting rid of the weird "Apply to all" widget that we offered on
subscription settings page.

The mobile apps can't handle None appearing as the stream-level
notification settings, so for backwards-compatibility we arrange to
only send True/False to the mobile apps by applying those defaults
server-side.  We introduce a notification_settings_null value within a
client_capabilities structure that newer versions of the mobile apps
can use to request the new model.

This mobile compatibility code is pretty effectively tested by the
existing test_events tests for the subscriptions subsystem.
2019-05-08 17:45:10 -07:00
vinitS101 18a424be79 uploads: Remove unusable UI elements if file uploading is disabled.
If MAX_FILE_UPLOAD_SIZE is set to 0, then UI elements like the upload
icon in the compose and message edit UI and "Attachments" menu in
"/#settings" are not displayed.
A different error message is also displayed if a user tries to drag and
drop or paste a file into the compose message box.

Fixes #12152.
2019-05-08 17:10:07 -07:00
Yashashvi Dave 46f45f35d2 stream_ui_updates: Add generic `initialize_disable_btn_hint_popover` func. 2019-05-08 15:09:16 -07:00
Yashashvi Dave a259b29322 streams: Update description for stream-privacy-type.
Fixes #10524
2019-05-08 14:49:27 -07:00
Puneeth Chaganti b016ab257e digest: Toggle display of digest weekday setting dynamically.
Hide or show the digest weekday setting, based on whether
`digest_emails_enabled` flag is turned on or off.
2019-05-08 14:39:12 -07:00
Puneeth Chaganti 55a4c5751d digest: Move digest weekday drop-down next to the enable checkbox. 2019-05-08 14:39:12 -07:00
Yashashvi Dave ce917ef3e6 css: Remove `display-none` class css entirely.
All the elements to which `display-none` class
is applied, are handled with `.show()`/`.hide()`
functions instead of `.addClass('display-none')`
and `.removeClass('display-none')`.
Therefore, we should use apply `display: none;`
to elements with `style` attribute.

This commits removes all usage of `display-none`.
2019-05-08 09:41:48 -07:00
Yashashvi Dave 02a1b2e26b server events: Add realm-time-sync event to update stream privacy.
Add event to update stream settings whenever stream privacy is changed
accordingly.

Fixes #9470
2019-05-07 17:33:59 -07:00
Yashashvi Dave a68a06d94f static/js/stream_events: Modify function `update_property`.
This commits modifies function `update_property` to
update more one stream-sub-property in one event.
2019-05-07 17:33:59 -07:00
Yashashvi Dave 78bb9bf37a streams: Update subs-ui-element on change-stream-privacy. 2019-05-07 17:33:59 -07:00
Yashashvi Dave fbf25942d0 streams: Extract change-stream-permissions functions. 2019-05-07 17:33:59 -07:00
Yashashvi Dave ccd3b49555 streams: Disable sub-btn with explanation if user not allowed to subscribe. 2019-05-07 16:38:36 -07:00
Yashashvi Dave 9d21b61f99 streams: Disable sub-check-btn if user is not allowed to subscribe.
This commit disable the subscription checkmark button in stream list
view, if user is not allowed to subscribe to stream.
2019-05-07 16:33:01 -07:00
ruchit2801 d2e1f5edc2 left sidebar: Add option to toggle 'Display starred count'.
This adds option in popover of starred messages, to toggle displaying
counts of starred messages.

This is a follow-up to #11645.
2019-05-07 10:58:12 -07:00
Yashashvi Dave f25012f025 custom profile field: Fix styling regression in admin settings.
The css of `display-none` class was override by
`.rendered_markdown tr` class's css.
This commit fix this regression by applying style
to html element instead of class.
2019-05-07 08:56:01 -07:00
Vaibhav 1f76374e32 message_list_view: Move edited position conditionals to JS.
This adds three bools to message_container object which calculate bools
where the "(EDITED)" label should appear:

* `edited_in_left_col` -- when label appears in left column.
* `edited_alongside_sender` -- when label appears alongside sender info.
* `edited_status_msg` -- when label appears for a "/me" message.

We use the new bools and remove the complicated if else statements
from the templates for the "(EDITED)" label.

This also allows us to add a unit test to verify the logic.
2019-05-06 21:37:54 -07:00
Vaibhav 58874a08e3 message_list_view: Rename `_add_msg_timestring` to `_add_msg_edited_vars`. 2019-05-06 21:35:05 -07:00
Vaibhav 860406d1ad message_list_view: Extract `_get_msg_timestring` method.
This method gets the timestring for the message container when the
message was last edited.
2019-05-06 21:34:54 -07:00
Vaibhav d93f5b2977 single_msg_handlebars: Cleanup moving css rules in stylesheets.
Cleanup single message template moving CSS rules for box shadow
of a private message stream inside stylesheets. For any messagebox
inside of a `.private-message` element, the box shadow is set using
the class. In cases of normal streams, the box shadow is set using
inline style since we cannot have different classes for each color.

Changes made in drafts.scss are to keep the current style of not
having the left border. Setting style using classes, this rule had
to be overridden.
2019-05-06 21:28:46 -07:00
Alexandra Ciobica 0162b7645d portico: Update android screenshot and associated svg. 2019-05-06 21:11:30 -07:00
Vishnu Ks 6c58603eaf support: Add support for scrubbing realm. 2019-05-06 20:12:54 -07:00
Vishnu Ks f6203f068b support: Add support for activating and deactivating realm. 2019-05-06 20:12:48 -07:00
Yashashvi Dave 81bcdf2e94 streams: Fix minor false html element selection. 2019-05-06 17:30:33 -07:00
Yashashvi Dave bfabb86f39 stream hash: Update hash before updating settings UI elements. 2019-05-06 17:30:33 -07:00
Yashashvi Dave 6ae6da5d22 stream_ui_updates: Move function `update_add_subscriptions_elements`. 2019-05-06 17:30:33 -07:00
Yashashvi Dave 71e561de76 stream_ui_updates: Extract `update_subscribers_list` function. 2019-05-06 17:30:33 -07:00
Yashashvi Dave 7d7cf3d786 stream_ui_updates: Extract `update_subscribers_count` function. 2019-05-06 17:30:33 -07:00
Yashashvi Dave 4cd33f23bc stream_ui_updates: Refactor update-stream-privacy-type function. 2019-05-06 17:30:33 -07:00
Yashashvi Dave d86ee6b4f0 stream_ui_updates: Extract `update_stream_privacy` function. 2019-05-06 17:30:33 -07:00
David Wood f53a8f8bb6 settings: Rename `create_stream_permission` in templates.
This commit renames the `create_stream_permission` field in the
templates to `create_stream_policy`, matching the field used in the
database model. This matches what `invite_to_stream_policy` does and
will be clearer when the `waiting_period_threshold` is split into its
own field.
2019-05-06 16:30:01 -07:00
David Wood 34d810aac3 settings: Migrate to create_stream_policy structure.
This commit replaces the `create_stream_by_admins_only` setting with a
new `create_stream_policy` setting, which mirroring the structure of
the existing `invite_to_stream_policy`.

This is important preparation for migrating the waiting period feature
to be its own independent setting.

Fixes #12236.
2019-05-06 16:27:55 -07:00
vinitS101 81b5a72252 admin_settings: Change maxfilesize to max_file_upload_size.
Renamed maxfilesize to max_file_upload_size for consistency.
Related to #12152.
2019-05-03 17:36:09 -07:00
vinitS101 3cb502974e compose: Change file upload error message to show correct file size.
The error message, that is displayed when a user tries to upload a file
larger than the allowed size, currently displays a hardcoded max file
size of 25MB.
Changed this to show the correct max_file_upload_size value that has
been set by the server admin.
2019-05-03 17:36:09 -07:00
Shubham Padia 884c19c3bc settings: NAME_CHANGES_DISABLED disables the name change button.
Fixes #12251.

Previously when disabling name changes in server settings, instead
of realm settings, the name edit button did not get disabled.
Changing name resulted in a message stating `no changes made`.
2019-05-03 12:58:51 -07:00
Shubham Padia 8c01f396db settings: Add AVATAR_CHANGES_DISABLED server setting.
Fixes #12132.
Realm setting to disable avatar changes is already present.
The `AVATAR_CHANGES_DISABLED` setting now follows the same
2-setting model as `NAME_CHANGES_DISABLED`.
2019-05-03 12:58:51 -07:00
Shubham Padia 4994a6c2c9 realm: Add setting to disable avatar changes.
This is useful when syncing avatars from an integrated LDAP/active
directory.

The upload avatar and delete avatar buttons are hidden if avatar
changes are disabled and the user is a non-admin.
If the user has a gravatar set, then the user will not be able to
upload an image as their avatar if avatar changes are disabled.

Part of #12132.
2019-05-03 12:52:43 -07:00
Yashashvi Dave 22f172114d subscription: Update existing sub-row in settings on sub events.
Update stream-subscription-row in stream settings, when
subsctiption add/removal event is received. This is only
to show dynamic effects to user on sub events.
2019-05-01 17:23:44 -07:00
Yashashvi Dave a593f73e9a static/js/subs.js: Extract `update_stream_row_in_settings_tab` function. 2019-05-01 17:23:44 -07:00
Yashashvi Dave ed2dd612fb static/js/subs.js: Extract `is_subscribed_stream_tab_active` function. 2019-05-01 17:23:44 -07:00
Alexandra Ciobica 8aa982f7ba user status: Add "clear message (x)" button for status message input.
This adds the same "x" button as we have in "stream search" or "people
search" to the user status modal.

The button is shown if someone types something, or if the status
message was already set (meaning there was already a value in the
input field). If the input field is empty, the button is not visible.

This fixes the follow-up comments from #12179.
2019-05-01 16:36:45 -07:00
Alexandra Ciobica 61758735f3 user status: Clean up code for user status options.
- Changed the <p>s to <button>s and modified the css accordingly.
- Changed the css to use scss nesting.
- Changed the line-height from 1.0em to 1.1em, because on Safari the "g" was not fully displayed.
2019-05-01 16:34:54 -07:00
Shubham Padia 27ff71c96f settings: Don't check mobile notifications if they are disabled.
Fixes #12198.
2019-04-30 14:56:26 -07:00
Yashashvi Dave 7a168216ff stream_ui_updates: Extract `update_change_stream_privacy_settings`. 2019-04-30 14:37:30 -07:00
Yashashvi Dave ecc165b899 stream_ui_updates: Extract `update_regular_sub_settings`. 2019-04-30 14:37:24 -07:00
Yashashvi Dave a71eb6aa15 subs: Extract change-stream-privacy block from function.
This commit removes code to update-stream-privacy-btn
in stream settings from update-sub-settings function.
Because stream-privacy-btn is not part of regular
sub-settings, it is admins only settings.
2019-04-30 14:36:52 -07:00
Yashashvi Dave 9dd9ea5721 stream settings: Update URL when opening empty settings panel. 2019-04-30 14:36:52 -07:00
Yashashvi Dave 460515a2ee stream settings: Extract `setup_subscriptions_tab_hash` function. 2019-04-30 14:36:52 -07:00
Yashashvi Dave ec5ef08a19 subs: Fix URL not updating as per UI on stream unsubscription.
When user unsubscribe from stream by clicking on
subscription-checkmark, the URL changes to unsubscribed
stream but stream settings UI is not updated.
We should change URL and stream settings modal
simultaneously. This PR moves update-hash function
inside open-stream-modal function, which make sure that
URL is getting updated everytime open-stream-modal
function is called and not otherwise.
2019-04-30 14:37:19 -07:00
Yashashvi Dave 2d1b80e2b4 stream_ui_updates: Extract `update_settings_button_for_sub`. 2019-04-30 14:37:14 -07:00
Yashashvi Dave 859ba9e892 stream_ui_updates: Extract `update_check_button_for_sub` func. 2019-04-30 14:37:05 -07:00
Yashashvi Dave 3649a9f15c subs: Add `stream_ui_updates.js` module for managing ui elements.
This commit adds `stream_ui_updates.js` module. This module
will includes functions which will update different ui elements
(i.e. subscription button, subscriber count).
2019-04-30 14:36:52 -07:00
David Wood 272ed90685 settings: Create an explicit invite_to_stream_policy setting.
This commit creates a new organization setting that determines whether
a user can invite other users to streams. Previously this was linked
to the waiting period threshold, but this was both not documented and
overly limiting.

With significant tweaks by tabbott to change the database model to not
involve two threshhold fields, edit the tests, etc.

This requires follow-up work to make the create stream policy setting
work how this code implies it should.

Fixes #12042.
2019-04-29 17:11:28 -07:00
vinitS101 f46b5a8ba1 message view: Decreased top margin of messages with sender info.
Decreased the top margin of first line of messages to align better with
the profile picture of the user.
2019-04-29 10:12:58 -07:00
Puneeth Chaganti 0987ef8809 Merge pull request #12221 from punchagan/safari-upload-fix
Fixes couple of problems with image pastes on Safari
2019-04-28 22:51:17 -07:00
Anders Kaseorg d4b060a520 dependencies: Upgrade simplebar to 4.0.0-alpha.6.
Fixes #12038.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-28 21:32:55 -07:00
Puneeth Chaganti a98341c79f digest: Add an organisation setting to choose the digest weekday.
Closes #549.
2019-04-28 18:40:07 -07:00
Puneeth Chaganti b0f485e95f org settings: Allow admins to enable or disable digest emails. 2019-04-27 15:20:41 -07:00
Puneeth Chaganti aca63f0fbe notifications: Hide digest emails user setting if globally disabled. 2019-04-27 15:20:41 -07:00
Mayank Madan 4c81474a4f webhooks: Add Buildbot integration.
With some minor changes by Eeshan Garg.

Fixes: #5639.
2019-04-27 15:19:16 -07:00
Wyatt Hoodes 820dd3a946 settings: Fix broken headers in night mode.
This bug turned out to pop up wherever a table existed in both
'settings' and 'organization settings', notably *excluding* both
'Custom Emoji' and 'Authentication Methods'.

The first thought to the solution was to simply add `thead` to the css
rule that applies the appropiate color for headers and the like.  This
was successful, however it brought attention to a sub-problem:

`emoji-settings-admin` and `auth-mehtod-settings-admin` were both
creating table headers in the body of the table. This was causing the
rows in these two tables to be colored inversely from all the others.
This is also the reason why these tables are the only ones correctly
styled. These handlebars were updated with the headers moved out of the
body.

The even and odd rows of the tables were then colored appropriately.

Fixes: #12209
2019-04-27 15:03:57 -07:00
Tim Abbott 7da28600c7 settings_org: Fix linter error with ==.
Apparently this was fixed in a later commit.
2019-04-26 22:48:03 -07:00
Pragati Agrawal f9681c1f51 org settings: Remove redundant loading indicator from auth methods table.
Number of auth methods isn't much, so no need to have loading indicator
here.
2019-04-26 17:57:04 -07:00
Pragati Agrawal d0ba0c7409 org settings: Add generalised function for tip-box for org settings.
This commit adds a `insert_tip_box` function and thus adds a
`organization-settings-tip` handlebars file to add a genaralised tip for
all organization settings pages. This further removes the code for tipbox
which was added in `populate_auth_methods` functions, as it wasn't making
sense there, making it more clear and readable.
2019-04-26 17:54:58 -07:00
Pragati Agrawal 2277ee0c90 org settings: Move `disable` attribute to `admin_auth_methods_list`.
This commits disables the auth-methods table using the disabled attribute
in admin_auth_methods_list handlebars instead of doing that in
settings_org.
2019-04-26 17:52:19 -07:00
Pragati Agrawal 75fc19acfd org_settings: Refactor `get_subsection_property_elements` function.
This commit adds a class prop-element for all the property elements, so
that later on we can directly use this to access elements.

In `get_subsection_property_elements`, we were finding these elements using
a makeshift method, where we were finding all these elements by mentioning
all input elements, textarea, select elements, which is not a desirable
method.
So now, here in `get_subsection_property_elements` function, we are finding
these properties using the newly added class `prop-element` which makes
code more clear and readable.
2019-04-26 17:52:19 -07:00
Pragati Agrawal 3dd5e1642b org_settings: Fix data collection of message retention property.
In handlebars and settings_org.js, the subsection in which
`realm_message_retention_days` property lies doesn't agree, and this wasn't
observed for a long time as it's disabled, still to make things right, in
this commit we have moved the logic which handles the collection of data
from `other_permission` to `other_settings` as it makes more sense there.
2019-04-26 17:41:01 -07:00
Pragati Agrawal ed30f71e07 org_settings: Remove redundant success_continuation variable.
This removes all the instances of `success_continuation` from settings_org
and accordingly refactors some code.
2019-04-26 17:41:01 -07:00
Hemanth V. Alluri 34db469700 org_settings: Fix error with undefined profile_field in bot settings.
This is a small patch to fix the error message an admin would receive if
they tried to change bot info and owner from the "bots" setting of the
organization settings panel.
2019-04-25 15:56:44 -07:00
Hemanth V. Alluri c192327a37 settings_account: Fix small typo in initialize_custom_user_type_fields. 2019-04-25 15:56:44 -07:00
Rishi Gupta 088714fb8f settings: Add sectioning to Other notifications section.
There are no other <h5>'s in static/templates. Basically just copied the
styling of `#settings_page h3` above it.

The vertical spacing here isn't great, but I think will require some deeper
fixes.
2019-04-23 15:24:39 -07:00
Rishi Gupta a501abf3a1 settings: Move pm_content_in_desktop_notifications into Other notifications.
Not as nice as the previous coupling, but needed for upcoming refactors to
this page.
2019-04-23 15:24:39 -07:00
Rishi Gupta 29d30ceab7 settings: Decouple enable_push_notifications_offline from PM setting.
Note that this setting has always applied to both streams and PMs; the test
just clarifies that that is the case.
2019-04-23 15:24:39 -07:00
Rishi Gupta 8a2772adcf settings: Update tip in Notifications tab. 2019-04-23 15:24:39 -07:00
Rishi Gupta 3e899db35b settings: Update ordering of Notification settings for consistency.
The order in the streams section is visual, audio, mobile, email, which also
seems to match other products (though didn't do a careful analysis). This
changes the PM section to match.
2019-04-23 15:24:39 -07:00
Rishi Gupta 154379c6ae settings: Update wording for PM settings on notifications tab. 2019-04-23 15:24:39 -07:00
Abhinav Singh 8c8df52dd9 user status: Decrease user status modal width by 20%
User status modal width is decreased by 20% to make it look better
with the user status message options added in the previous commit.
2019-04-23 11:21:31 -07:00
Abhinav Singh 3f10dc92ec user status: Add user status message options to user status modal.
Several user status message options are added to user status modal so
that the users can pick from them.

Fixes part of #11629.
2019-04-23 11:21:31 -07:00
Alexandra Ciobica d89cf5a9ea portico: Add android and iphone phones and screenshots in svg format. 2019-04-22 14:55:30 -07:00
Alexandra Ciobica df1ce2eac8 portico: Change android screenshot from /apps. 2019-04-22 14:55:30 -07:00
Alexandra Ciobica 26f3f71b36 portico: Change ios screenshot from /apps. 2019-04-22 14:55:30 -07:00
Nikhil-Vats fba3f49a9a portico: Fix alignment of sidebar zulip logo with label.
This vertically aligns the text "Zulip" with Zulip's logo
in the Portico sidenav.  Fixes #12140.
2019-04-21 23:03:04 -07:00
Tim Abbott 73e7d97a35 css: Fix missing newline at end of file. 2019-04-17 16:22:24 -07:00
Abhinav Singh 01b95d38be user status: Change user status modal style to standard modal style.
Tweaked by tabbott to use SCSS nesting.

Fixes part of #11629.
2019-04-17 15:12:34 -07:00
Vaibhav b5333b0a49 message_edit: Disable edit save on enter press when file uploading.
This disables the ability to save the message edit on pressing enter key
when the file is still being uploaded.

Closes #12126.
2019-04-17 15:08:42 -07:00
Vaibhav c14eb92109 upload: Fix send button selector in case of message-edit.
Previously the selector returned an undefined element when trying to select
the message edit save button (since `closest` selects the closest parent in
the DOM tree). This is fixed in this commit.
2019-04-17 15:06:50 -07:00
Yash Rathore bcfc22d94e navbar: Fix bugs caused by zulip.scss refactor.
A few bugs were caused by 7d4cebbc1e.
In night mode:
- home icon was hidden by grey box on "All messages" narrow.
- inactive tabs (eg "mentions" and "stars") were hidden behind grey box.
- topic tab was hidden behind grey box in topic narrow.

In both night mode and normal mode:
- "private messages" tab in individual/group pm narrows was illegible.

These were all results of unexpected differences in precedence rules
caused by the refactor.
2019-04-17 12:10:01 -07:00
Rishi Gupta e2ff91f507 help: Remove indentation from markdown ordered lists.
The indentation doesn't look good with the green circles.
2019-04-16 17:49:42 -07:00
Wyatt Hoodes 0986216e2c compose.scss: Fix alignment of "markdown preview" icons.
Removed the preview tag from the css rule, reduced the undo preview tag
to a font-size of 15px.

The preview tag being attached to the rule proved unnecessary. The icon
for reverting back to an editing state also dipped below the horizontal
level of the icon row.
2019-04-14 16:37:36 -07:00
matkaczmarek b081e6c728 stream-edit: Fix stream name span
This commit fixes broken span for stream-name edit on Firefox by adding
vertical-align to css.

Fixes #11923
2019-04-13 20:35:31 -07:00
vinitS101 5bf8917597 css: Add css rules to display ordered lists like bulleted lists.
This change adds rules for ordered lists that makes them visually similar
to bulleted lists.

Note that is has no effect because our markdown implementation doesn't
currently generate ol tags.
2019-04-13 18:58:26 -07:00
vinitS101 39f40c3f1a css: Changes to top and bottom margins for bulleted lists and blockquotes.
This change decreases the spacing at the top and bottom of bulleted lists
and blockquotes.
Specific rules for p and p:last-of-type have been added for both uls and
blockquotes to maintain visually consistent spacing in all cases.
2019-04-13 18:57:41 -07:00
vinitS101 d6fb15616d hotkeys: Add `e` for edit selected message.
Adds 'e' as a hotkey for editing the selected message.
Changes to the Keyboard Shortcuts menu to reflect this change.

Fixes #11866.
2019-04-13 18:52:27 -07:00
YashRE42 7d4cebbc1e navbar: Refactor tab_bar to nested selectors.
This refactors tab_list styles to be under tab_bar and to use nesting.
2019-04-13 13:24:20 -07:00
Tim Abbott 75215f0014 left sidebar: Simplify filter icon CSS logic. 2019-04-13 13:21:51 -07:00
Alexandra Ciobica d9edcbfd46 css: Center vertically the global-filters and streams arrows.
Decreased the top with 1px because it was not vertically aligned with respect to the text.
2019-04-13 13:21:51 -07:00
Alexandra Ciobica 97b9755484 left sidebar: Cleanup duplicate icon padding css. 2019-04-13 13:21:42 -07:00
Alexandra Ciobica 4eeb33275e css: Align left sidebar global-filters icons with text.
Removed the top pixel from all messages and added top: -1px to private
messages to align the envelope properly.
2019-04-13 13:12:16 -07:00
Thomas Ip 90478fc4b2 typescript: Fix violations of new typescript rules. 2019-04-13 11:42:48 -07:00
Thomas Ip ea9a74fe24 typescript: Fix violations of existing eslint rules. 2019-04-13 11:38:19 -07:00
vinitS101 fa0a5ecb33 list_render: Change alphabetic sorting to be case insensitive.
The current behavior treats uppercase and lowercase characters
differently resulting in incorrect sorting of lists.
This change fixes that and makes the alphabetic sorting of columns
case insensitive.
2019-04-13 11:36:28 -07:00
vinitS101 5be38f03db css: Change rtl ul rule to only set left and right margins.
This change has been made so that the top and bottom margins for
bulleted lists is completely handled by the other ul rule.
2019-04-13 11:28:05 -07:00
Tim Abbott cef784b101 compose: Fix buggy escaping of LaTeX in quote-and-reply.
Apparently, our use of JavaScript string `.replace()` here was buggy,
because replace() has several special escape sequences starting with
`$` if they appear in the replacement content string.  We can work
around this through something of a hack, which is to pass a function
as the second argument to replace, which seems cleaner than replacing
all $s with $$s.

Thanks to Shreya for the report.
2019-04-13 10:52:44 -07:00
Priyank Patel 8a15b9ee87 Revert "user-profiles: Lazy load profile pictures when in view."
This reverts commit 6441ad0677 since it
causes two bugs: (1) when rendering new message there is glitch where
the profile picture flashes (2) when someone sends a new message their
profile picture flickers.
2019-04-12 16:50:37 -07:00
Rhythm 85cf97b113 click_handlers: Disable draggability for left-sidebar components. 2019-04-12 16:39:36 -07:00
Tim Abbott d14a1fd1b1 css: Properly nest rules for message embeds and widgets. 2019-04-12 12:52:13 -07:00
Tim Abbott d7aa186dab css: Rewrite styling for markdown paragraph spacing.
Historically, we had a large bottom-margin on p tags designed to
produce correct spacing between consecutive paragraphs (10px, similar
to the spacing between consecutive paragraphs in different messages by
the same sender).  And then we tried to fix the end-of-message spacing
with a p:last-of-type rule, which fixed that problem, but created lots
of unnecessary extra space just before a bulleted list, block quote, etc.

We recently added some p+ul and p+blockquote negative margin rules in
62f2396ee2 to try to fix this, but those
created some secondary issues in interaction with the p:last-pf-type
rule.  This rabbit hole is likely somewhat deep.

The right fix for this overall formatting is to implement the
inter-paragraph spacing as a p+p rule, rather than a bottom-margin on
the p rule; then, we get all the properties we're interested in for
how paragraphs interact.

We may need to do some follow-up work to add small p+ul and
p+blockquote rules to get the pixel-perfect spacing we want (or maybe
just adjust the ul/blockquote spacing CSS), but this is clearly a
better architecture for doing this work.

Fixes #12101 through solving the same problem it does.
2019-04-12 12:52:01 -07:00
Tim Abbott 74a87ecff0 css: Consolidate rendered_markdown CSS blocks.
This has no functional changes.
2019-04-12 12:30:05 -07:00
Tim Abbott 00eaf3a8e6 css: Clean up CSS for blockquotes and markdown tables.
This has no functional changes, just making the implementation more
standard.

We don't have any blockquotes outside markdown rendering, which is why
it's correct to collapse the blockquote rules.
2019-04-12 12:22:40 -07:00
Tim Abbott d6404b978a css: Reorder zulip.scss so rendering markup is in one place. 2019-04-12 12:19:11 -07:00
Tim Abbott ee764e67ad css: Use SCSS nesting for message_embed rules block. 2019-04-12 12:13:30 -07:00
Tim Abbott be965e3b16 css: Fix rules incorrectly attached to messagebox.
These rules should have been on message_content/rendered_markdown, and
as a result did not properly apply to drafts (etc.).
2019-04-12 12:10:44 -07:00
Tim Abbott 27b5168395 css: Move markdown rendering to rendered_markdown class.
This eliminates unnecessary use of the message_content CSS class in
favor of rendered_markdown, which makes more sense for places outside
messages where we display rendered Zulip markdown.
2019-04-12 12:08:34 -07:00
Steve Howell 3cfc3ca24b pm list: Remove "(more conversations)" feature.
Now that we have a scroll container for the PM list,
it doesn't make much sense to limit the number to
five.

We may resurrect this feature if "more conversations"
actually fetches more conversations, but it doesn't
currently.

We also may soon make it easy to limit PMs to just
unread messages, which will make the max-5 feature
perhaps less necessary, and we don't want to make
the UI overly complicated.
2019-04-11 16:26:54 -07:00
Anders Kaseorg ec87544840 pm_list: Add missing scrollbar update.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-04-11 16:26:54 -07:00
Steve Howell 29055c16ae pm list: Simplify logic to find "active" filters.
We now just calculate two vars:

    pm_list - which individual PM conversation to highlight
    is_pm_filter - highlight "Private messages"

The logic is structured so that we err on the side of **not**
spuriously selecting list items:

    * be defensive about `filter` not existing for some reason
    * don't select anything if we have multiple pm-with
      operands in the search (which is sort of undefined
      behavior)

Tweaked by tabbott to add a comment explaining the multiple pm-with case.
2019-04-11 10:59:53 -07:00
Steve Howell 6b144003c2 pm list: Avoid duplicate resize calls.
We are basically just inlining remove_expanded_private_messages,
skipping the resize call that happens at the end of rebuild_recent.

This change makes sense even if we keep the
current UI for Private Messages.
2019-04-11 10:59:33 -07:00
Steve Howell bfdce11c8f refactor: Initialize stream list code in stream_list.js.
This code was in subs.js for historical reasons.
2019-04-11 10:50:55 -07:00
Alexandra Ciobica d8e9975b9d css: Align left sidebar icons horizontally and fix the spaces.
Center aligned the icons from streams and decreased the font-size of
the icons from the global filters.

This dramatically improves the visual appearance of the left sidebar.

Fixes: #11917.
2019-04-11 10:47:30 -07:00
vinitS101 62f2396ee2 message view: Reduce extra white space above quotes and unordered lists.
Blockquotes and unordered lists had a large amount of space above them
when preceded by a paragraph tag, which looks ugly.  This is a common
issue with the CSS rendering of essentially all markdown
implementations (e.g. GitHub has this bug).

We resolve the issue by reducing that whitespace with negative
margins.  Hopefully, this won't create other weird glitches in the
process.

Fixes #11631.
2019-04-10 17:51:04 -07:00
Sebastian Morr cc226d107e Correctly label the shortcut for starting a PM as "(x)" instead of "(c)" 2019-04-10 09:34:44 -07:00
Vaibhav c2e938f758 minor: Export function `copy_handler`.
This makes it potentially possible to call this function from other
code paths such as hotkeys.
2019-04-06 12:56:04 -07:00
Vaibhav 1e456eb84c copy_and_paste: Extract `analyze_selection` function.
This is the part where the whole selection is analyzed to get the
`start_id` and `end_id` of the messages that are selected (the
loop part of the copy handler).

This is extracted and exported as well.
2019-04-06 12:55:42 -07:00
Abhinav Singh c27d927663 refactor: Remove inline javascript code in email_log.html.
All the inline javascript code present in email_log.html(which is
rendered when the user visits "/emails" in development mode) is
transferred to a new file: email_log.js in portico/ directory.

Fixes #11608.
2019-04-05 17:28:23 -07:00
Vaibhav 69660da0e1 message_list_view: Remove check specific to undefined for "is stream".
Private messages too have non-`undefined` stream name. It is usually
an empty string. The check has been changed to not check specifically
for stream name to be undefined.
2019-04-05 17:26:05 -07:00
Vaibhav 6191b4d93a copy_and_paste: Change copy div css to match "day mode".
Color and background is made according to "day mode"
exclusively here because when copying the content
into, say, Gmail compose box, the styles come along.
This is done to avoid copying the content with dark
background when using the app in night mode.

We can avoid other custom styles since they are wrapped
inside another parent such as `.message_content`.
2019-04-05 17:13:20 -07:00
Vaibhav 7f27c09704 markdown: Add rendered_content selector to night-mode syntax highlight.
This adds a parent selector, `rendered_content`, to night mode syntax
lighlight selector. This helps us in getting the "day mode" syntax
highlight styles in night mode.
2019-04-05 17:13:20 -07:00
Vaibhav 5c36918c17 markdown: Add .rendered_markdown for all elements with rendered MD content.
This adds a class `rendered_markdown` for all the elements which have
rendered markdown content; This is done to add different styles for
rendered content in day mode and night mode.

Also replace the element selectors from CSS to use the class.
2019-04-05 17:13:20 -07:00
Priyank Patel 6441ad0677 user-profiles: Lazy load profile pictures when in view.
Using lazysizes we only load images if they are in view.
This decreases load time and save more bandwidth since images are loaded
after html is loaded and if they are on screen.

Fixes #3564.
2019-04-05 15:51:02 -07:00
Eeshan Garg bc430909af webhooks/intercom: Implement support for all events. 2019-04-05 15:15:52 -07:00
Alexandra Ciobica 0c328d9617 css: Add spacing between info and image on /apps.
Fixes: #11811.
2019-04-04 11:32:58 -07:00
Thomas Ip b8e1b8d6ff coverage: Bring dict.ts line coverage back to 100%.
The delete operator could throw a TypeError when attempting to
remove a non-configurable property, which is rare in practice since
they can only be created using `Object.defineProperty()` and
`Object.freeze()`. We also never uses the output of `del()` anyway.
2019-03-30 17:12:50 -07:00
Marco Burstein feadc8bf46 portico: Fix trapsarent gradient styling inconsistencies.
Instead of using the `trapsarent` keyword, which is interpreted
as Safari as black with an opacity of 0%, re-use the gradient colors
themselves in order to lead to a single color gradient. This allows
for the homepage to look the same regardless of browser.

Fix #11985.
2019-03-25 16:25:58 -07:00
Abhinav Singh 62d9241c03 refactor: Remove inline javascript code from accounts_send_confirm.html.
This commit removes inline javascript code present in
accounts_send_confirm.html and moves it to signup.js. This page is
rendered when the "/accounts/send_confirm" endpoint is visited. An
empty div element is added in accounts_send_confirm.html with
unique data-page-id attribute to make it more easy to find in which
page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 4b8f6b55be refactor: Remove inline javascript code from reset_confirm.html.
This commit removes inline javascript code present in reset_confirm.html
and moves it to signup.js. The reset_confirm.html page is rendered when
the user visits "/accounts/password/reset" confirmation page. An empty
div element is added in reset_confirm.html with unique data-page-id
attribute to make it more easy to find in which page we are, while
working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 17d9c24094 refactor: Remove inline javascript code from reset.html.
This commit removes inline javascript code present in reset.html and
moves it to signup.js. The reset.html page is rendered when the user
visits "/accounts/password/reset". An empty div element is added in
reset.html with unique data-page-id attribute to make it more easy
to find in which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh d52e3b0d70 refactor: Remove inline javascript code in dev_login.html.
A new javascript file "dev-login.js" is created in static/js/portico/
and the inline javascipt code present in dev_login.html is transferred
to that file. An empty div element is added in dev_login.html with
unique data-page-id attribute to make it more easy to find in which
page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 65d9d017c3 refactor: Remove inline javascript code from create_realm.html.
This commit removes inline javascript code present in create_realm.html
and moves it to signup.js. The create_realm.html page is rendered when
the user visits "/new". An empty div element is added in
create_realm.html with unique data-page-id attribute to make it more easy
to find in which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 2a14fcf3e9 refactor: Remove inline javascript code from accounts_home.html.
This commit removes inline javascript code present in
accounts_home.html and moves it to signup.js. The accounts_home.html
page is rendered when the user visits "/register". An empty div
element is added in accounts_home.html with unique data-page-id
attribute to make it more easy to find in which page we are, while
working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 4efef4f1a5 refactor: Remove inline javascript code from login.html.
This commit removes inline javascript code present in login.html and
moves it to signup.js. An empty div element is added in login.html
with unique data-page-id attribute to make it more easy to find in
which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Nikhil-Vats 38be5ea743 message_edit_history: Add UI for seeing topic edits.
Users can previously see only message content edits, this will enable
them to see topic edits too in the same section, fixes #3731.

Fixes #3731.
2019-03-25 15:10:47 -07:00
Thomas Ip a2872c107e typescript: Move TS files into JS directory.
This is just a code reorganization to avoid making it difficult to
find things as we migrate more file to TypeScript.
2019-03-25 12:11:37 -07:00
Hemanth V. Alluri 9ed1dcc4b6 webhooks: Add Bitbucket Server integration.
This commit adds support for all "repo" events.
2019-03-24 22:06:29 -02:30
Anders Kaseorg 324b1d52cb modals: Replace modal dialog scale transition with short slide.
This works better with SimpleBar (see
https://github.com/Grsmto/simplebar/issues/274).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-21 17:27:45 -07:00
Vishnu Ks 34b8626959 help: Increase the width of sidebar scrollbar. 2019-03-21 16:57:25 -07:00
Vaibhav e2115ad0ba refactor: Nest night-mode syntax highlighting rules into `body.night-mode`.
Rather than using the parent selector multiple times, all the rules
are nested inside one selector.
2019-03-21 16:51:40 -07:00
Vaibhav 46b2d9d328 markdown_docs: Fix styling for in-app docs for inline code.
This adds a selector `#message-formatting` which is basically the
modal id to apply night mode style to inline code in the modal.
2019-03-21 16:51:40 -07:00
Pragati Agrawal 2e67cf38b3 composebox_typeahead: Remove unnecessary string operation.
slice always returns a new string, so this could have been motivated
by ensuring we always duplicate the string, but reading the code, it's
already sliced by the caller.
2019-03-21 13:33:27 -07:00
Pragati Agrawal f617008924 typeahead_helper: Add sorter function for slash commands.
This adds a `sort_slash_commands` function in typeahead_helper to sort
slash commands.
2019-03-21 13:33:27 -07:00
Pragati Agrawal 76a35bf1d9 typeahead: Add typeahead for slash commands.
This is the follow-up of PR #10267.
Here, we add typeahead for slash commands `/me` and `/poll` in compose box.

The slash typeahead will open only when `/` is the first character and all
slash commands will be displayed when one types `/`, as this helps a lot in
discoverability. This also adds a description of what the slash command
does in the typeahead.
2019-03-21 13:33:27 -07:00
Rishi Gupta b47e6d0d94 help: Add status-and-availability. 2019-03-21 12:56:38 -07:00
Rishi Gupta 52fb22277b onboarding: Remove get_newbie_stream from stream_data.js.
A relic of a past system removed in
9fbd990d1a. It is not being called
anywhere in the code.
2019-03-21 12:34:16 -07:00
Thomas Ip 7d050ab0cf typescript: Migrate dict.js to typescript. 2019-03-21 10:48:44 -07:00
Thomas Ip 676eafae7e typescript: Declare untyped JS modules. 2019-03-21 10:44:34 -07:00
Shubham Dhama 238885ca86 settings_users: Remove meta.current_deactivate_user_modal_row workaround.
The removes meta.current_deactivate_user_modal_row workaround by a more
readable and clear way.
2019-03-20 22:34:57 -07:00
Shubham Dhama 7ab0c26bda settings_users: Refactor some code for deactivate button. 2019-03-20 22:34:57 -07:00
Shubham Dhama 41140f2e46 settings_users: Use update_view_on_deactivate to update deactivate view.
This removes the function update_button_on_success as the action performed
by it can be done by update_view_on_deactivate.
2019-03-20 22:34:57 -07:00
Shubham Dhama f0c069a316 settings_users: Make update_view_on_reactivate function generic.
This also remove:
- meta.current_bot_element: As usage of meta has been wrongly exploited, we
  should refrain us from using meta this way i.e. to share variable between
  function using the global variable, as they reduce code readability.

- update_view_on_deactivate_reactivate_failure: Again to deduplicate the the
  code we're compromising with readability which isn't worth it here, also
  we need to this because we have removed above meta key.
2019-03-20 22:34:57 -07:00
Shubham Dhama 53abbd9408 settings_users: Remove redundant usage of `.user-admin-settings`.
No class with this name exist in codebase.
2019-03-20 22:34:57 -07:00
Shubham Dhama 42d19ababe settings_users: Fix update_view_on_deactivate to take row as an argument.
We should pass row as an argument to update_view_on_deactivate because we
update deactivate view of a row when the user get activated/deactivated by
the event system.

This also removes a redundant data variable.
2019-03-20 22:34:57 -07:00
Shubham Dhama 96aac91119 settings_users: Fix misleading comment.
This fixes a misleading comment as we want to change the view for both bots
    and users, whose active state is changed.
2019-03-20 22:34:57 -07:00
Shubham Dhama 060eacc980 settings_users: Move update_view_on_reactivate up.
This is done just to make code more readable.
2019-03-20 22:34:57 -07:00
Tim Abbott 0320355f09 echo: Add a minimum time for sending error spinner.
This at least makes clear that the button did something.
2019-03-19 13:30:46 -07:00
Tim Abbott a6c0ac44be css: Make message_failed icons always visible.
This fixes the confusing behavior that errors sending messages were
not immediately user-visible.

Based on work by Dominik Gryboś in #11479.

Fixes #10537.
2019-03-19 13:30:28 -07:00
Tim Abbott 9e85478010 css: Fix sizing and height of message_failed error icons.
Inspired by work by Dominik Gryboś in #11479.
2019-03-19 13:30:27 -07:00
Tim Abbott 4ae325ce6c css: Fix alignment of message_controls.
They were 1px too high.
2019-03-19 13:30:27 -07:00
Tim Abbott f9eeddc78c css: Limit message_failed class to inside message_controls.
This is mostly for readability.
2019-03-19 13:30:27 -07:00
Tim Abbott 8700d14c15 css: Remove unused message_local CSS class.
This is likely a very old legacy feature.
2019-03-19 13:30:27 -07:00
Tim Abbott 36b18cd183 css: Use SCSS nesting for message_controls region. 2019-03-19 13:30:27 -07:00
Tim Wissel ab6c39c94b bugfix: Hide tooltips when switching a narrow.
Fixes #4639.
2019-03-19 12:28:39 -07:00
Tim Abbott 38de5740fa integrations: Reduce excessive margin below sidebar headings.
This just didn't look good.
2019-03-19 11:08:51 -07:00
sameerchoubey 2efe1963a5 portico: Add /api links to /integrations.
This PR creates a custom section on the /integrations page and adds
links to /api for common requests.

Fixes #11803.
2019-03-19 11:08:38 -07:00
Pragati Agrawal 9037ef56dc org_settings: Disable `Deactivate` button for yourself in Users tab.
This disables the Deactivate button for the current user in the Users tab,
so that it becomes hard to deactivae yourself accidently from Users tab.

Fixes #10427.
2019-03-18 22:41:09 -07:00
Tim Abbott 6e8e7feffc settings: Fix webapp password change UI.
Apparently, this has been broken since
dee4e3fb89, due to the beforeSend code
here overriding the default beforeSend function that sets the CSRF
token.  The correct fix was actually to just run the relevant code
directly before the channel.patch call.

Fixes #11938.
2019-03-18 22:14:04 -07:00
vipul chhabra 958126733b message view: Fix The unexpected behavior of Youtube Thumbnail.
It is observed in Mozilla margin was considered from other side of thumbnail
due to some special padding issues observed in mozilla.

To fix this top and left value are assigned to 0 so that it automatically
takes its correct position in all browsers

Fixes #11867.
2019-03-18 13:19:59 -07:00
Thomas Ip da6fb98d21 typescript: Set appropriate compiler options.
* Make type-checking stricter.
* Use more modern features.
2019-03-18 12:49:47 -07:00
Steve Howell 0c029fa3df left sidebar: Remove broken animation for new PMs.
When new PMs came in, we would do a little
animation to show you the incoming message.
Unfortunately, it was broken and would animate
too many things.  (The code looks at a single
var to see if PM counts changed, but there are
actually mulitple PM counts.  We could fix that,
but we decided that this feature just isn't
worth the complexity.)

We still animate incoming mentions.

Fixes #11868.
2019-03-15 13:33:11 -07:00
Ben Muschol 243be91a9b settings: use i18n.t on profile picture upload message.
This fixes a small bug where the text previously was not being looked
up for translation.
2019-03-15 13:30:18 -07:00
Ben Muschol d526ff00f2 settings: Rename "user avatar" to "profile picture"
This renames references to user avatars, bot avatars, or organization
icons to profile pictures. The string in the UI are updated,
in addition to the help files, comments, and documentation. Actual
variable/function names, changelog entries, routes, and s3 buckets are
left as-is in order to avoid introducing bugs.

Fixes #11824.
2019-03-15 13:29:56 -07:00
vsvipul a41ada3398 image-action: Fix open and download hover highlight in night mode.
When we try to hover over Open or Download they were not highlighted
in night mode, because of incorrect specificity. This commit adds
highlighting in night mode (possibly fixing a regression when we made
night mode less aggressive about hover).

Fixes #11887.
2019-03-15 11:27:01 -07:00
Tim Abbott 8e1dff708e apps: Simplify rendering logic using $.toggle. 2019-03-15 10:11:39 -07:00
theredcap 3aa16dcd73 templates: Add "Download APK" button in apps.html.
This allows user to download the latest version of android apk from
the apps/android.

This will help the users who use Android without Google Play to
download the app and install it with ease.

To implement this I added a Download APK link on the apps.html page
which always points to the latest released version.

Fixes part of #11647.
2019-03-15 10:11:39 -07:00
Anders Kaseorg bd50c6a152 resize: Don’t hide popovers on mobile resize.
Or on the scroll triggered by that resize.

Then we don’t need a kludge that skips the resize handler in
situations where it might hide popovers.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-15 09:52:08 -07:00
Tim Abbott b58d3a37a7 stream_data: Add a comment explaining more topics logic. 2019-03-15 09:34:18 -07:00
Steve Howell ba0418c989 stream_data: Remove untested useless code.
This code was actually dead, due to the .empty() check above.  Fixing
this lets us restore 100% coverage.
2019-03-15 09:27:41 -07:00
Challa Venkata Raghava Reddy 8623a02d98 streams: Avoid showing more topics option when it's useless.
This makes the "more topics" option which appears below the list of
known topics in the left sidebar appear only when it's possible there
are actually more topics to be displayed.  Two specific cases it
resolves completely include:

* Newly created realms; this widget was a common source of confusion
  for new organization administrators.
* Newly created streams.

There are still some corner cases this doesn't handle, e.g. if you
just joined a private stream with protected history, but there isn't
as easy a fix for those.

Essentially rewritten by tabbott to fix code duplication and comment
extensively.

Fixes #10265.
2019-03-14 21:51:24 -07:00
Pragati Agrawal 2ccf5655da realm_logo: Refactor `build_realm_logo_widget` function.
As a follow up of commit (bf1c9420df), this
commit removes the `build_realm_day_mode_logo_widget` and
`build_realm_night_mode_logo_widget` function , and changes
`build_realm_logo_widget` to take single argument `is_night` and depending
on this argument, corresponding `day mode` or `night_mode` widget is
handled.
2019-03-14 17:05:22 -07:00
Abhishek Kumar Singh 32853a565f portico: Fix the partial visibility of zulip-octopus on landing page.
The image zulip-octopus.png was not fully visible on the
landing-page due to lesser width thus resulting into an incomplete
image.
2019-03-14 15:31:10 -07:00
vinitS101 ead9598fbe user status: Change Active now to Online now in full user profile.
Change "Active now" to "Online now" in Last seen field of
full user profile.
2019-03-14 15:19:09 -07:00
vinitS101 e90ed827bb user status: Change Last seen to Last online.
Change "Last seen" to "Last online" in the full user profile.
2019-03-14 15:19:09 -07:00
Steve Howell 64de28eb68 refactor: Make build_stream_popover more generic.
We now let the click handler find the stream id.
2019-03-14 15:06:41 -07:00
Abhinav Singh 8fbba64377 emoji: Allow users to add emoji or react in mobile browsers.
It was impossible to add emoji to the message or to react on other's
message in mobile browsers because emoji popover used to get closed
due to the resize event being fired by the virtual keyboard. This
commit solves this issue by ignoring the resize event when the user
is trying to use emoji popover.

Fixes #11448.
2019-03-14 14:50:26 -07:00
Steve Howell 695399322b css: Don't underline topics when we hover them.
We generally don't combine underline effects and
hover backgrounds.

We also remove some CSS related to underlines that
was overridden.
2019-03-14 13:54:38 -07:00
Steve Howell ee9612c927 css: Hover individual topic rows.
Hovering the entire block was confusing.
2019-03-14 13:54:35 -07:00
Steve Howell c2858f1c64 css: Fix hover for "Private messages".
It's ugly to hover the entire block--just hover the individual
rows.
2019-03-14 13:52:50 -07:00
Steve Howell aae3f8a04a css: Fix blue highlights for Private Messages.
We have this strange business requirement that the
blue-ish highlights for the current PM go into the
left gutter and all the way to the right edge.

We also have markup that treats the list of PMs
as a list inside the list item for the "Private
messages", which makes sense logically.

Before this change, the padding was done for the
outer top-left `ul`, but that caused the inner PM
rows not to have that padding when you hovered them.

Now we pad each individual list item and/or inner
list item or div.

Fixes #11879.
2019-03-14 13:52:39 -07:00
Steve Howell 837801ed21 css: Tweak hover color in day mode.
(The new color here shows up better against the
background.  Rishi Gupta provided the new color.)

This only affects day mode.
2019-03-14 13:52:27 -07:00
Steve Howell 10f9b9c616 minor: Change markup for icon fonts.
I am trying to phase out the confusing global-filter
name.
2019-03-14 13:50:09 -07:00
Steve Howell 8efd5a72ec minor: Remove unused padding.
This is overridden in all cases.
2019-03-14 13:50:09 -07:00
Steve Howell 36fb6cd2b2 minor: Remove unused CSS for global-filter. 2019-03-14 13:50:09 -07:00
Vaibhav d285f67afe copy_and_paste: Fix copy/paste behaviour on Firefox.
Firefox and Chrome handle selection of multiple messages differently. FF
creates multiple Ranges and Chrome creates one. Code written previously
terminated when we got an empty Range or Range with same starting and ending
message. This behaviour was incorrect since the selection was valid.

* Check for same message is done after looping through all the ranges now.
* `construct_copy_div` is called once since it is much easier to determine
  start_id and end_id with confidence and this avoids any overlap between
  same message ids.

Extended by tabbott to include a ton of comments on how this works.

Fixes #11805.
2019-03-13 17:37:26 -07:00
Tim Abbott c5a2bb2c8b i18n: Update translation data from Transifex. 2019-03-13 14:10:09 -07:00
Siddharth Varshney 0d25baedfa compose: Fix narrow button text when switching to PM.
This changes the "new private message" button to be instead "new
conversation" when looking at PMs, to avoid confusion that the button
was the right thing to do to reply to the current private message
conversation.

Fixes #11679.
2019-03-11 21:58:05 -07:00
Anders Kaseorg aad61c42a3 css: Replace generated U+202A LEFT-TO-RIGHT EMBEDDING with CSS properties.
These generated characters (added in #9889) were causing poor wrapping
behavior, at least in Firefox.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-11 17:12:53 -07:00
Steve Howell 597c812300 refactor: Use a Dict to track active topic widgets.
Even though there are only ever zero or one active
topic widgets in our current sidebar, it's almost the
same amount of code to just manage them with a Dict.

Also, we can more easily do possible future features
like setting streams to be always-open.
2019-03-11 15:49:44 -07:00
Vishnu Ks 8eeb8280b4 activity: Create interface for doing support operations.
This should grow into a tool that makes it much easier to do common
organization management tasks without using a manage.py shell.
2019-03-11 12:01:11 -07:00
Pragati Agrawal e630dde240 settings_org: Improve robustness of organization settings.
This moves the configuration of widget type from settings_org to instead
live in respective HTML templates, via `data-widget-setting-type` and we
also remove `get_subsection_property_types` and refactor function
`populate_data_for_request` accordingly.

Fixes: #11708.
2019-03-11 10:58:15 -07:00