Commit Graph

5304 Commits

Author SHA1 Message Date
Brock Whittaker 20f3b0f599 popovers: Apply email overflow changes to ".message-info-popover".
This applies the same overflow changes to “.message-info-popover” by
imposing a max width on the popover (so it doesn’t increase in width
when it gets larger) and adding the tooltip on hover.
2017-12-13 14:20:18 -06:00
cPhost 97c3d5fce3 user profiles: add tooltip for too long email. 2017-12-13 14:20:18 -06:00
Balaji2198 c54c40eecd refactor: Remove obsolete .sidebar-nav. 2017-12-13 14:17:41 -06:00
Balaji2198 e9ae14c968 refactor: Remove obsolete .position-relative. 2017-12-13 14:17:41 -06:00
Balaji2198 7b91668ef4 refactor: Remove obsolete .messagebox-bottom-colorblock. 2017-12-13 14:17:41 -06:00
Balaji2198 b9c784bd7f refactor: Remove obsolete .messagebox-bottom.
This is an obsolete css class in zulip.css.
2017-12-13 14:17:41 -06:00
Balaji2198 6f7574ce19 refactor: Remove obsolete .message-right.
This is an obsolote css class in zulip.css.
2017-12-13 14:17:41 -06:00
Balaji2198 50517c16d6 refactor: Remove obsolete .message-pane.
This is an obsolete css class in zulip.css.
2017-12-13 14:17:41 -06:00
Balaji2198 38d778501c refactor: Remove obsolete .edit-profile.
This is an obsolete css class in zulip.css.
2017-12-13 14:17:41 -06:00
YJDave ffe3776b5f create stream: Show current user on top of "People to add" list
Fixes #7475
2017-12-13 14:16:07 -06:00
civilnewsnetwork 76511449f1 Added darken to perfect-scrollbar on scroll 2017-12-13 14:14:59 -06:00
Weronika Grzybowska b54f78968f markdown: Add automatic numbering of ordered lists.
Adds a markdown preprocessor that finds ordered lists where all items
use the same number and change them to be in normal increasing order,
starting with that number.

Fixes #5159.
2017-12-12 18:35:38 -06:00
Rhea Parekh dd1b14378b Streams: Disallow certain markdown characters in stream names. 2017-12-12 10:04:31 -06:00
ryan 08b39672c2 invitations: remove reformatting on error
This removes email input reformatting when invites are not sent.

Fixes #7581.
2017-12-12 09:58:34 -06:00
Utkarsh Patil 1093d88fa0 hotkey.js: Navigate using page up / page down
Using page up / page down, go to the top / bottom of compose textarea

Fixes https://github.com/zulip/zulip/issues/7097
2017-12-12 09:55:50 -06:00
Cynthia Lin 240511c2d7 dark-mode: Compact common background-color declarations. 2017-12-12 09:11:34 -06:00
Cynthia Lin 86f87bcb3f dark-mode: Change hex color codes to HSL. 2017-12-12 09:11:34 -06:00
Cynthia Lin 45d0b2bb47 dark-mode: Fix background colors of modals and sidebars in mobile view.
Fixes #7623.
2017-12-12 09:11:34 -06:00
Shreyansh Dwivedi 47fcb27e39 invitations: Remove custom_body.
Fixes #7672
2017-12-11 19:23:54 -08:00
Cynthia Lin 9682ad4ca9 left sidebar: Add margin to bottom of Streams list.
The last stream name gets covered by a Chrome link hover tooltip, so an extra 20px gets added to the bottom.

Fixes #7654.
2017-12-11 17:33:46 -08:00
Greg Price ac7d086085 sidebar: Revert to narrowing to whole stream.
This reverts commit eb2bdb706 "sidebar: Narrow to latest topic if
not in stream."  On a trial deploy, many users were surprised and
preferred the old behavior.
2017-12-11 16:35:12 -08:00
Greg Price d15fcc18cc sidebars: Revert change to more muted colors.
This reverts commit aebf63c28 "sidebars: Change to more muted
hover/active colors."

In addition to the effects described in its commit message, this
commit gave the unread counts in the left sidebar a much lighter
background, making them harder to see.  I'm not quite sure which part
of this change caused that effect how; reverting for now and we
can sort out a new version of the change.
2017-12-11 15:36:59 -08:00
Brock Whittaker 2252d7e5f6 Revert "dark-mode: Add "T" hotkey for dark mode theme."
This reverts commit ce62abce73.

Fixes #7678.
2017-12-11 15:59:02 -06:00
Cynthia Lin db55fd8e48 Revert "Make dark theme toggle only run in dev mode."
This reverts commit 59870b2203.
2017-12-11 15:59:02 -06:00
Rishi Gupta 4eb3202b13 integrations: Remove weather example from zapier doc.
I don't think it made the page more readable, and doubled the length.
2017-12-11 15:39:26 -06:00
Rishi Gupta 48afc55b1b settings: Reword notifications settings strings.
Audible notifications is a confusing term, especially since it could
plausibly mean audible notifications on your phone.

Mobile push notifications is also not great, since most people don't know
what push notifications are.

I removed "receive" from stream settings strings since I think it isn't
necessary, and so that the strings (and translations) would be the same as
what's on the settings pages.
2017-12-11 09:17:31 -08:00
Rishi Gupta 7ae9c2935e org settings: Change wording of restrict to domains setting. 2017-12-11 09:17:31 -08:00
Akash Nimare 54affeac02 desktop: Update desktop app to v1.7.0.
Update desktop app to latest stable release.
2017-12-11 11:14:38 -06:00
Rishi Gupta f323d59ec0 org settings: Remove double negative from open realm setting.
The current wording is tricky to wrap one's head around.
2017-12-10 23:15:00 -08:00
Steve Howell 36ade63d84 compose: Fix bug in undo operation
This fixes compose.test_video_link_compose_clicked to just
use a stub for compose_ui.insert_syntax_and_focus.

It also adds direct tests for compose_ui.insert_syntax_and_focus.

Fixes #6362
2017-12-10 04:10:18 -08:00
Cynthia Lin 9bf0c96e9f modals: Make settings page selectors more specific.
The `#settings_page .right.show` selector was breaking the Emoji style inputs in Display settings on mobile responsive view.

Fixes #7624.
2017-12-08 18:22:30 -08:00
Cynthia Lin 799e4adf42 compose: Align Press Enter to send checkbox with label.
Fixes #7604.
2017-12-08 18:21:32 -08:00
Rohitt Vashishtha eb2bdb706a sidebar: Narrow to latest topic if not in stream.
We now narrow to the latest topic in stream if we are narrowing from
outside the stream, and show all topics grouped together (previous
default) if we are already narrowed to the stream.

Fixes #7555.
2017-12-08 05:53:49 -08:00
Brock Whittaker 59b0776c53 left-sidebar: Lighten global filter icons.
This lightens them to a half-opaque base text color so they stand out
less than they currently do.
2017-12-07 15:10:07 -08:00
Brock Whittaker aebf63c288 sidebars: Change to more muted hover/active colors.
The active streams and users should be more muted grey tones than the
greens and blues that they currently are.
2017-12-07 15:10:07 -08:00
Brock Whittaker 60e018e972 sidebars: Add 1px of vertical margin to all <li>.
This makes the list slightly less dense (9%) and ensures that the
borders of hovered items and active items don’t touch each other.
2017-12-07 15:10:07 -08:00
Brock Whittaker 953ee778f3 sidebars: Remove link underlines on hover.
This removes the underlines on the stream names and user names when
hovered over for a cleaner look. This is acceptable due to the fact
that hover is signified already by a light grey background.
2017-12-07 15:10:07 -08:00
Cynthia Lin c90faca875 portico: Modify docs sidebar to a light shade of green. 2017-12-07 14:40:17 -08:00
Cynthia Lin b7fb86b9ea user docs: Modify sidebar and index page styling. 2017-12-07 14:40:17 -08:00
Cynthia Lin eddf3a722a components: Change cursor to pointer for checkbox labels.
Lets users know that they can toggle the checkbox by clicking the corresponding label.
2017-12-07 14:37:23 -08:00
Cynthia Lin 5f480495f8 invitations: Make stream labels click targets.
Label tags can't be nested in each other.

Fixes #7582.
2017-12-07 14:37:23 -08:00
Rishi Gupta e8b33f2c78 settings_invites: Change wording on resend button. 2017-12-06 20:30:42 -08:00
Brock Whittaker 349dad7a84 typeaheads: Change active <li> to have white text again.
This was accidentally changed due to an inheritance problem of
`.typeahead.dropdown-menu a` overriding the default bootstrap
selector `.dropdown-menu .active > a` with its color styling
preferences.
2017-12-06 16:48:08 -08:00
Brock Whittaker 2776787dc3 compose-alert: Remove unneeded style.
This removes the width attribute that actually makes the notification
about a pixel too long, because removing this with a block element will
automatically make it 100% auto fit.
2017-12-06 16:48:08 -08:00
Brock Whittaker 0ed9da9a11 compose: Make compose alerts dark-mode compatible.
This makes all the alerts in the compose box compatible with dark mode
by choosing different colors and fixing borders to be properly
pronounced, along with removing text shadows that make text unreadable.
2017-12-06 16:48:08 -08:00
Brock Whittaker 9a3a9be926 compose: Restyle `#out-of-view-notification` alert.
This restyles the notification to be slightly lighter green and have
styles that are more compatible with dark mode, along with removing
dead styles.
2017-12-06 16:48:08 -08:00
Brock Whittaker 83d9844fcd compose: Center "x" vertically and horizontally on cross-stream warning.
On the warning that occurs when you are cross posting to a different
stream, move the “x” to be vertically centered and horizontally aligned
with the”x” on other warnings in the compose box.
2017-12-06 16:48:08 -08:00
Brock Whittaker 0e4eef6ef0 dark-mode: Make bankruptcy modal dark-mode compatible.
This makes the bankruptcy modal compatible with dark mode by adding the
`.modal-bg` class to switch it to dark mode, and by setting a darker
background and border color to the modal header.
2017-12-06 16:48:08 -08:00
Brock Whittaker a5da6265eb dark-mode: Make all states of navbar <li> dark mode compatible.
This fixes and adds to the logic in commit `525e8e3`. That commit
would only have the stream be the correct color if it was active,
but really it should be dark text by default regardless of whether
it is the active tab bar list item.
2017-12-06 16:48:08 -08:00
cPhost 8d0ccd29fe narrow_state: Make set_compose_defaults return opts. 2017-12-03 14:01:19 -08:00
Rishi Gupta f6071e0d90 compose typeahead: Add newline and other terminal_symbols. 2017-12-01 07:17:30 -08:00
Rishi Gupta 8b1c3c00e8 plans: Make the feature thead separator narrower. 2017-12-01 07:14:19 -08:00
Rishi Gupta 58a20b3e96 plans: Change the positioning of the commercial hosting price. 2017-12-01 07:14:19 -08:00
Alena Volkova 3be8e95d13 settings: Send bot types from the backend instead of hardcoding them. 2017-11-30 15:28:53 -08:00
Rishi Gupta eebef9e9de portico: Update /for/mystery-hunt. 2017-11-30 15:01:33 -08:00
Brock Whittaker 2a7ea5ca53 dark-mode: Change star color to be lighter.
This changes the star color to be lighter and visually softer to be
easier to spot in the page.
2017-11-30 14:40:28 -08:00
Brock Whittaker 5735f8251b dark-mode: Make typeaheads dark mode compatible.
This makes the typeaheads dark-mode compatible by changing to the
background to be dark and the text to inherit from the body text
(rather than bootstrap’s default of #333).
2017-11-30 14:40:28 -08:00
Brock Whittaker 9d255ac7de dark-mode: Respect ".no-style" attr on buttons.
This respects the ".no-style" declaration on buttons and sets
the background back to transparent in dark mode (from a slightly
darkened background).
2017-11-30 14:40:28 -08:00
Brock Whittaker 6d5835773e Informational-overlays: Change "Search Operators" red to better red.
The color of red it was was pretty terrible, so this changes it to a
better shade that also just happens to look good with dark mode.
2017-11-30 14:40:28 -08:00
Brock Whittaker 525e8e36d7 dark-mode: Fix tab list stream to not inherit color.
The streams can be light and if it inherits the white text color they
will not be readable. It should default to dark text with the exception
of when the tab is is `.dark-background`, in which case then it should
revert to inheriting the white color.
2017-11-30 14:40:28 -08:00
Brock Whittaker 03c15fd9dc dark-mode: Change edit notice medium grey to translucent.
This changes the font color from a medium grey to the base font color
plus an opacity of half.
2017-11-30 14:40:28 -08:00
Brock Whittaker 675cb8599d message-feed: Increase font weight of "(EDITED)".
This increases the font weight from 300 to 400 to increase visibility
of the edit notice in messages.
2017-11-30 14:40:27 -08:00
Brock Whittaker 180dee5c5e message-feed: Remove unnecessary text shadow on date row.
This removes an unnecessary text shadow from the message feed date rows
that doesn’t show on white backgrounds and looks unreadable on dark
ones.
2017-11-30 14:40:27 -08:00
Brock Whittaker f6bbc1f274 dark-mode: Change date row from medium grey to translucent.
This changes the color from a medium grey to a translucent that
inherits the base text color.
2017-11-30 14:40:27 -08:00
Brock Whittaker 4f81bdd0a6 message-edit-history: Make dark mode compatible.
This makes the edit history overlay dark mode compatible by changing
the background to the dark blue along with changing the highlight
colors to work with white text and dark backgrounds.
2017-11-30 14:40:27 -08:00
Brock Whittaker 625c163ba0 dark-mode: Convert medium grey to translucent base color.
This changes the message time from a medium grey to something that is
translucent base color instead.
2017-11-30 14:40:27 -08:00
Brock Whittaker b2194e860b message-feed: Reduce animation time for date.
This reduces the animation time for the message date to about half.
2017-11-30 14:40:27 -08:00
Brock Whittaker 80b68c3e2b message-edit-history: Increase font weight of author.
This increases the font weight of the author to be a normal font weight
rather than a thin one since it’s already too faint to see on many
monitors.
2017-11-30 14:40:27 -08:00
Brock Whittaker 7883897165 muted-topics: Enable dark mode for mute notifications.
This enables dark mode by changing the background to a dark color
in the stream/topic mute notifications.
2017-11-30 14:40:27 -08:00
Brock Whittaker afce6b18bf muting: Change muting overlay to use standard buttons.
This changes the overlay “Unmute” button to use the default `.button`
style.
2017-11-30 14:40:27 -08:00
Brock Whittaker bc11b0f1e8 Revert "dark-mode: Remove unnecessary CSS and fix dark mode bugs."
This reverts commit 64381b6e38.

It turns out we actually needed this for inline code blocks to work.
2017-11-30 14:40:19 -08:00
Brock Whittaker 30475ba4c4 Sidebars: Add border radius to hovered <li>.
This adds a border radius the the <li> to make the selections and
hover areas look a bit more polished and clean.
2017-11-30 14:34:31 -08:00
synicalsyntax 6e353a0550 hotkeys: Clear compose box warnings with escape key.
Fixes #7531.
2017-11-30 11:55:50 -08:00
Brock Whittaker e0236646bf night-mode: Add custom CSS through JS.
This adds custom CSS through JavaScript for things that do not
scope well and will override other inherited styles.

This should ONLY be used for problematic CSS that has no obvious
or easy CSS-only solution.

(Specifically, we need this for the "default link" styling, which is
hard to override because we don't want to start winning ties due to
specificity that we would not have won in the light theme).
2017-11-29 23:06:11 -08:00
Brock Whittaker e7ec21b4cf dark-mode: Add pigments support for dark mode.
This adds support for dark mode pygments that are good syntax
highlighting colors to be seen on a dark background.
2017-11-29 16:44:43 -08:00
Brock Whittaker a7c2258e12 dark-mode: Change drafts container to be dark.
This changes the drafts container to be dark.
2017-11-29 16:44:43 -08:00
Brock Whittaker 387bdd34c7 dark-mode: Change top-of-messages colors for dark mode.
Make it a white background with the “Z” in the same dark grey/blue
color as the background.
2017-11-29 16:44:43 -08:00
Brock Whittaker d883f3308c dark-mode: Refactor top-of-messages logo to have CSS styles.
This changes the fill and stroke styles to be in CSS rather than
inlined in the SVG, making it easier to change and override elsewhere.
2017-11-29 16:44:43 -08:00
Brock Whittaker a2729c52d0 dark-mode: Fix incorrect hover colors on `.stream_label`.
The headers on some dark stream labels would turn dark and and on some
light turn light. This makes sure that does not happen.
2017-11-29 16:44:43 -08:00
Brock Whittaker 618455c7aa dark-mode: Fix invite overlay to have a dark background and borders.
This changes the modal background to be dark and changes the header
border to be darker instead of lighter like the subs and settings ones
are.
2017-11-29 16:44:43 -08:00
Brock Whittaker 836bfd8f45 dark-mode: Refactor gear-menu icon to be translucent.
This makes the gear-menu icon translucent rather than medium grey and
black (which isn't even our base text color) to be half opaque (approx)
and base text color.
2017-11-29 16:44:43 -08:00
Brock Whittaker e37838c926 dark-mode: Refactor compose icons to be translucent.
This makes the compose icons translucent rather than medium grey
and black (which isn't even our base text color) to be half opaque
(approx) and base text color.
2017-11-29 16:44:43 -08:00
Brock Whittaker edffa56c51 dark-mode: Style alerts to be darker red.
This styles the alerts to be a darker red that blends more with the
blue dark mode theme.
2017-11-29 16:44:43 -08:00
Brock Whittaker 89b38ff87d dark-mode: Change all links to be brighter blue on hover.
This changes the links to become more emphasized by being brighter
rather than darker since they’re on a dark background.
2017-11-29 16:44:43 -08:00
Brock Whittaker 76f6051a1e dark-mode: Change popover arrows to all be dark.
This changes the position-based arrows on popovers to all be dark
rather than light grey.
2017-11-29 16:44:43 -08:00
Brock Whittaker ad9c71b4b1 dark-mode: Change emoji reaction overlay to be dark mode compatible.
This changes it to be compatible with the dark-mode which involves one
change to light mode of changing a grey to a translucent white in
reactions.css.
2017-11-29 16:44:42 -08:00
Brock Whittaker 1716d69c35 dark-mode: Fix @-mention colors.
This fixes mention colors for dark mode.
2017-11-29 16:44:42 -08:00
Tim Abbott 377cad7dc2 css: Deduplicate user-group-mention CSS.
These CSS rules were identical before, anyway.
2017-11-29 16:43:46 -08:00
Brock Whittaker e62ba13887 dark-mode: Change `background-image` and `background-color` to background.
There isn’t any reason for either of these mention code paths to be
using specified background types, so convert them all to background so
inheritance is more simple.
2017-11-29 16:42:07 -08:00
Brock Whittaker 1e03c15758 settings_display: Change dev check to correct attribute.
For setting the night mode, it checks to see if you’re in development
by checking `page_params.development`, but the actual attribute is
`page_params.development_environment`.
2017-11-29 16:40:18 -08:00
Brock Whittaker 64381b6e38 dark-mode: Remove unnecessary CSS and fix dark mode bugs. 2017-11-29 16:40:18 -08:00
Rohitt Vashishtha 621d5dc9df typeahead: Show typeahead only if cursor is before space or punctiation.
This solves the issue with typeahead appearing in the middle of an
already-completed typeahead word.

Example: Earlier, '@ran|dom' would also trigger the typeahead and show
'random', but selecting it would turn it into '@**random** dom'.

We still have a problem to solve of preventing typeahead from
appearing on a space in the middle of an already-completed typeahead
word, but that is its own independent bug.
2017-11-29 14:53:14 -08:00
Brock Whittaker 176e4a293b lightbox: Allow for clicking top and bottom to close overlay.
The top and bottom sections of the lightbox overlay do not close the
lightbox when clicked. Now, this triggers the close_overlay path when a
valid non-actionable background element is clicked.

Fixes: #7500.
2017-11-29 11:26:58 -08:00
Cynthia Lin 3d6340ef31 subs: Add padding to Announce stream tooltip content.
Fixes #7474.
2017-11-29 09:51:35 -08:00
Umair Khan 4a0c372de4 get_user_group_from_name: Remove existence check.
Using user_group_name_dict.get() will return `undefined`.
`blueslip.error` statement caused an exception notification to the
admins.

Tweaked by tabbott to add a test for a nonexistent group.
2017-11-29 09:36:04 -08:00
Rishi Gupta 191f8f1b39 left sidebar: Change Home to All messages.
We made this change because users often unnecessarily click "Home"
first in their use of Zulip, because it seems appealing.  While "All
messages" isn't quite precise (it doesn't include muted streams), it
does describe relatively simply the interleaved view that this
represents.

This commit leaves everything as "home" in the code, and only changes
user-visible strings and docs. Changing the code will be a big project;
there are hundreds of relevant occurrences in variable names, etc.

Further, we'll probably want to convert those various variable names
in different ways.

Tweaked by tabbott to extend the commit message and update a few comments.
2017-11-28 15:42:58 -08:00
Tommy Ip 6e22847548 refactor: new message content -> compose textarea. 2017-11-28 12:53:40 -08:00
Cynthia Lin e92a8ac8ee subs: Properly focus on Stream name box while creating a new stream.
Fixes #7473.
2017-11-28 10:07:11 -08:00
Garvit b9826e9067 Add filters for toMarkdown to paste data to compose-box.
This fixes bugs with pasting headings and italic styling.

Fixes #7485.
2017-11-28 09:56:48 -08:00
Tommy Ip 29e9d16ac7 refactor: s/upload-bar/compose-upload-bar. 2017-11-27 21:35:14 -08:00
Tommy Ip 6a694418b2 refactor: s/error-msg/compose-error-msg. 2017-11-27 21:35:14 -08:00
Tommy Ip b9c2f479d3 refactor: s/send-status-close/compose-send-status-close. 2017-11-27 21:35:14 -08:00
Tommy Ip c0c58f9761 refactor: s/send-status/compose-send-status. 2017-11-27 21:35:14 -08:00
Tommy Ip ddaff4cd2a refactor: Extract upload mechanics to new JS module.
Tweaked by tabbott to move changes from the next commit that are
required for this to pass tests into this commit.

Note that this exports a few items that were not previously exported.
2017-11-27 21:31:51 -08:00
Tim Abbott 0445322625 compose: Export the major upload-related methods.
This is a preparatory commit to moving these to their own module.
2017-11-27 21:31:24 -08:00
Tim Abbott df58f0f7ae compose: Export some upload-related variables. 2017-11-27 21:31:23 -08:00
Rishi Gupta 83149a953a copy paste: Turn off toMarkdown in production.
At least until some of the TODOs at the bottom of
node_tests/copy_and_paste.js are done.
2017-11-27 16:44:16 -08:00
Rohitt Vashishtha 8082780853 typeahead: Update @mention to not autocomplete "@ " (@space).
Tweaked by tabbott to also cover "@** ".

Fixes #7533.
2017-11-27 15:15:56 -08:00
Steve Howell 025b8c19ae Simplify code to warn about private stream links.
This change does a few things:

    * I use "early return" to make the code a bit flatter
      and easier to comment.

    * I added more comments.

    * I removed some unneeded passing of `invite_only` into
      the template.
2017-11-27 10:41:10 -08:00
Umair Khan 8f190e0746 user-groups: Update marked.js to do proper local echo for mentions.
We implement markdown in the JS as well to improve the
usability.  Comes complete withunit tests.

Fixes #7381.
2017-11-27 09:16:09 -08:00
Umair Khan 9d0eea8dd1 user-groups: Add is_member_of. 2017-11-27 09:08:30 -08:00
Rhea Parekh 1d826ae201 composebox: Warn when linked to private streams.
Fix issue #6860
2017-11-27 07:41:59 -08:00
Rohitt Vashishtha be56a99734 popover: Populate compose_box with popover user's email.
Replaces use of compose.respond_to_message with compose.start, manually
populating the email field with the popovered user's email.

Fixes #7526.
2017-11-26 22:59:37 -08:00
Shubham Dhama 5e23bfa779 typeahead: show typeahead for syntax of the from @**... or #**...
Fixes: #7494.
2017-11-26 11:18:47 -08:00
Balaji2198 585cd36a2e setting: Align elements properly in invite users.
Adds a margin-top to `Check all` and `Uncheck all` elements.

Fixes #7488.
2017-11-26 09:13:33 -08:00
Eeshan Garg 15bf0ebc61 css: Fix overflowing long URLs in Markdown macros.
Long URLs in Markdown macros overflow their containers without this
property. This reverts 0dc91a9148.  We
will likely need to fix the original Windows bug that
0dc91a9148 has resolved another way.
2017-11-25 17:02:38 -08:00
Tim Abbott 13a1b44aa8 settings: Fix missing target=_blank on realm emoji images.
This resulted in problems with the desktop app, where clicking these
links would leave the user in a situation where they needed the "back"
button in order to get back to the webapp.

Fixes zulip/zulip-electron#342.
2017-11-25 09:43:01 -08:00
Robert Hönig 0dc91a9148 css: Fix code blocks overflowing for integration names. 2017-11-24 09:26:08 -08:00
Cynthia Lin b607d26f0a lightbox: Fix image metadata not displaying at full width when possible. 2017-11-24 09:21:31 -08:00
akashnimare 271c3c1101 portico: Fix portico dropdown bug.
This fixes a responsiveness bug where the portico dropdown was not
showing up properly in a mobile view.
2017-11-23 15:56:50 -08:00
Tim Abbott 1152246993 Revert "reactions: Change from grey to translucent."
This reverts commit 30f45ac061.

This commit caused problems with the compose box emoji picker
overflowing its bounds in Firefox at 90% zoom.
2017-11-23 14:55:00 -08:00
Tim Abbott 4d4532a27e copy_and_paste: Add a simple extensible test suite.
This commit is mostly about adding the test suite; some of the results
are things we'd like to change.
2017-11-23 12:59:01 -08:00
Andy Perez e7f1825617 bugdown: Update KaTeX to version 0.8.3 from 0.7.1.
Fixes #7480.
2017-11-23 12:43:34 -08:00
Greg Price 47abd9c522 i18n: Update translations (including complete Korean!) 2017-11-22 18:11:20 -08:00
Steve Howell 59870b2203 Make dark theme toggle only run in dev mode. 2017-11-22 16:13:09 -08:00
akashnimare a37e993907 portico: Remove unnecessary background from realm-icon.
This PR removes unnecessary white background from realm-icon.
Also, I have given padding and border-radius to make it look good.

This also fixes a bug where realm-name didn't show up because of the
white font color.
2017-11-22 15:00:22 -08:00
Tommy Ip f425f9ad3d navbar: Fix transparency issue. 2017-11-22 13:02:13 -08:00
Andy Perez 0449dc8b8a bugdown: Fix handling of nested fenced math blocks.
Change any fence delimiters (backticks and tildes) to be
interpreted literally inside of math fenced_code blocks.

Fixes #5190.
2017-11-22 12:19:43 -08:00
Tommy Ip db240de555 /team: Make the contributor list more fair.
Don't display contributors with less commits than the 100th server
contributor (the Github API limits the output of users to 100).
2017-11-22 11:33:24 -08:00
Tommy Ip e44b8809b2 /team: Render contributors list in tabs client side. 2017-11-22 11:33:24 -08:00
Cynthia Lin e071d27b6b lightbox: Fix text overflow of translated user interface.
Fixes #7469.
2017-11-22 09:56:30 -08:00
Garvit 52069998eb compose: Preserve links when pasting html.
This uses the to-markdown.js library to do all the hard work of
parsing HTML and turning it into markdown and not e.g. uploaded files.

Tweaked by tabbott to better scope when it activates to just include
pastes of HTML content.

Fixes #5853.
2017-11-21 19:52:47 -08:00
Tim Abbott 9fa58a3c16 compose_ui: Automatically resize textarea after adding new syntax.
This fixes existing problems as well as an upcoming problem that
copy-and-pasting in markdown should usually expand the compose text
area.
2017-11-21 19:52:47 -08:00
Vishnu Ks 34689370cd settings: Create UI and backend for setting signups stream. 2017-11-21 17:39:51 -08:00
Tim Abbott 84b9147fe3 gitignore: Add static/generated/icons. 2017-11-21 09:27:04 -08:00
Rohitt Vashishtha 5221ea5db5 settings: Make CSS selector more specific in table rows in org settings.
Fixes #7374. Since we use `table-layout: fixed`, the width of the first
row are applied to all the remaining rows, thus wrapping all the columns
to 20% width. This is fixed by making the selector specific to only
user_rows and not the editable data row.
2017-11-21 09:12:55 -08:00
Steve Howell 4a6c3eeb98 Use realistic filepaths in zuliprc docs and hints.
The first part of this change is to have the "Your bots"
tooltip not lie about creating `.zuliprc`, because it
doesn't put a dot in front of the file.

And then the more significant change here is to make
the "Running a bot" documentation use realistic filepaths,
both in terms of where the download typically puts the file,
and where you want to move it to.
2017-11-21 07:32:24 -08:00
Cynthia Lin aa50fae4ba portico: Add anchor link support to API and user docs.
Fixes #7432.
2017-11-20 17:23:19 -08:00
akashnimare 9d973129ab user docs: Update compose box screenshots. 2017-11-20 17:14:01 -08:00
rht bff736868e Generate custom-icon-webfont on each provision or update-prod-static.
Fixes #7354.
2017-11-20 16:36:49 -08:00
Harshit Bansal 8a4fc9970f reactions.js: Migrate webapp to use the new reactions API.
Fixes: #6909.
2017-11-20 15:27:20 -08:00
Tommy Ip 3a397b2f2d /team: Left align BDFL name and role in non-mobile UI. 2017-11-20 09:44:17 +00:00
derAnfaenger 73915a9631 docs: Move integration docs to /api. 2017-11-17 11:58:54 -08:00
Umair Khan 06b57e8512 style: Merge css of social login/register buttons. 2017-11-17 11:44:13 -08:00
Andy Perez 83f563aeff bugdown: Properly parse empty blockquotes.
The character ">" now only starts a blockquote if the resulting
blockquote would be non-empty.  Thus, by itself, ">" is now
interpreted literally by bugdown, fixing #687.  The message
with contents consisting of ">>>" is now parsed as a doubly
(not triply) nested blockquote with contents ">".  Properly
formed blockquotes have identical behavior as before, but now
bugdown can no longer produce empty blockquotes as output.

Fixes #2886, #687.
2017-11-17 11:41:44 -08:00
Andy Perez bdaf3275f7 message feed: Fix display height of empty messages.
Ideally, empty messages are never created.  However, sometimes even
non empty messages can act as if empty, such as one consisting only
of an opening and closing blockquote tag.  This sets the
.message_content to have a minimum height equal to the line height.
This is overridden with zero (the default) in the case of collapse.
2017-11-17 11:40:22 -08:00
Brock Whittaker 2b6587c6bf overlays: Move overlays earlier in index.html.
It appears as though the ordering of the overlays in the DOM is
overriding their z-index in Safari on mobile. This moves them up to
the top of the template ahead of the header so that the header will no
longer display above the overlays in positioning.

Fixes: #7248.
2017-11-17 11:03:08 -08:00
Brock Whittaker 4fb7292dd4 message-feed: Add dark mode support for inline code. 2017-11-17 10:30:24 -08:00
Brock Whittaker 874598b291 left-sidebar: Change icons to be translucent.
This changes the icons to be translucent rather than grey and also
makes them get darker on hover rather than lighter (which didn’t really
make sense) on the normal theme.
2017-11-17 10:30:24 -08:00
Brock Whittaker 5081294c5b streams: Remove unnecessary font color declaration, change to translucent.
This changes a declaration from grey to translucent and another to
remove an unnecessary color declaration.
2017-11-17 10:30:23 -08:00
Brock Whittaker 015cd65e8f message-feed: Change borders from grey to translucent.
This changes the borders from grey to translucent and bins them to the
nearest tenth of opacity.
2017-11-17 10:30:23 -08:00
Brock Whittaker 7d2607c919 settings: Change borders from grey to translucent.
This also changes the .settings-section table borders to be darker
which keeps it inline with the rest of the styling.
2017-11-17 10:30:23 -08:00
Brock Whittaker 30f45ac061 reactions: Change from grey to translucent.
This keeps the look the same on a white background but works better on
color backgrounds, as it shares a similar saturation.
2017-11-17 10:30:23 -08:00
Brock Whittaker d13e556923 reactions: Remove unecessary color declaration. 2017-11-17 10:30:23 -08:00
Brock Whittaker e14e61c22e compose: Change borders from gray to translucent.
This works better on color backgrounds while staying the same on white.
The compose input borders are also darkened slightly.
2017-11-17 10:30:23 -08:00
Brock Whittaker 83f329b41a components: Change checkboxes from grey to translucent.
This works better with color background and looks the same on white.
2017-11-17 10:30:23 -08:00
Brock Whittaker aeed2e6863 dark-mode: Remove unnecessary CSS and fix dark mode bugs. 2017-11-17 10:30:18 -08:00
Brock Whittaker 151e5b0e51 app: Remove column-middle background color.
The declaration making the background color white seems to be
unnecessary.
2017-11-17 08:44:04 -08:00
Brock Whittaker f5f217570c message-feed: Change private message blue to be translucent.
This looks the same on white, different on dark blue.
2017-11-17 08:44:04 -08:00
Brock Whittaker 2d9a570ceb drafts: Remove unnecessary white background on messages.
This removes the white background behind the messages that isn’t useful
since they are already on a white background.
2017-11-17 08:44:04 -08:00
Brock Whittaker 53616cc714 gear-menu: Inherit body color.
Instead of overriding the default link color with grey, just inherit
the body color.
2017-11-17 08:44:04 -08:00
Brock Whittaker a77b41dce4 navbar: Remove background attribute on search bar.
This removes the background color declaration on the search bar so it
can inherit the standard input background color.

navbar: Let search bar inherit from base color.
2017-11-17 08:44:04 -08:00
Brock Whittaker 3df96a27cc message-feed: Make stream labels inherit color.
Instead of overriding the default link color with grey, just inherit
the base color.
2017-11-17 08:44:04 -08:00
Brock Whittaker ff39aa0eb5 message-feed: Remove white backgrounds on messages.
They aren’t necessary either I don’t believe.
2017-11-17 08:44:04 -08:00
Brock Whittaker cd3ea16785 navbar: Remove white background.
It’s never been necessary afaik.
2017-11-17 08:44:04 -08:00
Brock Whittaker e0e7c0091b compose: Change from grey to translucent black. 2017-11-17 08:44:04 -08:00
Brock Whittaker 3c4900205c streams: Fix width bug with stream creation form footer.
The footer was a few pixels short and would create a gap in the bottom
right hand corner of the streams overlay when the stream creation flow
is open.
2017-11-17 08:44:04 -08:00
Brock Whittaker 1514ea9be6 streams: Inherit base color rather than redefining text color.
This also removes an unecessary font-weight declaration that
was immediately being overridden.
2017-11-17 08:44:04 -08:00
Brock Whittaker efb7206756 settings: Change grey colors to translucent black. 2017-11-17 08:44:04 -08:00
Brock Whittaker e806300b51 settings: Use `.modal-bg` class to control background color.
This lets the `.modal-bg` class dictate background color instead of
manually setting it for all modals.
2017-11-17 08:44:04 -08:00
Brock Whittaker 537c1c211b right-sidebar: Remove base color definition.
The right-sidebar should just inherit the color of the body, not invent
a new lighter shade of grey.
2017-11-17 08:44:04 -08:00
Brock Whittaker 3ebccda703 left-sidebar: Make <ul> links inherit body color.
The links were overridden with a dark grey to not display normal link
color but should really just inherit the body color.
2017-11-17 08:44:04 -08:00
Brock Whittaker 9852861f8a compose: Change white background to be on #compose.
This changes the white background placement to be on #compose rather
than .compose-content.
2017-11-17 08:44:04 -08:00
Brock Whittaker ca46a2152b popovers: Restyle border-bottom below avatar in user popovers.
This styles the border-bottom to be an opacity based solution to
work the same with the normal mode and better with dark mode.
2017-11-17 08:44:04 -08:00
Brock Whittaker 16d06c6a78 portico-header: Remove border between image and realm name.
This removes the border between the realm image and the realm name in
the portico header that is shown when logged in.
2017-11-16 16:03:24 -08:00
Tim Abbott 638eb7a8e4 docs: Update links to ReadTheDocs to always use https.
This is better security practice.

We also add a lint rule to enforce this for the future.
2017-11-16 10:59:24 -08:00
Tim Abbott 054952a44a docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00
David Rosa Tamsen 7072fa5b37 docs: Reorganize developer docs to improve navigation.
This commit helps reduce clutter on the navigation sidebar.
Creates new directories and moves relevant files into them.
Modifies index.rst, symlinks, and image paths accordingly.

This commit also enables expandable/collapsible navigation items,
renames files in docs/development and docs/production,
modifies /tools/test-documentation so that it overrides a theme setting,
Also updates links to other docs, file paths in the codebase that point
to developer documents, and files that should be excluded from lint tests.

Note that this commit does not update direct links to
zulip.readthedocs.io in the codebase; those will be resolved in an
upcoming follow-up commit (it'll be easier to verify all the links
once this is merged and ReadTheDocs is updated).

Fixes #5265.
2017-11-16 09:45:08 -08:00
Tommy Ip acdc4c9d27 /team: Improve the responsiveness of the team profiles.
Fixes #7349
2017-11-15 17:08:08 -08:00
Tommy Ip 0bd09398d8 /team: Use CSS grid for contributors table. 2017-11-15 17:08:08 -08:00
Aastha Gupta c84f1686b7 emoji: Display emoji in messages as text as well as reactions.
Fixes #6795.
2017-11-15 16:59:11 -08:00
Brock Whittaker b76578ca13 Add an experimental dark mode stylesheet.
Note from tabbott: While this initial version is experimental and
definitely incomplete, we expect to have a solid version done over the
next few weeks (after more refactoring).  We're merging this now to
make it easy to test both versions when refactoring our CSS.

Fixes #267.
2017-11-15 16:45:34 -08:00
Brock Whittaker ce62abce73 dark-mode: Add "T" hotkey for dark mode theme. 2017-11-15 16:45:34 -08:00
Brock Whittaker f9f0f356be settings: Add backend storage and interface for night mode.
This allows the night mode setting to be stored in the backend.
2017-11-15 16:36:06 -08:00
Brock Whittaker 2c000c0f1d settings: Increase specificity of sidebar <li> selector.
This was interfering with <li> elements outside of the settings page.
2017-11-15 13:42:44 -08:00
Brock Whittaker 744c4af958 left-sidebar: Remove topics help code.
This removes code associated with the dead topic help feature that is
below “more topics”.
2017-11-15 11:01:33 -08:00
Florian Jüngermann b31917be1d frontend: Remove redundant stream separator in the left sidebar.
In the case of no 'normal' streams (only pinned and dormant ones) there are two separators
between the groups of streams. My commit removes one.
2017-11-15 10:06:25 -08:00
Cynthia Lin d5a3691561 media: Display stream list filter at full width. 2017-11-14 11:12:13 -08:00
Cynthia Lin 940ca17c46 hotkeys: Expand collapsed sidebars when sidebar searches are initiated.
Fixes #7351.
2017-11-14 11:12:13 -08:00
Cynthia Lin 7d2672cfcd popovers: Include expanded mobile sidebars as active popovers. 2017-11-14 11:12:13 -08:00
Steve Howell 99ecb51c5f minor: Add whitespace after commas in CSS. 2017-11-13 12:43:43 -08:00
Steve Howell f35b7b4c77 css: Convert colors to hsl() format.
This changes most of the app-related CSS files, but leaves
things like landing pages and bootstrap alone.
2017-11-13 12:43:43 -08:00
Steve Howell ba51078418 Simplify CSS linter and clean up CSS.
The CSS linter was pretty hard to reason about.  It was
pretty flexible about certain things, but then it would
prevent seemingly innocuous code from getting checked in.

This commit overhauls the pretty-printer to be more composable,
where every object in the AST knows how to render itself.  It
also cleans up a little bit of the pre_fluff/post_fluff logic
in the parser itself, so comments are more likely to be "attached"
to the AST node that make sense.

The linter is actually a bit more finicky about newlines, but
this is mostly a good thing, as most of the variations before
this commit were pretty arbitrary.
2017-11-13 12:43:43 -08:00
Umair Khan 597a6e6c74 user-groups: Add user groups in typeahead code. 2017-11-13 11:42:17 -08:00
Umair Khan 0e21cbc5d9 user-groups: Create static/js/user_groups.js. 2017-11-13 13:08:15 +05:00
Brock Whittaker 7b4124b7b4 portico-header: Add background to avatar images.
This adds a white background color to avatar images that may
have a transparent background.
2017-11-10 19:25:42 -08:00
Brock Whittaker ca2f93db31 settings: Restyle "emoji style" section.
This restyles and rewords some of the emoji style section to look
better and fit it more with the current style guide.

Tweaked by tabbott to modify the historical migration rather than
adding a new one.  This is OK because the emojiset choices text change
doesn't touch the database; it's just a Django Python code thing.

Also removed translation tags, since we don't need them for a set of
brand names.
2017-11-10 17:04:27 -08:00
Harshit Bansal 439bc2920a settings: Change the control for selecting emojiset to radio group.
Fixes: #7260.
2017-11-10 16:59:03 -08:00
Andy Perez 4d51a6cfac bugdown: Fix $$ whitespace handling.
The intended use of $$ is for inline expressions, not for multiline
ones; ```math is an acceptable alternative for the latter.  Hence,
the $$-syntax for inline TeX no longer permits newlines within it.

This was also necessary for the next change to be sensible; namely
allowing for spaces around both $$ when crafting inline TeX instead of
forcing everything to be crammed together, e.g. $$x=7$$.  In order to
avoid uninentionally creating inline expressions, the opening and
closing $$'s of an inline expression must now both exactly consist of
two dollar signs, no more and no less.

Fixes: #6488.
2017-11-10 16:54:27 -08:00
Brock Whittaker 5ae4b8d3f3 input-pill: Add clean up functions.
This adds functions to remove pills and reset the state.
2017-11-10 14:14:03 -08:00
Brock Whittaker 70a14d8b44 bootstrap: Patch bootstrap.js to support contenteditable.
If the lookup input is contenteditable, it should be searching for text
rather than input.
2017-11-10 14:14:03 -08:00
Brock Whittaker 1bb45dd946 hotkey: Prevent hotkey interactions with pills.
This prevents hotkeys from firing when any of the pills or pill
input sections are focused.
2017-11-10 14:14:03 -08:00
Brock Whittaker 00d11fb0af input-pill: Add styling.
This adds some styling for the default case of the input pills and some
custom styling.
2017-11-10 14:14:03 -08:00
Brock Whittaker 5a0bba2afc input-pill: Add validation callback for pills.
This adds a validator that when calling `reject` will reject a pill
from being added.
2017-11-10 14:14:03 -08:00
Brock Whittaker 5d0aae283f input-pill: Add key/value caching.
Some of the calls in our codebase will call for the `.keys()` method a
lot, so this caches the results and returns them rather than mapping
the array if it knows the state to be the same as before.
2017-11-10 14:14:03 -08:00
Brock Whittaker 93141cbe39 input-pill: Have all clicks directly on container focus input.
If a user clicks on the pill container and not directly on a pill
or on an "x" inside of a pill, it should be presumed they are
trying to input new text. This effectively makes the whole non-pill
section an input bar.
2017-11-10 14:14:03 -08:00
Brock Whittaker 7b00736fa2 input-pill: Add "input_pill" class and documentation. 2017-11-10 14:14:03 -08:00
Brock Whittaker d27882325c hotkeys: Refactor text selectors to be array.
This makes it easier in the future to see diffs and to add/remove text
selectors for hotkey prevention.
2017-11-10 14:14:03 -08:00
Cynthia Lin 1bcc07f7dd popovers: Add bot icon to user profile popovers for bots.
Fixes #7176.
2017-11-10 11:18:43 -08:00
Cynthia Lin a3e5f2a887 message view: Use new custom bot icon in messages. 2017-11-10 11:18:43 -08:00
Cynthia Lin 0b800b0a7d icons: Create framework for custom icons and add new bot icon. 2017-11-10 11:18:42 -08:00
Umair Khan ef545b9180 user-groups: Add css for user-group-mention class. 2017-11-09 17:35:46 -08:00
Garvit 8084f2dc55 Add: Profile picture popover on clicking mentions in chats.
Fixes #6380
2017-11-09 12:21:16 -08:00
YJDave de67bf81fd org settings: Allow users to delete their message.
Fixes #7049.
2017-11-09 10:20:34 -08:00
Steve Howell d7254a0556 Append space as needed in compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell f935afa241 Prepend space as needed in compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell 1b1858aa64 node tests: Test compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell 12dc567a89 Move insert_syntax_and_focus() to compose_ui.js.
This change also removes a couple lines of test code that
weren't really testing anything.
2017-11-09 09:49:20 -08:00
derAnfaenger 19bc55aa45 Fix various typos.
The typos and their corrections were found with the
aid of https://github.com/lucasdemarchi/codespell.
2017-11-09 16:26:38 +01:00
Brock Whittaker 4817ba44a4 tab-switcher: Switch tabs with left/right arrows.
This now allows all tab switcher components to be used with left
and right arrows, given that a tab is already in focus, which is
the default behavior unless overridden (like on the streams
overlay).
2017-11-08 18:13:57 -08:00
Brock Whittaker 5b86b65818 message-feed: Do not autoscroll new messages if popovers open.
Do not attempt to autoscroll down to view new messages if popovers are
open. This prevents the issue where someone can be viewing a profile or
reacting to a message and not be able to due to a new message coming in.

Fixes: #7319.
2017-11-08 13:37:00 -08:00
Brock Whittaker 228b0c4290 /help/: Add a slide class for sidebars that should have slide mechanism.
This adds a slide class that specifies that the JS actions for sliding
up and down sections is the desired behavior, along with a bit of CSS
to help display correctly in the case of not being a sliding section.
2017-11-08 13:01:33 -08:00
Brock Whittaker 670f20248a /api/: Fix incorrect sidebar styling.
This rule is only applied to the API page which makes it inconsistent
with the /help/ page.
2017-11-08 13:01:33 -08:00
Brock Whittaker dfb3597eb2 left-sidebar: Remove leading whitespace underline on global filters.
This removes the leading whitespace that was approximately the width of
a space character that would get underlined when hovering over any one
of the global filters.
2017-11-08 12:29:40 -08:00
Steve Howell c2860ce214 Set client_gravatar=True in the webapp.
The webapp knows how to compute gravatar URLs, so there is no need
for the server to send us gravatar URLs.
2017-11-07 16:38:14 -08:00
Brock Whittaker 54ac11f2e1 left-sidebar: Fixup line height issues with unread counts.
This centers the text along with the unread counts vertically within
the <li> in the left sidebar.
2017-11-07 16:28:34 -08:00
Angelika Serwa 9930cb43cd stream_settings: Add loading spinner when creating a new stream.
Add a spinner for when a stream is being created to show that
an operation is being performed, while also disallowing users to
modify the form in the meanwhile.

Commit modified by Brock Whittaker <brock@zulipchat.com>.

Fixes: #5268.
2017-11-07 12:26:47 -08:00
Tim Abbott 17f3cbbb90 Revert "static: Optimize SVG images."
This apparently messed up the size of the bot icon on some browsers.

This reverts commit 7a6e0dda41.
2017-11-07 12:15:22 -08:00
Brock Whittaker 95f34b2a90 left-sidebar: Increase line-height to not cut off text bottom.
This increases the line height so it does not cut off the bottom of the
stream text in characters like “g”.
2017-11-07 10:57:00 -08:00
Brock Whittaker c5eaf303cc left-sidebar: Allow for more space for unread counts.
This leaves enough space for up to 100,000 unread message counts, which
perhaps above we should change to say something like “102K”.
2017-11-07 10:57:00 -08:00
Steve Howell f105c480b3 Calculate gravatar hashes on the webapp client.
This change prepares us to have the server send avatar_url
of None when somebody wants a gravatar avatar (as opposed
to a user-uploaded one).

Subsequent commits will change behavior on both the server
and client to have this happen.  So this commit has no-op
code for now, but it will soon use the fallback-to-gravatar
logic.
2017-11-07 10:36:02 -08:00
Steve Howell 7e4702c9c1 Avoid double-escaping HTML for settings notifications.
The i18n.t function already escapes HTML, so we should avoid
calling jQuery's text() method, which double escapes the HTML.

The symptom reported here was that if you changed your
timezone to something like like America/Mexico_City, you'd
see `&#x2F;` instead of `/`.

Most callers to the `ui_report` functions clearly call `i18n.t`
on the messages with code like this:

    ui_report.success(i18n.t("No changes to save!"), status);

There are some exceptions:

    blueslip.js: has really long hard coded messages
    reload.js: mostly says "Reloading...", which perhaps we should
               translate
    settings_account.js: uses helper functions
    settings_lab.js: uses local variable
    settings_org.js: i18n happens in property_types
    ui.js: uses generic_embed_error (unaffected by this change)

Fixes #7280
2017-11-07 09:52:20 -08:00
Steve Howell 567da076ad i18n: Translate strings in settings_account.js. 2017-11-07 09:52:20 -08:00
Steve Howell 2b6fee3c53 i18n: Translate deactivation errors in the webapp. 2017-11-07 09:52:20 -08:00
Steve Howell aa61db9301 Change warn -> error in people.report_late_add().
This commit is easy to revert if we want to tone down errors
to warnings for the short term, while our codepath still does
proper handling for adding users when they come in messages.
2017-11-07 09:51:10 -08:00
Steve Howell 02a011d627 Add people.report_late_add().
We want to know when users are added after page load, as it can
be a symptom of stray messages leaking in or live-update problems,
etc.

Fixes #7120
2017-11-07 09:51:10 -08:00
Steve Howell aebfdaa8ed refactor: Use early-return in extract_people_from_message(). 2017-11-07 09:51:10 -08:00
Steve Howell 294a1fb8f8 refactor: Extract people.maybe_incr_recipient_count().
This logic used to be in extract_people_from_message(), but
we are deprecating extract_people_from_message(), whereas
the maybe_incr_recipient_count() function has logic that we
want to keep.
2017-11-07 09:51:10 -08:00
Steve Howell c291c74e45 minor: Make comment more accurate in popover error condition. 2017-11-07 09:51:10 -08:00
Steve Howell 5271241b24 Read page_params.realm_non_active_users() at page load.
This change is the first step in making it so that we load
non-active users at page load time in the webapp.

Before this change, we would reactively handle deactivated
users when we saw them as senders in messages.  Subsequent
changes will make it a warning if we see unknown senders
in messages.
2017-11-07 09:51:10 -08:00
Steve Howell 48b18e4a38 Only show active realm users in compose typeahead.
There's no reason to include deactivated users in compose
typeahead, since we won't let the compose happen.

This also removes cross-realm bots from the typeahead, which
is mostly driven by not having a convenient function to include
them, but also it's rare that it makes sense to talk to a cross-realm
bot unless replying to it.
2017-11-07 09:51:10 -08:00
Cynthia Lin 7a6e0dda41 static: Optimize SVG images. 2017-11-04 20:57:19 -07:00
Cynthia Lin d94a84e77f static: Remove unused images. 2017-11-04 20:57:19 -07:00
Cynthia Lin f63585bd6d hotkeys: Ensure navigation hotkeys do not work while overlay is open.
Fixes #7123.
2017-11-03 15:38:10 -07:00
Cynthia Lin e7de4f5d74 hotkeys: Modify draft toggle behavior. 2017-11-03 15:38:10 -07:00
Brock Whittaker 4af9e11115 left-sidebar: Add overflow ellipsis on long stream names.
On stream names that don’t quite fit, we’ll add overflow ellipsis to
them. It appears we already did this on mobile in a sub-optimal way so
we can remove that media query with preference to the new, better
styling.
2017-11-01 13:27:42 -07:00
Brock Whittaker c9af964357 list_render: Add sorting reversal.
This allows a user to reverse the sort order by clicking again on an
active tab, which changes from ascending to descending order.

Fixes: #7254.
2017-11-01 13:26:40 -07:00
Brock Whittaker 26dd785b2b list_render: Use correct arrow for ascending.
Ascending files (as it currently is by default) should use an upwards
arrow.
2017-11-01 13:26:40 -07:00
Brock Whittaker fd19743098 settings: Fix scrolling on settings page in narrow height windows.
This allows a user to scroll all the way down on the sidebar and the
main panel in the settings page on narrow height windows by removing
the min-height specification and making the “Log out” line in the
sidebar become statically positioned at shorter heights.

Fixes: #7251.
2017-11-01 13:25:27 -07:00
Cynthia Lin ad374ad3c5 css: Fix improper indentation to fix Travis test failure. 2017-10-31 18:58:59 -07:00
Cynthia Lin 6a4e7ad12e user settings: Enhance Uploaded files sorting.
Fixes #7149
2017-10-31 18:33:41 -07:00
Cynthia Lin 5d9327a25b user settings: Improve Uploaded Files design.
* Prevent long file names from corrupting table display.

* Add sticky table header.

Fixes #7189.
2017-10-31 18:33:41 -07:00
Brock Whittaker 425738fa24 landing-page: Extract /team/ from /about/.
This extracts and creates a /team/ page using the existing
'team.html' template and applying the why-page styling to it.
2017-10-31 11:37:42 -07:00
Shubham Dhama aab0eeb5cc popovers: Hide opened popover on navigating back.
Hides popover if it remains open and an overlay such as the settings
UI is opened via the browser back button.

Fixes: #7230.
2017-10-31 08:47:00 -07:00
Tim Abbott 3104d3ea3e api: Fix rendering of code blocks after clicking sidebar links.
We need to call `render_code_sections` to show the code block for the
current language whenever switching which code block we're looking at.
2017-10-30 22:53:41 -07:00
Tim Abbott f01f596138 help: Merge api.js and help.js bundles to fix code blocks.
In addition to decreasing the excessive number of bundles we had, this
will set us up to fix rendering of code blocks when clicking the
sidebar links in the /api-new site.
2017-10-30 22:53:17 -07:00
Brock Whittaker e86e259cb1 /api/: Add Markdown-based /api-new documentation.
This commit allows for the /api-new/ page to rendered similarly to our
/help pages.  It's based on the old content for /api, but we're not
replacing the old content yet, to give a bit of time to restructure
things reasonably.

Tweaked by eeshangarg and tabbott.
2017-10-30 22:32:43 -07:00
Greg Price eb55a3a1ba template context: Give better names to the URLs for the API.
The "subdomain" label is redundant, to the extent it's even
accurate -- this is really just the URL we want to display,
which may or may not involve a subdomain.  Similarly "external".

The former `external_api_path_subdomain` was never a path -- it's a
host, followed by a path, which together form a scheme-relative URL.
I'm not quite convinced that value is actually the right thing in
2 of the 3 places we use it, but fixing that can start by giving an
accurate name to the thing we have.
2017-10-30 18:29:29 -07:00
Jack Zhang fef828a037 compose: Add video link button, powered by Jitsi. 2017-10-30 17:13:47 -07:00
Tim Abbott bb80c0cc24 compose_state: Extract insert_syntax_and_focus.
This moves the existing emoji picker code to a new library.
2017-10-30 17:12:56 -07:00
Harshit Bansal 5020ba4a20 emoji: Allow users to change emoji set.
This feature was merged in PR #4383 but was disabled due to some
remaining emoji infra changes.

Fixes: #209.
2017-10-28 10:38:33 -07:00
Catherine Kleimeier fe2adeeee1 hotkeys: Fix ESC removing message feed focus in Firefox.
We correct a bug on Firefox where using the ESC key to close an edit
box that was opened by the left arrow key caused the message feed to
lose focus, making it difficult to navigate the message feed by
keyboard afterwards.

We fix this bug by changing the function that handles the ESC key
during an edit to pass the correct object to the message_edit.end
function.

Fixes #7072.
2017-10-27 17:11:12 -07:00
Brock Whittaker 25251e0216 /about/: Create a team partial.
This creates a template for the /team/ page that is currently just
embedded inside the /about/ page.  This includes the titles for core
team members with their pictures.
2017-10-27 14:50:48 -07:00
Henrik Pettersson 09cd47c6ad Add UI for viewing and cancelling open Zulip invitations.
Lets administrators view a list of open(unconfirmed) invitations and
resend or revoke a chosen invitation.

There are a few changes that we can expect for the future:

  * It is currently possible to invite an email that you have already
    invited, it might make sense to change this behavior.

  * Resend currently sends an invite reminder instead of resending the
    original invite, this is because 'custom_body' was not stored when
    the first invite was sent.

Tweaked in various minor ways, primarily in the backend, by tabbott,
mostly for style consistency with the rest of the codebase.

Fixes: #1180.
2017-10-27 13:07:43 -07:00
derAnfaenger 45c21b79e1 settings ui: Restrict file type for image file pickers.
Previously, we would allow users to pick any file, even if we didn't
support that file type.
2017-10-27 10:21:36 -07:00
derAnfaenger 64025d2ce7 integrations: Add Errbot documentation.
Fixes zulip/python-zulip-api#49.
2017-10-27 09:22:51 -07:00
Brock Whittaker c771873439 informational-overlays: Make tab-switcher full-size.
The tab-switcher did not satisfy the full space of the header and
seemed to be a bit visually broken. This fixes it and makes it 100%
width.
2017-10-26 16:52:37 -07:00
Brock Whittaker 6500611ecd /plans/: Change FAQ section answers to <p>.
By changing the sections to paragraphs, the underlines come back
for the links.
2017-10-26 15:15:22 -07:00
Brock Whittaker 798133a403 landing-pages: Remove :hover underlines in unecessary places.
All links by default had an underline on hover, including when
<a> tags were wrapping <div> and <img> tags, which made for a small
underline near them on hover. This better focusses the underline
behavior to just paragraphs and lists.
2017-10-26 15:15:22 -07:00
Brock Whittaker a2a0e9b1c0 landing-page: Detect meta key to prevent page transitions.
This detects the meta key being pressed to open a page in a new
tab and therefore will prevent the page animation from fading out
the body content, in case the user wants to go back to that page
again.
2017-10-26 15:05:34 -07:00
Brock Whittaker 3d7fb4888b portico-header: Add down chevron to indicate dropdown.
This adds a down chevron to the pill org realm section to indicate
clicking it will drop it down.
2017-10-26 13:56:53 -07:00
Brock Whittaker 53d739f9aa portico-header: Add pill with org/realm name.
This adds a pill element that includes the org/realm name that you
are currently signed into.
2017-10-26 13:56:53 -07:00
Steve Howell df03e30d68 popovers: Fix is-active checks for popovers.
We were incorrectly reporting active bots as non-active in
popovers, and we had no test coverage for cross-realm bots.

We also rename the function to is_active_user_for_popover,
since the old name, realm_user_is_active_human_or_bot, suggested
the wrong semantics for cross-realm bots.

Last but not least, we only do a blueslip warning if a user id
is not found.  When lookups fail, we are pretty confident that
the user is not active, so an error is overkill.  We can change
that as part of issue #7120.

Fixes #7153
2017-10-26 13:56:32 -07:00
Brock Whittaker ae9d686d26 features: Make more responsive.
This fixes some responsiveness issues with the features page where the
text for headers would go off the screen on mobile and narrower devices.
2017-10-26 11:01:20 -07:00
Brock Whittaker e20dd2f1fc features: Add constraints to message-feed image.
This adds two constraints to the image:

1. The `max-width` can not be more than 500px (which prevents it
from being to vertically tall.
2. The `display` is set to `none` below 1024px because the image is
too small at that point to be legible.
2017-10-26 11:01:20 -07:00
Steve Howell f8f4d9cb63 people.js: Rename realm_get -> get_active_user_for_email.
We rename this function to be more clear, and we also remove
a stray function name for `realm_get` that was for the wrong
exported function.
2017-10-26 09:52:42 -07:00
Steve Howell 2699a6aac9 refactor: Extract people.is_valid_email_for_compose().
It's easier to unit test logic inside of people.js than compose.js.

We allow users to compose emails to any of our cross-realm bots.
Someday we may tighten up which cross-realm bots are valid targets,
since it's not necessarily the case that those bots do anything
useful when you send them messages.
2017-10-26 09:45:08 -07:00
Steve Howell 8cf5e05827 Rename realm_people_dict -> active_user_dict.
This dictionary includes bots, so the reference to
"people" in the name `realm_people_dict` was misleading.

We omit `realm` for brevity sake--it's usually the case
that folks implementing new features can safely ignore
cross-realm bots, and it's on our roadmap to move those
bots into the realm.
2017-10-26 09:26:28 -07:00
Steve Howell 646bd356a3 Rename get_realm_human_user_ids -> get_active_user_ids.
The function name `get_realm_human_user_ids` was a lie--it
includes active bots as well.

The only user of this function is `activity.js`, which wasn't
impacted by the misleading name, because we eventually filter
out bots in the `info_for` function.

It's possible that we actually want to include bots in the right
sidebar, since they can be difficult to discover in other parts
of the UI.  Or, if we want to keep the right sidebar as all
human users, we may eventually want to make the logic to exclude
bots happen higher in the stack (but for real, this time).
2017-10-26 09:17:43 -07:00
Brock Whittaker 03805fdca4 landing-page: Remove incorrect gray text.
This changes some text that would display gray when on a blue body
text page; we considered changing the opacity instead, but probably we
should just delete this..
2017-10-25 16:49:42 -07:00
Brock Whittaker f885ec82db landing-page: Make <ul> formatting consistent.
This changes the <ul> styling so that when not nested in a <p>
tag it'll have the standard font-weight (400) and be the same
color as the body text (blue/gray).
2017-10-25 16:36:31 -07:00
Brock Whittaker fd779c1ba6 compose: Remove PM recipient box outline.
This removes the old blue styled outline around the PM recipient
box that was part of the older bootstrap styling in favor of the
dark outline on :focus that had been implemented for the rest of
the recipient boxes recently.
2017-10-25 15:15:58 -07:00
Brock Whittaker a9a9333b2a portico: Show whether the user is logged in.
This creates a dropdown in place of the normal register/login links
you get when logged out, with an option to go to the app or log out if
that appears you click on the avatar.

A bit more work is needed to make this look really good, but it's a
great start.
2017-10-25 14:59:24 -07:00
Tim Abbott 10dc9ecc92 i18n: Update translation strings for 1.7 release. 2017-10-25 09:20:29 -07:00
Tim Abbott 11eba1173c popovers: Don't show bots as deactivated in user popovers.
Apparently this is a bug that slipped in when we started showing
normal users as deactivated in the user popovers: all bot users were
treated that way as well.

We'll want to do #7153 as a follow-up to get things fully working how
we want them.
2017-10-24 15:59:51 -07:00
Tim Abbott d8a873a571 filter: Improve group-pm-with descriptions.
This makes it a bit clearer what this actually does.
2017-10-24 13:19:24 -07:00
Tim Abbott 3ee53d5de3 auth: Don't offer password reset links when useless.
If an organization doesn't have the EmailAuthBackend (which allows
password auth) enabled, then our password reset form doesn't do
anything, so we should hide it in the UI.
2017-10-24 12:07:43 -07:00
Tim Abbott 1978455287 subs: Fix exception with streams overlay open but no active stream.
Previously, if you had the streams overlay open (but no active stream
clicked) while another user edited your subscriptions state, we'd
throw an exception handle the get_events call, because the code for
rerendering the subscribers list didn't consider the possibility that
there was no active stream.
2017-10-23 22:56:14 -07:00
Tim Abbott 9d0e1a2e0c subs: Don't try to update stream settings UI when closed.
The recent fixes we made to make stream settings update properly when
doing live updates were great, but they would throw an exception if
the stream settings overlay wasn't open.  This fixes that by adding
the appropriate check.
2017-10-23 22:44:27 -07:00
Tim Abbott bdc7772bab subs: Fix bug with invalid access to stream IDs.
`sub.id` isn't a valid field; it's `sub.stream_id`.
2017-10-23 22:44:05 -07:00
Brock Whittaker 4b45878946 notifications: If "Notification" is undefined, just return "denied".
We do not want the code to lead to a path where it will attempt to
display native notifications if the “Notification” object doesn’t
exist, as this likely means that the device does not support OS
notifications.
2017-10-23 21:29:42 -07:00
Tim Abbott a57f577650 i18n: Update translations files. 2017-10-23 16:18:16 -07:00
Brock Whittaker e304c44c2e integrations: Impose max-width for readability.
This imposes a maximum width constraint on the center block so
that it can maintain readability and keep the content paragraphs
to less than 1000px.

Fixes: #7092.
2017-10-23 14:24:31 -07:00
Brock Whittaker 981e6e6836 settings: Display "Never" over "Invalid Date" for inactive users.
This shows the text "Never" for users who are part of a realm but
have never been active, rather than a more vague JavaScript output
of "Invalid Date" due to the fact that their last presence
evaluates to NaN.
2017-10-23 13:57:11 -07:00
Tim Abbott 4db99196e9 message_edit: Fix red highlighting for messages mentioning you.
When we added support for mentioning users when editing messages, we
neglected to add this bit of code needed to make sure the UI code in
message_list_view.js would actually rerender that part of the
message's state.

Arguably, this is a sign that the message_container structure should
be just recomputed every time we rerender messages, but that's a less
tactical fix.
2017-10-23 11:02:30 -07:00
Tim Abbott 4418425c10 translations: Add a few new languages.
Indonesian, at least, has gotten pretty far in translating.
2017-10-20 14:20:31 -07:00
Brock Whittaker 79d0f13885 sidebars: Move arrows and unread counts away from scrollbars.
The arrows were too close to the scrollbars that it would be
difficult to click them sometimes. This moves over the arrows and
unread counts to combat the issue.
2017-10-20 13:29:10 -07:00
Brock Whittaker 1a9c13a655 left-sidebar: Vertically align nested PM lines.
This vertically aligns the lines to be centered rather than about
three pixels closer to the bottom than to the top.
2017-10-20 13:11:43 -07:00
Brock Whittaker e5a09f422c notification-banner: Check if mobile before displaying.
Notifications essentially don't work on any mobile web clients,
so don't even show the banner.

This also fixes a traceback where it checks the permission state
with `notifications.permission_state()`, which calls
`Notification.permission`, which will error due to `Notification`
not existing on mobile devices.

Fixes: #7105.
2017-10-20 13:07:40 -07:00
Tim Abbott 961e615d9a i18n: Update translations. 2017-10-20 10:31:06 -07:00