Commit Graph

9542 Commits

Author SHA1 Message Date
jagansivam28 bbf5a5efed invitation: Make Member to see invitations sent by him/her.
Member of the org can able see list of invitations sent by him/her.
given permission for the member to revoke and resend the invitations
sent by him/her and added tests for test member can revoke and resend
the invitations only sent by him/her.

Fixes #14007.
2020-05-01 17:42:49 -07:00
vaibhavrajsingh2001 a3d51ae9af regression: Add minimum height to custom user field textbox.
Also, if the width of the texbox increased too much, the avatar icon
would move below. Fixed by setting max-width that matches the width of
the other textboxes.

Fixes: #14826
2020-05-01 11:00:56 -07:00
shubhamgupta2956 e1b8e9d7da css: Merge css properties of "#streams_header". 2020-04-30 16:56:34 -07:00
shubhamgupta2956 ff17279edb css: Use SCSS nesting for '.pm-box'. 2020-04-30 16:56:34 -07:00
shubhamgupta2956 fc8e6d6370 css: Use SCSS nesting in left-sidebar.scss.
Use SCSS nesting for "#streams_inline_cog, streams_filter_icon in
left-sidebar.scss.
2020-04-30 16:56:34 -07:00
shubhamgupta2956 628d9d1f25 css: Use nesting for "li.expanded_private_message". 2020-04-30 16:56:34 -07:00
shubhamgupta2956 85e151cc38 css: Use SCSS nesting for '.show-all-streams'. 2020-04-30 16:56:33 -07:00
shubhamgupta2956 18d7036eb6 css: Reorder ".show-all-streams". 2020-04-30 16:56:33 -07:00
shubhamgupta2956 974fd26139 css: Merge common CSS property in chevron styling. 2020-04-30 16:56:31 -07:00
shubhamgupta2956 662f202fa8 css: Use SCSS nesting for '#global_filters'. 2020-04-30 16:56:23 -07:00
shubhamgupta2956 e0071af1c7 css: Reorder "#global_filters". 2020-04-30 16:56:23 -07:00
shubhamgupta2956 3f76c963b2 css: Use SCSS nesting for "#left-sidebar". 2020-04-30 16:56:23 -07:00
shubhamgupta2956 ad3e7eebe3 css: Reorder "#left-sidebar" in left-sidebar.scss. 2020-04-30 16:56:23 -07:00
shubhamgupta2956 b9b73695cc css: Use SCSS nesting for "#stream_filters". 2020-04-30 16:56:23 -07:00
shubhamgupta2956 fb69457989 css: Reorder "#stream_filters". 2020-04-30 16:56:23 -07:00
Anders Kaseorg a552c2e5f9 auth: Use the clipboard instead of zulip:// for desktop auth flow.
This does not rely on the desktop app being able to register for the
zulip:// scheme (which is problematic with, for example, the AppImage
format).

It also is a better interface for managing changes to the system,
since the implementation exists almost entirely in the server/webapp
project.

This provides a smoother user experience, where the user doesn't need
to do the paste step, when combined with
https://github.com/zulip/zulip-desktop/pull/943.

Fixes #13613.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-04-30 16:45:00 -07:00
Pranav 43b0acdae8 settings: Use & selector reference to correctly style alerts.
The alert-error class styling was not being applied to alert-notifications
because of incorrect styling. The alert-notifications and the
alert-error classes were applied to the same element, whereas the CSS
expected the alert-error class to be applied to children of the class
with alert-notifications. Fixed this by using the parent-selector
reference '&' to correctly select the styling.
2020-04-30 16:13:49 -07:00
Pranav 41cdf11e16 settings_account: Remove redundant call to loading.make_indicator.
Previously, a spinner was created and this spinner element passed to
do_settings_change function, which also created a spinner, making the
first spinner creation useless. This commit removes the spinner creation
logic and just passes the element where the spinner is to be rendered.
2020-04-30 16:13:49 -07:00
Wyatt Hoodes 5a58b7c549 data exports: Keep deleted export in UI table.
It makes sense to keep a deleted export in the table,
along with the time of deletion, for auditing reasons.
2020-04-30 13:00:59 -07:00
Wyatt Hoodes 2204f33936 data exports: Switch to solely using a status column. 2020-04-30 13:00:59 -07:00
Wyatt Hoodes 82e7ad8e25 data exports: Handle pending and failed exports.
Prior to this change, there were reports of 500s in
production due to `export.extra_data` being a
Nonetype.  This was reproducible using the s3
backend in development when a row was created in
the `RealmAuditLog` table, but the export failed in
the `DeferredWorker`.  This left an entry lying
about that was never updated with an `extra_data`
field.

To fix this, we catch any exceptions in the
`DeferredWorker`, and then update `extra_data` to
encode the failure.  We also fix the fact that we
never updated the export UI table with pending exports.

These changes also negated the use for the somewhat
hacky `clear_success_banner` logic.
2020-04-30 13:00:59 -07:00
Wyatt Hoodes b913478b76 settings_exports: Replace clear_succes_banner logic.
ui_report.js already had the functionality we were
looking for.
2020-04-30 13:00:59 -07:00
vaibhavrajsingh2001 bde965aed0 user settings: Correct overflow behaviour of custom user field.
Fixes: #14816
2020-04-30 12:54:20 -07:00
Siddharth Varshney de47262518 sidebar: Rename classes for menu icons in sidebars. 2020-04-30 10:56:09 -07:00
Pranav 069da46769 composebox: Make empty msg alert's cross prominent in night mode.
Increased opacity of the cross in night mode to make the cross easily
visible. Previously, low values of opacity caused the cross to be not
easily visible.

Fixes #14459.
2020-04-29 16:19:08 -07:00
Jagan 805ac2475b settings: Redesign edit bot form.
This removes the weird edit-bot sidebar, replacing it with a modal,
matching our edit-user widget (and various similar ones).

Fixes #13644 by removing the buggy code.
2020-04-28 23:08:45 -07:00
Hashir Sarwar 0cbb778af4 ui_init: Fix play button position on video thumbnails.
This fixes a jQuery bug that broke the postion of play
button on video thumbnails particularly when YouTube
images fetched from oembed are displayed.
2020-04-28 22:41:00 -07:00
Steve Howell cf78cb0d6e templates: Use `<hr>` and `<br>` consistently.
We now prevent these variations:

    * <hr/>
    * <hr />
    * <br/>
    * <br />

We could enforce similar consistency for other void
tags, if we wished, but these two are particularly
prevalent.
2020-04-28 17:05:48 -07:00
Puneeth Chaganti 844bca55f8 integrations: Remove unused Trello message screenshot. 2020-04-28 13:00:09 -07:00
Aman Agrawal cfe427b3f7 narrow: bugfix: Update stream list height after rendering completes.
When switching from Private Messages narrow to
All messages narrow, stream list max-height was not
correctly updated. Stream list max-height was calculated
 before new height were updated by browser for
All message narrow.

Inshort:
Stream list max-height was being updated before the browser could
render height for `#global_filters`. Calling resize after narrow
completes removes this issue.
2020-04-28 12:32:40 -07:00
Anders Kaseorg a6fee2f18e notifications: Use electron_bridge.new_notification when available.
This will eventually let us delete a bit of annoying compatibility
code from the desktop app’s injected JavaScript.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg 549ed3913c notifications: Use NotificationAPI for permission_state.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg f277eb022c notifications: Use addEventListener to register handlers.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg cb52f4d7fc notifications: Remove weird Firefox code.
Firefox’s notifications are fine, and iconUrl isn’t a thing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg a16cddf84f notifications: Remove cancel_notification_object wrapper.
Running the close handler won’t break anything; it’s safe to delete
from a Map while iterating through it.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg 0b1c27192f notifications: Remove long-gone webkitNotifications draft API.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg 8138e06935 notifications: Add link for sending a test notification.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
Anders Kaseorg e701f20861 electron_bridge: Use getter and setter interface to mutable properties.
This exists in all versions of the desktop app that we still support,
and will eventually let us delete a bit of annoying compatibility code
from the desktop app’s injected JavaScript.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-26 23:02:05 -07:00
clarammdantas 25c5856988 stream_edit: Remove unnacessary conditionals.
The condition was removed because in either case we
want to have the stream_row and not the sub/unsub
button, so we can always get the stream_row directly.
2020-04-26 22:42:38 -07:00
Steve Howell c11de1e3a7 user profile cards: Fix bug with deactivated user.
We had a user have problems with the user
profile menus that you get when you click
on either sender avatars or mention pills.

If a deactivated user had a long enough email
that we would normally want to un-hide the clipboard
icon for them, we would crash inside of
`init_email_clipboard`, because the icon isn't
there for them.  If the user didn't have the
console open to see the crash, the symptom
became that you would get multiple cards
visible and kind of "stuck".

I chose to fix this by just making the code
defensive with respect to the absence of the
icon, instead of short-circuiting it for
deactivated users.

It's a bit odd that we still have an element
matching `.user_email_popover` in the profile
card for deactivated users, since that element
doesn't actually include an email, but it instead
says "(This user has been deactivated)".  I
considered removing the class, but the CSS
that we use for emails kind of applies here
too.

Testing this is a kind of a pain, as you want
either long emails or to just temporarily hack
this condition to true:

    if (this.clientWidth < this.scrollWidth) {
        // ...
    }

And then test with a deactivated user, of course.

Fixes #14473
2020-04-26 11:12:45 -07:00
rebtung f7fbe3419f api: Improve consistency of reactions API.
Previously, the message and event APIs represented the user differently
for the same reaction data. To make this more consistent, I added a
user_id field to the reaction dict for both messages and events. I
updated the front end to use the user_id field rather than the user
dict. Lastly, I updated front end and back end tests that used user
info.

I primarily tested this by running my local Zulip build and
adding/removing reactions from messages.

Fixes #12049.
2020-04-26 10:35:55 -07:00
Steve Howell df57f8c006 list_render: Move sort functions to module scope.
Moving these to module scope makes it a little
easier to round out our test coverage, plus
it's a bit less clutter in the widget code.
2020-04-24 18:24:12 -04:00
Steve Howell f2ddd31fe6 list_render: Clean up filter-missing errors. 2020-04-24 10:50:08 -04:00
Steve Howell 059ad86967 list_render: Error if opts are missing.
The check here was too late, and it should
have given a blueslip error.  We obviously
don't expect these errors at runtime; this
is a convenience for developers creating
new widgets.
2020-04-24 10:50:08 -04:00
Dinesh 2735860f01 browser_support: Drop support for Internet Explorer.
Internet Explorer does not support `position: sticky` which improves
floating recipient bar behavior during scrolling which is one of the
issues blocking PR #9910.
IE also does not support some features that modern browsers support
hence may not super well.
This commit adds an error page that'll be displayed when a user logs
in from Internet Explorer. Also, a test is added.
2020-04-23 17:50:28 -07:00
clarammdantas de28c8d238 streams: Correct spinner bug when subscribing.
When clicking on the tick to subscribe to a stream,
an error occurred while trying to find the spinner
location because there are two DOM elements with the
same class, sub_unsub_button, and this made the
selector get the subscribe/unsubscribe button instead
the correct stream_row, where the tick is.

We now check whether the tick or the subscribe/unsubscribe
button was clicked, and if it was the last one we make
sure the stream_row and not the button is being passed
to the sub_or_unsub function.
2020-04-23 17:31:31 -07:00
clarammdantas a3a850b440 streams: Rename row_object to stream_row. 2020-04-23 17:31:31 -07:00
Tim Abbott 09b5f053ea settings: Fix i18n tagging of `(you)` to be consistent.
We use this elsewhere in the frontend codebase with the parents
included in the i18n, so we should stick with that.

Fixes `check-capitalization` failing as a side effect.
2020-04-23 17:28:34 -07:00
Jagan c69dc720ff admin user list: Replace the buttons with icons.
1. Replaced the deactivate and reactivate buttons with icons.
2. Added (you) near the current user name to denote his/her account in
the entire user list.

Tweaked by tabbott to reuse the (you) formatting from the right
sidebar here for readability and consistency.

Fixes #6313.
2020-04-23 16:49:57 -07:00
Anders Kaseorg b26a420c7a styles: Size full-viewport fixed elements as 100%, not 100vw × 100vh.
Mobile Chrome includes the height of the address bar in its
calculation of 100vh, which was causing a corresponding part of our
content to be pushed off the bottom of the screen.

Fixes #11324.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-23 15:47:43 -07:00