Commit Graph

4773 Commits

Author SHA1 Message Date
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
Tim Abbott bd5e7f8965 Revert "i18n: Only load active language."
This reverts commit f04981513b.

We're not sure, but we suspect that this made Zulip not show es for
folks using es_es as their locale.  Further testing is required.
2017-10-20 10:08:17 -07:00
Umair Khan f04981513b i18n: Only load active language.
Before this if we selected zh-hans then i18next would laod zh-hans, zh and
en. Now it will only load zh-hans.
2017-10-19 17:56:49 -07:00
Umair Khan 69fc227eb8 i18n: Create loadPath function.
This function returns the correct URL to retrieve zh-Hans from Django.

Fixes #6885
2017-10-19 17:56:49 -07:00
Shubham Dhama e321e15c49 date-separator: Make date rows unselectable.
Fixes #6311.
2017-10-19 17:49:57 -07:00
Vishnu Ks 4b5327b326 form: During realm creation give option to install in root domain.
This presents multiple states for the subdomain input option
depending on the existence of a root domain.

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

Fixes #6863.
2017-10-19 16:10:14 -07:00
Brock Whittaker 5889132732 notifications: Remove test for "webkit" in userAgent.
This removes a test for "webkit" in the userAgent string in order
to see whether notifications should be displayed. This is so that
the notifications process will work correctly in Firefox and not
keep registering as "false" which makes the notifications prompt
continue to re-show itself.
2017-10-19 15:01:12 -07:00
Vishnu Ks 534141ed07 popover: Pass value of is_active to userlist popover.
This was forgotten in 4f088292ee,
breaking the right sidebar user popover.
2017-10-19 10:58:35 -07:00
Brock Whittaker 7107d19aeb notifications: Detect whether notifications are blocked.
This checks whether the user is already in the state of having
blocked notifications, so that we can *not* show them the banner
to enable notifications, since browsers won't allow the request
to go through again.

Perhaps in a follow up we should create a different banner for
this case that shows how to enable notifications at the browser
level for this site.
2017-10-18 21:55:43 -07:00
Brock Whittaker 96c66d4297 panels: Make them mobile responsive.
This makes them responsive to resizes and fixes a responsive
issue with the floating recipient being too high when the alerts
were more than one line height.
2017-10-18 21:55:43 -07:00
Aastha Gupta 0fae83b301 notifications: Prompt user to enable desktop notifications.
This is a two-step notifications process that will ask a user
to enable notifications and if they click exit give them three
options:

1. Enable notifications.
2. Ask later.
3. Never ask on this computer again.

The first two are self-explanatory (ask later = next session it
asks again). The third is captured and stored in localStorage and
a check is done on page load to see whether or not notifications
should be displayed.

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

Fixes #1189.
2017-10-18 21:55:43 -07:00
Tim Abbott 70b8d881d9 sidebars: Fix left sidebar PM unread counts alignment.
This change was missed in 04273c077d.
2017-10-18 18:11:11 -07:00
Brock Whittaker 04273c077d sidebars: Make sidebar margins more uniform.
The left and right sidebar are now equidistant from the edges of the
center pane, and the contents within have equal margin from the edges
of their containers (5px).
2017-10-18 18:03:06 -07:00
Brock Whittaker 12c9076e98 right-sidebar: Align unread counts horizontally.
The group PM unread counts were pushed over toward the edge of the
screen which made them unaligned with the user unread PMs directly
above.

Fixes: #7064.
2017-10-18 18:03:06 -07:00
Brock Whittaker 4a4fbe3194 right-sidebar: Vertically align arrows in user presences.
The arrows were too low by 2px due to the generic styling that
applied to the left sidebar not working consistently with the
right sidebar.
2017-10-18 18:03:06 -07:00
Brock Whittaker 6f77887b4d /help/: Reduce margin-top for closer anchoring.
This lowers the amount of margin in the :before hack that we use
to put padding before anchored elements from 40px to 30px on <h1>
tags and 10px on everything else, which seems to be plenty.

Fixes: #7069.
2017-10-18 16:17:16 -07:00
akashnimare 70367deec3 apps: Add a direct link to installation section in desktop guide.
Fixes #6595.
2017-10-18 14:23:47 -07:00
Brock Whittaker 9090d6b12f streams: Re-render subscriber list on sub/unsub.
This re-renders the subscriber list on sub/unsub as long as that is the
current active stream settings.

Fixes: #6955.
2017-10-18 11:45:07 -07:00
Brock Whittaker 586369296c /subs/: Refactor to create a "get_safe_hash" method.
This returns a string always, checks if the “location” variable exists
inside of window, and will trim the first character (“#”) on hashes.
2017-10-18 11:45:07 -07:00
Brock Whittaker a93bedc8e6 streams: Re-highlight row after re-subscribing.
When re-subscribing by way of the "Subscribe" button in the right
side settings panel, the row will now be marked as active to
highlight that the row is still selected and being looked at.

Fixes: #6955.
2017-10-18 11:45:07 -07:00
Tim Abbott 2bc14d256f lint: Ban two spaces after comma in JS code.
We exclude the frontend tests, mostly because the lint rule isn't that
precise, and the test code has some sample user input that's a bit
funny.
2017-10-18 10:22:18 -07:00
Tim Abbott b634d9f38b lint: Ban two spaces after comma in CSS. 2017-10-18 10:11:33 -07:00
Tim Abbott 05b9316d5f i18n: Fix missing translation tags on deactivated notice. 2017-10-18 00:09:11 -07:00
Brock Whittaker 4f088292ee popovers: Hide user email and PM feature for deactivated users.
This hides the emails of deactivated users from the popovers along
with the link to send a PM to them.
2017-10-18 00:06:12 -07:00
Tim Abbott 773f8fcb05 stream_events: Fix exceptions when subscribed by another client.
We were getting several exceptions in mark_subscribed if the streams
overlay wasn't open, basically because we'd try to filter the
right-side stream list when it wasn't present in the DOM.
2017-10-17 23:42:29 -07:00
rht 691598a88b py3: Remove "from six.moves import range".
This is no longer required, since in Python 3, this is what the range
built-in does.
2017-10-17 23:28:14 -07:00
rht a603a4f9f5 Remove `from __future__ import absolute_import`.
Except in:
- docs/writing-bots-guide.md, because bots are supposed to be Python 2
  compatible
- puppet/zulip_ops/files/zulip-ec2-configure-interfaces, because this
  script is still on python2.7
- tools/lint
- tools/linter_lib
- tools/lister.py

For the latter two, because they might be yanked away to a separate repo
for general use with other FLOSS projects.
2017-10-17 22:59:42 -07:00
Alena Volkova 5515a075ec urls: Move the report endpoints to be API-style routes. 2017-10-17 22:05:56 -07:00
Harshit Bansal 9234abbd59 notifications: Fix realm emojis not appearing in desktop notifications. 2017-10-17 22:03:33 -07:00
Steve Howell 5a77a4d122 Inline muting_ui.mute_topic and unmute_topic.
These methods were only called by similarly named methods, so
it was kind of a confusing API, and they didn't really
encapsulate anything useful.
2017-10-17 17:41:21 -07:00
Steve Howell dea1888022 Fix muting_ui.persist_and_rerender() bug.
We were calling muting_ui.persist_and_rerender(), but
that function no longer exists.  Now we use the simpler
API.
2017-10-17 17:41:21 -07:00
Brock Whittaker 7cb7158a42 /help/: Re-add perfectScrollbar for sidebar and markdown.
This adds back the perfectScrollbar for the sidebar and markdown
sections because we already lost CTRL-F functionality, so we may
as well bring back the pretty, non-obtrusive scrollbars.

This updates the scrollbar after a successful `slideToggle` of
one of the sidebar sections.

Fixes: #6999.
2017-10-17 17:14:36 -07:00