Commit Graph

6937 Commits

Author SHA1 Message Date
Yashashvi Dave 8c72adc106 subscribers: Hide subscribers of non-subscribed stream for guest user in UI.
Guest users can't access subscribers of any(public or private)
non-subscribed streams. Therefore, hide subscribers list
of all non-subscribed streams from guest users in UI.

Fixes #10749 (the previous parts were fixed already).
2018-11-06 12:57:19 -08:00
Roger Souza f445a71272 hello: Fix responsiveness bug when page is at 800px. 2018-11-05 10:20:34 -08:00
Tim Abbott 2636db64e4 Update translation data from transifex. 2018-11-02 17:35:21 -07:00
Yashashvi Dave f6b4e65b92 compose: Hide sub-btn in compose-to-unsub warning if user can't subscribe.
Hide subscription button in compose-message-to-unsubscribe-stream
warning, if user can't subscribe back to stream.
2018-11-02 11:57:04 +05:30
Vishnu Ks 4533f8f962 billing: Make URL hash work in billing page.
This will change the hash of the URL when a new tab
gets selected. Vice versa when the billing page is opened
the appropriate tab is selected according to hash of
the URL. This means when the card gets updated the
page would be reloaded correctly to show #payment-method
tab.
2018-11-01 12:50:24 -07:00
Rishi Gupta 04acb624b6 portico: Add background image to /why-zulip hero. 2018-11-01 11:59:50 -07:00
Rishi Gupta de12facdc6 portico: Add background image to /security hero.
Also restructures the HTML to be more similar to other pages that have a
background image for their hero.
2018-11-01 11:59:50 -07:00
Rishi Gupta 2718bf27e7 portico: Fix spacing for logged-in dropdown in nav bar. 2018-11-01 10:41:30 -07:00
Tim Abbott 8673b4f4a6 compose: Use a more reasonable plus sign for opening send menu.
This icon styling definitely still doesn't look great, but it's an
improvement over what we had before.
2018-10-31 16:59:16 -07:00
Marco Burstein 502e9fe8a6 compose: Open the mobile compose popover when the `+` button is pressed.
The `+` button will only be displayed on mobile devices.
2018-10-31 16:47:48 -07:00
Marco Burstein 05b486182d compose: Create the mobile compose popover.
When a user clicks the compose `+` button, create a popover at the
bottom right of the screen including buttons for opening a new stream
message or a new private message.
2018-10-31 16:47:48 -07:00
Marco Burstein 9249d08a96 compose: Create the mobile compose `+` button.
Use CSS to display a `+` button on mobile but keep the more verbose
buttons on desktop. In the future, this button will be used to display
a popop for a new message.
2018-10-31 16:47:48 -07:00
Yashashvi Dave c635d5476d message view: Hide subscribe button for guest users.
Guest users can't subscribe themselves to streams, so we shouldn't
display the subscription button at end of stream message view.

Fixes part of #10749.
2018-10-31 15:47:01 -07:00
Yashashvi Dave e489923d52 stream settings: Hide subscription button in case of guest user.
Guest users can't subscribe themselves to any stream, so we hide the
"Subscribe" button. Previously, it was showing Subscribe button after
a guest user unsubscribed from a stream.

Fixes part of #10749.
2018-10-31 15:46:34 -07:00
Shikhar Vaish 5ffca5e388 settings: Warn if server is unable to deliver mobile push notifications.
The "notification settings" page previously advertised support for
mobile push notifications via checkboxes, even if the server hadn't
yet been registered for push notifications.  This was a frequent
source of onboarding pain for new Zulip organizations.

We fix this by providing a clear warning and disabling the relevant
inputs on the settings pages.

Modified significantly by tabbott to correct some tricky logic errors
as well as some copy-paste bugs.

Fixes #10331.
2018-10-31 13:18:17 -07:00
Tim Abbott bc8059d462 i18n: Sync translation data from transifex. 2018-10-31 10:31:36 -07:00
Tim Abbott deb29749c2 people: Add a CSS class to label guest users.
This doesn't do anything yet, since we still need to add the actual
CSS, but it should make it easy for someone to just do the design
work.
2018-10-31 10:15:49 -07:00
Rishi Gupta ef8113556a settings: Update dropdown in user roles modal. 2018-10-30 10:48:06 -07:00
Rishi Gupta 37e00dce78 settings: Update organization permission strings to reflect guests. 2018-10-30 10:48:06 -07:00
Rishi Gupta d3b6b4e885 settings: Remove extra column from table in bot-list-admin. 2018-10-29 23:16:45 -07:00
Steve Howell 706821e259 minor: Change error to warning for missing user ids.
We want to avoid `blueslip.error` in cases where
the root cause could just be bad data that is
human-entered.

There are a few callers here who **should** be
sending good data all the time, but hopefully
they either have good test coverage, other
obvious failure symptoms, or, ideally, just
do what the user would mostly expect in the
face of bad data.
2018-10-29 12:57:15 -07:00
Pragati Agrawal d5df0377cc settings_users: Support guest user in admin-user-table.
This supports guest user in the user-info-form-modal as well as in the
role section of the admin-user-table.

With some fixes by Tim Abbott and Shubham Dhama.
2018-10-29 12:33:35 -07:00
Steve Howell 3a267b5cc6 Have ESC zoom out topics if you're zoomed in.
This is the natural behavior that most users will
probably expect.  If you need to go to All Messages when
topics are zoomed in, you can just hit ESC twice.
2018-10-24 16:54:35 -07:00
Steve Howell 06b1aece31 Simplify narrow/search interactions.
Before this change, if you hit ESC, then hotkey
code would call search.clear_search, which would
call narrow.deactivate(), which would then use
`$('#search_query')` to clear a value, but then
let search.clear_search blur the input and
disable the exit button.  It was all confusing.

Things are a bit more organized now.

Now the code works like this:

    hotkey.process_escape_key
        Just call narrow.deactivate.

    $('#search_exit').on('click', ...):
        Just call narrow.deactivate.

    narrow.deactivate:
        Just call search.clear_search_form

    search.clear_search_form:
        Just do simple jquery stuff.  Don't
        change the entire user's narrow, not
        even indirectly!

There's still a two-way interaction between
the narrow.js module and the search.js module,
but in each direction it's a one-liner.

The guiding principle here is that we only
want one top-level API, which is narrow.deactivate,
and that does the whole "kitchen sink" of
clearing searches, closing popovers, switching
in views, etc.  And then all the functions it
calls out to tend to have much smaller jobs to
do.

This commit can mostly be considered a refactoring, but the
order of operations changes slightly.  Basically, as
soon as you hit ESC or click on the search "X", we
clear the search widget.  Most users won't notice
any difference, because we don't have to hit the
server to populate the home view.  And it's arguably
an improvement to give more immediate feedback.
2018-10-24 16:54:35 -07:00
Steve Howell 08f0690333 left sidebar: Fix scrolling bugs with zoomed topics.
If you zoom into "more topics" for a stream that has
a LOT of topics, and then scroll down to the bottom,
and then zoom out by selecting "All messages" or
similar upper-left-sidebar options, we now try to scroll
the more recently active stream back into place after we scroll
out.

Before this change, it was possible for your lower left
sidebar to appear empty, as it would keep the
scroll offset from "more topics".
2018-10-24 16:54:35 -07:00
Steve Howell 4bfb49c3a4 Streamline closing topic lists.
If our topic list isn't zoomed in, avoid calling
stream_list.zoom_out_topics().

This commit also introduces `zoomed_in` to track
our topic zooming state.
2018-10-24 16:54:35 -07:00
Steve Howell 047a81dd2c refactor: Move clear_topics into topic_zoom.js.
This sets up some subsequent changes.
2018-10-24 16:54:35 -07:00
Steve Howell acb7149386 Extract topic_zoom.js.
This small modules nicely breaks down the
responsibilities of topic_list and stream_list
when it comes to zooming in and out of topics
(also known as hitting "more topics" or "All
Streams).

Before this, neither module was clearly in
charge, and there were kind of complicated
callback mechanisms.  The stream_list code
was asking topic_list to create click handlers
that called back into stream_list.

Now we just topic_zoom set up its own click
handlers and delegate out to the other two
modules.
2018-10-24 16:54:35 -07:00
Rishi Gupta 458169928c billing: Rename Zulip Premium to Zulip Standard. 2018-10-24 10:42:16 -07:00
Vishnu Ks 53f1714613 stripe: Fix the button glitch in /upgrade page. 2018-10-24 10:12:39 -07:00
Rishi Gupta 1c264dedc5 api docs: Change Shakespeare quote.
The previous quote doesn't come off well if you don't know the reference
(which the majority of our users will not).
2018-10-22 15:44:36 -07:00
Tim Abbott d69d71c59f i18n: Sync translation data from transifex. 2018-10-22 14:50:46 -07:00
Steve Howell c58a99b156 PM sidebar: Expand PM sidebar for huddles.
This fixes a regression from here:

    88b4a9f2d7

The fix didn't account for how huddles are
represented as comma-delimited strings.

We also simplify the logic by extracting a
function and doing early-exit for simple
cases.
2018-10-22 12:22:26 -07:00
Steve Howell 328e2ff316 Fix "Copy link to conversation" links.
This cleans up the code for stream links
and creates nicer, more correct links for
PMs.

Fixes #10605
2018-10-22 12:22:26 -07:00
Steve Howell adf616d3f1 Add pm_perma_link helper. 2018-10-22 12:22:26 -07:00
Steve Howell 8c49985058 url decoding: Handle your own id being in PM slugs.
Internally we generally omit our own id and email
in data structures related to PMs, except when we
are the sender, but if we receive "perma links"
we will need to filter out our id.
2018-10-22 12:22:26 -07:00
Pragati Agrawal cc0ac4d340 settings_users: Change "role" column text on updation.
This reflects the newly selected value of role in "role" column under
active-users section and deletes the redundant admin-icon updation code(
As we already removed bolt admin-icon)
2018-10-19 15:51:12 -07:00
Rishi Gupta b60005c5bb history: Add NSF and GSoC logos in a new support section. 2018-10-19 15:50:09 -07:00
Aditya Ramesh c242433dcb message view: Fix order of dynamic elements in recipient bar.
This swaps the order of the "blue square" outgoing link and the edit
pencil.

Fixes #10681.
2018-10-19 15:42:47 -07:00
Yashashvi Dave cc810f8951 settings: Fix width not maximum while uploading user avatar.
New user avatar width is not maximum when user upload
new image. Because wrong html element is accessed for
setting value of image src attribute.
This commit removes these code from success of ajax call,
cause we already handle this in event `user_events - avatar_url`.
2018-10-19 12:36:18 -07:00
dipu989 ef2345414d settings: Change username label. 2018-10-16 17:09:21 -07:00
dipu989 ea5bb4a150 settings: Interchange Username and Bot Type positions. 2018-10-16 17:09:20 -07:00
Steve Howell fd22687cd2 refactor: Split out buddy_list_conf().
This moves us closer to having a generic widget that
we can use for other things like stream settings.
2018-10-16 16:53:47 -07:00
Steve Howell 653aa40384 Extract buddy_list_create().
This makes buddy_list look more similar to other modules
where we don't indent within the boilerplate IIFE.
2018-10-16 16:53:47 -07:00
Cynthia Lin f03d7d29b5 styles: Convert named colors to HSL values. 2018-10-16 13:14:19 -07:00
Cynthia Lin cbb6b3a1af styles: Normalize differences in previous hex-to-HSL conversion. 2018-10-16 13:14:19 -07:00
Cynthia Lin 89d81b37d4 styles: Convert background properties to background-color. 2018-10-16 13:14:19 -07:00
Cynthia Lin 67b705207e styles: Convert 3-digit hex values to HSL values. 2018-10-16 13:14:19 -07:00
Cynthia Lin 926365dc89 styles: Convert 6-digit hex values to HSL values. 2018-10-16 13:14:19 -07:00
Shubham Dhama 3e0b420423 settings: Extend `settings_checkbox` for dependent checkboxes.
This deduplicate code for the checkboxes which are dependent on other
parameters and it makes no sense changing them when that parameter is
false.  For example, changing `message_content_in_email_notifications`
makes sense only when `enable_offline_email_notifications` is true.
2018-10-16 13:08:55 -07:00