Commit Graph

31175 Commits

Author SHA1 Message Date
Shubham Padia 3c09f226a4 auth: Redirect deactivated users with error for social auth backend.
Fixes #11937.

Also extracts the error message for a deactivated account to
`DEACTIVATED_ACCOUNT_ERROR`.
2019-04-13 19:58:15 -07:00
ruchit2801 f71d8a7ed5 docs: remove repeated 'etc.' word from sending-messages.md.
There are two 'etc' words in the same line. This removes one of them.

Note from Tim: The old text was arguably correct, but removing it is definitely clearer.
2019-04-13 19:39:47 -07:00
overide b263671c9e markdown: Fix unordered list not rendering in blockquote.
This fixes an issue where the hanging unordered list was not
rendering in blockquote; the problem was that we were not
adding an empty line(to satisfy the markdown) for hanging
unordered list if it is in blockquote. Both blockquote
and code block is fenced but we want to avoid rendering
the list if it's in the code block but not in blockquote.

Fixes: #11916.
2019-04-13 19:23:59 -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
Tim Abbott a44de17f9b docs: Add initial documentation for TypeScript.
This is a draft/preliminary document on how we're doing our TypeScript
migration; I'm sure we'll add a lot more over the coming weeks.
2019-04-13 12:20:40 -07:00
Tim Abbott 858ac3cf3f docs: Clarify we're now fully on the Python 3 type syntax. 2019-04-13 11:55:33 -07:00
Thomas Ip 9c6964aa19 ESLint: Modify recommended typescript rules to fit our use case. 2019-04-13 11:42:48 -07:00
Thomas Ip 8b6ff8b016 ESLint: Set typescript recommended rules.
ESLint currently forbids using extends in the override block, ie
```
{
    "extends": ["plugin:@typescript-eslint/recommended"]
}
```
so we just have to add them manually for now.

See https://github.com/eslint/eslint/issues/8813 .
2019-04-13 11:42:48 -07:00
Thomas Ip 90478fc4b2 typescript: Fix violations of new typescript rules. 2019-04-13 11:42:48 -07:00
Thomas Ip 02cb85a8a9 typescript: Use ESLint instead of TSLint. 2019-04-13 11:42:47 -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
Anders Kaseorg 9f7c0b7e65 postgres_master.pp: Fix wacky su command line.
The construction `su postgres -c -- bash -c 'psql …'` didn’t behave the
way it reads, and only worked by accident:

1. `-c --` sets the command to `--`.
2. `bash` sets the first argument to `bash`.
3. `-c 'psql …'` replaces the command with `psql …`.

Thus, `su` ended up executing `<shell> -c 'psql …' bash`, where
`<shell>` is the `postgres` user’s login shell, usually also `bash`,
which then executed 'psql …' and ignored the extra `bash`.

Unconfuse this construction.

Note from tabbott: The old code didn't even work by accident, it was
just broken.  The right fix is to move the quoting around properly.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-12 17:27:23 -07:00
Anders Kaseorg 460abe82df terminate-psql-sessions: Allow running as postgres user.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-12 17:27:23 -07:00
Anders Kaseorg 53879c4673 scripts: Rename DEFAULT_USER to POSTGRES_USER.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-12 17:27:23 -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
Anders Kaseorg d03b8308a5 backup: Use tar --transform to arrange the tarball instead of symlinks.
This allows tar to print the real paths in error messages if something
goes wrong.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-04-12 16:48:34 -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
Marco Burstein ae5496020b docs: Add ".ts" support in docs and configuration.
Add references to TypeScript in documentation where appropriate, such
as in example bash commands and discussions of the file structure.
Add a new section to the Reading List with TypeScript resources.
Also update `.editorconfig` to support ".ts" files.

Fix part of #12000.
2019-04-12 11:26:17 -07:00
Marco Burstein ce7d2fde70 tools: Add TypeScript to the dependency visualizer.
The dependency visualizer currently only supports JavaScript files,
such as in the `get_js_edges` function, where only the ".js" extension
is supported. Update the visualizer to support ".ts" files as well and
to output modules without their extensions.
2019-04-12 11:14:42 -07:00
Marco Burstein 57ffc3fe74 tests: Update JS Node tests to support TypeScript.
Currently, the `test-js-with-node` tests append ".js" to filenames
without an extension. Since Typescript is now also supported, it can
produce results such as "dict.ts.js". To remedy this, check for ".ts"
files as well.
2019-04-12 11:14:42 -07:00
Wyatt Hoodes bafcf3c664 export.py: Add 'delete after upload' option for removing tarball.
This allows removal of the local tarball upon a succesful s3 upload.

A part of the public-only-realm-export webapp feature.
2019-04-12 10:50:06 -07:00
Wyatt Hoodes 0db7d6c31b export.py: Refactor './manage.py export' core logic.
This commit serves as the first step in supporting "public export" as a
webapp feature.  The refactoring was done as a means to allow calling
the export logic from elsewhere in the codebase.
2019-04-12 10:50:06 -07:00
Tim Abbott 701cc524b0 settings: Set a default for SSO_APPEND_DOMAIN.
This means that if a user comments out the field in
/etc/zulip/settings.py, they won't get an error.
2019-04-12 10:48:05 -07:00
Rishi Gupta 1a7a449572 billing: Add backend support for downgrading. 2019-04-11 23:27:42 -07:00
Rishi Gupta babaaf82fe billing: Update json endpoints test to allow more flexibility.
Slight loss in functionality, but doing the mocks correctly for every view
will be more work than the test is worth.
2019-04-11 23:20:29 -07:00
Rishi Gupta a529080f01 billing: Rename add_plan_renewal_to_license_ledger_if_needed. 2019-04-11 23:20:29 -07:00
Rishi Gupta 03d21c6317 billing: Refactor renewal_amount to return 0 instead of None. 2019-04-11 23:20:29 -07:00
Rishi Gupta 447ae77b24 billing: Add another live CustomerPlan.status.
Only CustomerPlan.ACTIVE is being used in the code / in production, so don't
need a db migration to move the other CustomerPlan.status constants around.
2019-04-11 23:20:29 -07:00
Rishi Gupta 4430f78aa3 billing: Rename next_renewal_date to start_of_next_billing_cycle. 2019-04-11 23:20:29 -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
Tim Abbott 0a656bec8a docs: Fix incorrect path to remote development nginx file. 2019-04-11 16:24:57 -07:00