Commit Graph

27197 Commits

Author SHA1 Message Date
Aditya Bansal 2e6e331439 bot-settings.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 145af3f7c8 emoji_popover_content.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 576c6eeb2c all_messages_sidebar_actions.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal f41db6a532 admin_user_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 27f238c2f1 admin_emoji_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 53969385fe admin_default_streams_list.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 975ab6ac16 user_presence_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 65eaf92acd user_profile_modal.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 44e9c6909f app/index.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 7b0de00715 right_sidebar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 5552bfbeda settings_overlay.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal ccb4e11eb4 navbar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 80ce1feeed hello.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Tim Abbott 1381603c29 portico: Remove unused Stamp font-face.
This was used for the very early-stage Zulip "ask for invite" form,
which was built around a stamped envelope concept.  The form was
removed from Zulip a couple years ago in
bded0d9d54, but this CSS was missed in
the removal.
2018-07-11 20:09:00 +05:30
Cynthia Lin 7d9281fa6c simplebar: Add simplebar dependency for help page scrolling. 2018-07-11 20:04:55 +05:30
Steve Howell e1fdb96882 refactor: Use early-exits in can_apply_locally().
The early-exit style is nice for writing longer
comments about edge cases.
2018-07-11 20:00:56 +05:30
Yago González e9cd0ad3d6 reactions: Allow using emoji_name for removing reactions.
Given that we allow adding emoji reactions by only using the
emoji_name, we should offer the same possibility for removing
reactions to make the experience for API clients not require looking
up emoji codes.

Since this is an additional optional parameter, this also preserves
backward compatibility.
2018-07-11 19:41:43 +05:30
Yago González 9244a6740e reactions: Make the emoji_code optional for adding a rection.
Complete, correct implementations of Zulip's emoji reactions API need
to send both emoji_code and emoji_name in order to add a reaction;
this is important for corner cases around clicking on a reaction in a
message that was first reacted to a year ago, when the emoji
name->code mappings have changed for the given code point in the
intervening time.

However, for folks building tools using the Zulip API, that corner
case is not particularly common; as a result, it makes sense to offer
an interface that allows adding a reaction by only specifying the
emoji name.

This is why the only field that needs to be required is emoji_name,
which can now be mapped to a single emoji. Both fields will be
necessary when "voting" an old reaction, but since we stil allow
specifying the two of them, these changes offer retrocompatibility.
2018-07-11 19:34:48 +05:30
Steve Howell 5db9b7a2ba refactor: Extract rtl.set_rtl_class_for_textarea().
We can now theoretically use this for any textarea
that supports our markdown (besides the compose box),
plus we keep the RTL code a bit more self-contained.
2018-07-11 19:20:22 +05:30
Steve Howell 353843aa7c node tests: Add rtl/ltr tests for compose box. 2018-07-11 19:20:22 +05:30
Steve Howell ebb4b21f78 refactor: Limit scope of "range" variable.
We don't need this at outer scope, and it complicates
tests slightly.
2018-07-11 19:20:22 +05:30
Max Nussenbaum 568aa43838 flatpickr: Hide the up/down arrows in the Flatpickr datepicker.
This hides the up and down arrows that appear in the year input
of the Flatpickr-provided datepicker. (This is only used in
settings for now, but the arrows will be hidden anywhere Flatpickr
is used.)
2018-07-11 19:16:25 +05:30
Max Nussenbaum 9be31d2b1b settings: Restyle x that clears date field.
This restyles the x that clears a date field to be more consistent
with the rest of the app, and to appear inside the field.
2018-07-11 19:16:25 +05:30
Tim Abbott 0132816471 profile fields: Fix fragile JavaScript for deleting date fields.
The JavaScript click handler for this feature was fragile in a way
that would break with upcoming changes to how we display the X
element.  We clean this up with a replacement implementation that
should be much less fragile.
2018-07-11 19:16:24 +05:30
Cynthia Lin e790f35d0e settings UI: Change user profile pill containers to match input styling.
Previously, commit e5d2e95 attempted to change the styling of the user
profile pill containers to match the inputs above it. However, it used
an incorrect selector (#settings_page), resulting in all other pill
containers on settings pages being changed to match it as well
(example: User groups pill containers in Organization
settings). Additionally, its selector's specified background attribute
resulted in problems in dark mode.

To correctly style the user profile pill containers to match the other
input's styling, we apply the uneditable-input class native to
Bootstrap so that we don't need to create an entirely new selector to
style it.

Note that the .custom_user_field .pill-container selector was added so
that it could match the padding of inputs. Also, the
.custom_user_field .pill-container:focus-within selector was added
with attributes straight from Bootstrap's input:focus selectors so
that .custom_user_field .pill-container would have a blue outline
while users were typing in the input pill, just like the other inputs.
2018-07-11 19:06:04 +05:30
Lyla Fischer 371e058972 user docs: Trim the language and usage of save-changes.md. 2018-07-11 10:04:49 +05:30
Rohitt Vashishtha 71648912ad zblueslip: Convert node_tests/widgetize.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha b3215dc601 zblueslip: Convert node_tests/user_groups.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 083681aeda zblueslip: Convert node_tests/user_events.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 1b9ba8c126 zblueslip: Convert node_tests/topic_generator.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 5b36a30163 zblueslip: Convert node_tests/stream_data.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 92259094b7 node_tests: Add missing stream_id field to tests in stream_data.
These were resulting in inadvertant calls to blueslip.fatal but
the code continued beyond that point, since in our testing environment
we do not stop executing when fatal is called.

This commit also adds checks to ensure that the subs were created.
2018-07-10 16:22:52 -04:00
Rohitt Vashishtha e8531ab477 zblueslip: Convert node_tests/server_events.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha e14dbecdd1 zblueslip: Store more_info and stack as well in the logs.
Now, the get_test_logs() returns an array of objects instead
of an array of strings as follows:

[{
  message: "something",
  more_info: {},
  stack: {},
}]
2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 61f8a6fd55 zblueslip: Convert node_tests/reactions.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 43988c4c8d reactions: Fix minor formatting in log message.
Changes -> "Unknown user_id 8888in reaction for message 1001"
to ------> "Unknown user_id 8888 in reaction for message 1001".
2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 910a2ec448 zblueslip: Convert node_tests/hashchange.js to zblueslip. 2018-07-10 16:22:52 -04:00
Rohitt Vashishtha 17bdb8e984 zblueslip: Add exception_msg and wrap_function functions.
This commit brings zblueslip on par with blueslip.
2018-07-10 16:22:52 -04:00
Puneeth Chaganti 3dace27ed6 tools: Only files starting with same migration number conflict. 2018-07-10 21:09:34 +05:30
Aditya Bansal 9b485f3ef4 auth: Fix bug with subdomains and GitHub auth causing apparent logouts.
This adds a new settings, SOCIAL_AUTH_SUBDOMAIN, which specifies which
domain should be used for GitHub auth and other python-social-auth
backends.

If one is running a single-realm Zulip server like chat.zulip.org, one
doesn't need to use this setting, but for multi-realm servers using
social auth, this fixes an annoying bug where the session cookie that
python-social-auth sets early in the auth process on the root domain
ends up masking the session cookie that would have been used to
determine a user is logged in.  The end result was that logging in
with GitHub on one domain on a multi-realm server like zulipchat.com
would appear to log you out from all the others!

We fix this by moving python-social-auth to a separate subdomain.

Fixes: #9847.
2018-07-10 16:49:00 +05:30
Rhea Parekh 4bbccd8287 import: import RealmAuditLog when 'zerver_realmauditlog` is missing.
* If `zerver_realmauditlog` is present in the exported data,
  `RealmAuditLog` would be imported normally.

* If it is not present, `create_subscription_events`
  function in would create the `subscription_created`
  events for RealmAuditLog. The reason this function
  is in `import_realm` module and not in the individual
  export tool scripts (like Slack) is because this
  function would be common for all export tools.

This fixes #9846 for users who have not already done an import of
their organization from Slack.

Fixes #9846.
2018-07-10 16:00:19 +05:30
Rhea Parekh 70b4794816 import: import RealmAuditLog. 2018-07-10 15:53:15 +05:30
Rhea Parekh c182a0c7a0 export: export RealmAuditLog. 2018-07-10 15:53:15 +05:30
Vishnu Ks c7cb0c6aa0 models: Add USER_SOFT_DEACTIVATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks 547b5675c6 models: Add USER_SOFT_ACTIVATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks a0da184d50 models: Add SUBSCRIPTION_ACTIVATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks abb218ebab models: Add SUBSCRIPTION_DEACTIVATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks ff4c1ca2c1 models: Add SUBSCRIPTION_CREATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks 20fae065f6 models: Add BOT_OWNER_CHANGED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30
Vishnu Ks 9670e319cc models: Add REALM_REACTIVATED event type constant to RealmAuditLog. 2018-07-10 15:42:26 +05:30