Commit Graph

7645 Commits

Author SHA1 Message Date
Tim Abbott 094dcac2dc message_edit: Fix content editing icons appearing in "view source".
These icons was misplaced during a recent refactoring, resulting in
the compose icons appearing even for non-editable messages.

Fixes part of #11666.
2019-02-24 11:29:07 -08:00
synicalsyntax db37192857 integrations: Rename Google logo to bypass Adblock Plus.
Adblock Plus's "Block social media icons tracking" setting blocks
images with for social media platforms in their names from loading, so
we rename the Google logo to bypass this.
2019-02-24 11:09:02 -08:00
synicalsyntax 33bd52388a integrations: Rename social media logos to bypass Adblock Plus.
Adblock Plus's "Block social media icons tracking" setting blocked
integration logos for social media platforms from loading, so the logos
are renamed to bypass this.

Fixes #11590.
2019-02-23 10:56:43 -08:00
synicalsyntax d6483a99d0 integrations: Update xkcd logo. 2019-02-22 18:16:29 -08:00
synicalsyntax ec866844ac integrations: Update Matrix logo. 2019-02-22 18:16:29 -08:00
synicalsyntax 26d92b422f integrations: Improve resolution of IRC logo. 2019-02-22 18:16:29 -08:00
Rohitt Vashishtha 62007d3e38 compose: Do not show compose-invite-users row for silent mentions. 2019-02-22 13:17:47 -08:00
Rohitt Vashishtha c504fa98aa typeahead: Show only users in silent mentions typeahead. 2019-02-22 13:17:47 -08:00
Vaibhav 69c16ab90d messagebox: Change alert message background to dark in night mode.
When copying a message by clicking on "copy and close" button in
message edit box an alert appears that says "Copied!"; Background
of the message is set corresponding with the day mode but not the
night mode. This changes the background of the alert message to
the dark color in night mode.
2019-02-22 13:12:00 -08:00
Anders Kaseorg ce2474c0ad css: Fix unread marker gap in night mode.
Instead of drawing a white border between unread markers, leave a real
space.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-22 13:01:03 -08:00
Rohitt Vashishtha 185da99ccb typeahead: Fix accidental overwrite of message content on select.
Also adds tests to ensure that we do not accidentally overwrite
the 'beginning' variable that contains the message content upto
that point. These should prevent similar errors in the future.

The bug was added in 8119258c4d.
2019-02-21 11:34:51 -08:00
Tim Abbott 5e96f53948 realm_logo: Display with target background, not current background.
This makes it a lot more clear what this feature will look like.
2019-02-20 18:04:04 -08:00
Tim Abbott 4df8a2ac0f settings: Fix handling of day logo without night logo.
In this case, we should just use the day logo for both themes.
2019-02-20 17:55:48 -08:00
Tim Abbott 4da430e276 message_list: Fix buggy rerendering of dates with local echo.
The bug here was that when we rerendered messages following local echo
through the echo.process_from_server code path, the eventual call to
_rerender_header() made the implicit assumption that all messages in a
message group had the same date.  As a result, it created a totally
new/fake message group and called the rendering logic on that group
without calling the functions for setting up recipient row dates,
which would always result in no recipient bar date being added.  This
bug was latent/invisible before, because when introduced, the locally
echoed messages were always being added to a recipient group from
today, where the recipient bar's date area was by default empty anyway.

This latent bug was revealed when we modified the structure of the app
to do date dividers between individual messages within a message
group, rather than strictly between message groups.
2019-02-20 16:24:28 -08:00
Tim Abbott f4aa71fc75 server_events: Fix unnecessary call to insert_new_messages.
When we're handling a single message that was locally echoed, there
will very likely be 0 messages not removed by
`echo.process_from_server`, and we can skip the unnecessary call to
`message_events.insert_new_messages`.  This is a small performance
optimization and logical simplification when sending messages.
2019-02-20 16:24:28 -08:00
Hemanth V. Alluri 3134453220 streams_edit: Prevent newline characters in the description.
This commit achieves two things:
  1. Changes the UI of the "Create stream" form to make the
     textarea previously used to get the stream description
     a simple input field of type text (to suggest a single
     line description).

  2. Adds an extra check on the frontend side to make sure that
     when users create a new stream via. the "Create stream"
     option in the settings panel, they can't enter any newline
     characters (i.e. we disallow the enter key from being
     registered when typing out the stream description).
     We must also make sure that they cannot copy-and-paste over
     descriptions containing newline characters.

  resolves #11617
2019-02-20 12:27:54 -08:00
Rohitt Vashishtha 8119258c4d typeahead: Migrate from _@ to @_ for silent mentions.
We also clean up the code a little to make it easier to
read and combine the matching code for both mentions and
silent_mentions.
2019-02-20 10:41:42 -08:00
Rohitt Vashishtha 92658d2ac9 markdown: Move code related to @mentions to markdown.js.
For consistency, we should keep all the code that works with
@mentions in markdown.js. In this case, message_list_view was
rewriting the contents of the mentions in cases where users'
names had been changed since we rendered their mention.
2019-02-20 10:41:42 -08:00
Rohitt Vashishtha 44ec83ef28 markdown: Render silent mentions as **name**.
This change should help people discover to distinguish
silent mentions in text as a part of Zulip syntax while
differentiating them from regular mentions.
2019-02-20 10:41:42 -08:00
Rohitt Vashishtha 57b9991396 markdown: Change syntax of silent mentions ( _@person -> @_person). 2019-02-20 10:41:42 -08:00
Steve Howell cdce66813e drafts: Fix date-sensitive test.
To test formatting we want a hard coded date, so we
can verify the date arithmetic with stable dates.

To make the test less brittle, we disable the
feature to remove old drafts.

This was an emergency fix.  We should probably just
remove the last N drafts instead of having the 30-day
limit.  Or we should have a better way to stub the cutoff
date.
2019-02-20 06:49:19 -08:00
Rishi Gupta 8cc387c67f integrations: Run svgo to optimize svg files.
Fixes broken build.
2019-02-19 16:10:17 -08:00
synicalsyntax f08e8c8ffc integrations: Update Freshdesk logo.
Eliminated legacy logo.
2019-02-19 15:08:45 -08:00
synicalsyntax 498cf1b905 integrations: Improve resolution of Greenhouse logo. 2019-02-19 15:07:25 -08:00
synicalsyntax 03d4f248fd integrations: Improve resolution of Gosquared logo. 2019-02-19 15:07:24 -08:00
synicalsyntax bf4c7d409a integrations: Update Statuspage logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax ccd06100d5 integrations: Update Raygun logo.
Updates legacy logo and converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax f0f3f88dd3 integrations: Update Flock logo.
Updates legacy logo and converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 6e18040da0 integrations: Update Dialogflow logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 2a5fe09d16 integrations: Update Opsgenie logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 6ddb03fad9 integrations: Update GoCD logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 756e95867c integrations: Update Discourse logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 1595162496 integrations: Update Jira logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax fc7cf5462f integrations: Update Instagram logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax b65d9e9e10 integrations: Update Clubhouse logo.
Updates legacy logo and converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 5bf89b946d integrations: Update Bitbucket logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 6f8481cd33 integrations: Update Trello logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax f1a2fe74a6 integrations: Update Beeminder logo.
Converts logo from PNG to SVG format.
2019-02-19 15:07:24 -08:00
synicalsyntax 2b78b643d8 integrations: Update Groove logo.
Eliminated legacy logo and changes logo to SVG format.
2019-02-19 14:56:55 -08:00
synicalsyntax 43cf75c075 integrations: Improve resolution of Zendesk logo. 2019-02-19 14:56:55 -08:00
alex 254da4ad81 send_button: Remove unnecessary self-cancelling margin. 2019-02-19 12:14:17 -08:00
synicalsyntax 4cc49a693b night mode: Improve coloring of emoji picker. 2019-02-18 19:49:24 -08:00
synicalsyntax c808dcea18 subs: Reorder stream row selectors for SASS nested selector feature. 2019-02-18 16:08:09 -08:00
synicalsyntax 0d32225bdd night mode: Improve coloring of message reactions. 2019-02-18 15:57:51 -08:00
Tim Abbott fe4a0d0fcd capitalization: Fix night logo lint errors. 2019-02-18 15:53:55 -08:00
synicalsyntax 0581fd3d51 integrations: Increase min-height of page content.
This allows the footer to not fall under the gradient area.

Fixes #11591.
2019-02-18 15:41:41 -08:00
synicalsyntax e22c637adf landing page: Adjust white fade gradient color.
The background color of the portico pages aren't true white,
so this commit adjusts it to match the actual portico page
background color to eliminate differences.
2019-02-18 15:41:41 -08:00
sahil839 7157edf4af settings: Add support for uploading logo for night mode.
This adds a new field named realm_night_logo which is used for
displaying the organization logo when the user is in night mode.

Fixes #11176.
2019-02-18 15:15:57 -08:00
Steve Howell e67cf30dfd private messages: Add user circles to top left.
This is mostly adding markup, calling some convenient
functions in buddy_data.js, and adjusting CSS.

To make the circles update dynamically, I mostly
orchestrate this though activity.js for now.  It's
possible we'll want to adjust that eventually to
happen through something like a `presence_events`
dispatcher, but that's essentially what
a good part of `activity.js` does now.
2019-02-18 14:22:37 -08:00
Steve Howell a6fdac128f refactor: Move huddle_fraction_present() to buddy_data.
This is a pure data function, so there's no sense having
future callers go through activity.js.
2019-02-18 14:22:37 -08:00
Steve Howell 4c27353154 css: Position/size popover user circles in correct file.
We're soon gonna have user circles in four different places,
and the fourth place, Private Messages, will have different
size/position CSS.

Now each component does positioning and sizing in its
main CSS file:

    user info, group info -- popovers.scss
    buddy list, group PMs -- right-sidebar.scss

(We also use the more explicit syntax for padding each
side.)
2019-02-18 14:22:37 -08:00
Steve Howell 1adcaad04a refactor: Simplify logic for circles.
We now have a function get_user_circle_class
that returns one of these values:

    "user_circle_green"
    "user_circle_orange"
    "user_circle_empty"

And we put that in the templates.

And then CSS renders the circle of the appropriate
color.

The unit tests now explicitly capture whether
we are rendering the correct kind of circle.
2019-02-18 14:22:37 -08:00
Steve Howell ba91f628c7 css: Use user_circle_fraction for group PM circles.
We rename this CSS class to something super concrete,
since all the associated CSS is very specifically
about drawing circles.
2019-02-18 14:22:37 -08:00
Steve Howell ea05afdf04 css: Avoid unused background for group PMs.
The background color for group PMs is driven
by specific styles in the HTML, so the CSS
definition here was inaccurate.
2019-02-18 14:22:37 -08:00
Steve Howell 3c8c2abd99 css: Split out user_circles.scss.
This is a pure code move.

We want to use user circles in the left sidebar,
so this code will no longer belong in
right-sidebar.scss.

This code is just related to drawing the circles.
We can still position in size in other CSS files
(with more context-specific selectors).
2019-02-18 14:22:37 -08:00
Challa Venkata Raghava Reddy 815d009006 left_sidebar: Add scrollbar for private messages region.
This fixes a longstanding UI issue when you have way too many recent
private message conversations, as you can now scroll down the list to
find what you're looking for.

Fixes #5384.
2019-02-18 14:20:55 -08:00
Vaibhav af3b18d1f5 messagebox: Remove on-message-row-hover controls visible rules.
Date separator exists inside the message_row, which causes the
message controls to be visible even when hovering on date
separator. These two rules are redundant and cause this buggy
action. Other rules handle the behaviour of message controls
being visible on message box hover. Hence these can be removed.
2019-02-18 14:15:16 -08:00
Steve Howell 57aabc2a24 away: Use correct user circle in user group popup.
When you click on a user group mention, you see
the list of people with green/orange/empty circles
next to them.  We now correctly reflect away status.
2019-02-17 06:43:36 -08:00
Rishi Gupta 2df08618e9 help: Ensure bottom link in sidebar is above browser URL preview.
Previously, if you scrolled down all the way in the left sidebar, and kept
your mouse hovered over a link, you had a feeling that there was still "more
stuff", since you could see the top of "Back to Zulip" peeking out over the
top of the URL Chrome (and maybe some other browsers) add in the bottom left
corner.

This just adds a bit of margin so that "Back to Zulip" is above that when
scrolled all the way down.
2019-02-16 18:19:13 -08:00
Steve Howell 03484e274a refactor: Remove dead code in PM list.
The function that was called here has no side
effects.  If you don't use its value, it's just
wasted computation.  The real action happens
in the subsequent calls to `rebuild_recent`.
2019-02-16 12:03:03 -08:00
Rishi Gupta ea8a087fd7 user popover: Rename user profile to full profile. 2019-02-16 11:39:10 -08:00
Steve Howell 4de04c460a css: Reduce scope of topic-name selector. 2019-02-16 10:07:46 -08:00
Rishi Gupta b856d9c0f9 user status: Change away to unavailable. 2019-02-16 09:28:58 -08:00
Rishi Gupta 86378bd0d8 user status: Remove bolding on button click. 2019-02-16 09:28:58 -08:00
Rishi Gupta aa8ce36b94 user status: Change text of modal button to Save.
Having it say "Clear" when you delete an existing status was a nice touch,
but it's confusing when you first open the modal and the text of the button
says "Clear".

I think the right medium-term solution here is for this modal to have "Save"
and "Cancel" buttons, and for there to be a small UI element in the user
popover itself that allows you to clear your current status.
2019-02-16 09:28:58 -08:00
Tim Abbott 4e53110350 message_list: Fix handling of deleted user groups.
You can now render message lists containing them and click on them
without throwing an exception.
2019-02-15 14:54:25 -08:00
Tim Abbott 7a49611a94 settings_invites: Display links for multi-use invitations.
This makes it possible to figure out which is which if you have
several active at the same time.
2019-02-15 14:28:07 -08:00
Vishnu Ks 763eca6ca9 invites: Add UI for revoking multiuse invites. 2019-02-15 14:13:31 -08:00
Tim Abbott 03dcace09d invite: Extract do_revoke_invite click handler as a function. 2019-02-15 14:13:02 -08:00
Vishnu Ks ef52f541fe invites: Fix the invalid invite time bug during filtering. 2019-02-15 13:58:30 -08:00
Steve Howell febad410f5 fix: Use padding, not margin, for the date separator.
My very recent margin fix was tested on a slightly
stale version of master.

    see c7e03f9a71
2019-02-15 11:30:36 -08:00
Steve Howell b1f58fb1ff emoji picker: Prevent cropping.
We now use `fix_positions` to avoid cropping the emoji
picker.  You can see cropping pretty easily on a short
screen if you click the smiley icon for reactions on a
message.  It's a bit tricky to repro, since some
of the current top/bottom placements are correct, but
it's definitely reproducible.

I think there are opportunities to both simplify
and optimize `popovers.compute_placement`, so that it
plays nicer with `fix_positions`.  For example, I would
bias it even more strongly toward favoring right/left
placement.  But there are complicating factors--it is
also used by the hotspot code.

And I wanted to especially preserve the current
behavior when you launch the picker from the compose
box.  That's one place where it looks pretty bad if
you select "right" instead of "bottom".
2019-02-15 10:40:53 -08:00
Steve Howell a537f4a075 refactor: Clean up viewport_center hack. 2019-02-15 10:40:53 -08:00
Steve Howell c7e03f9a71 message view: Fix margin for date separator.
Without this tweak the date separator overlaps
the left borner.
2019-02-15 09:55:15 -08:00
Tim Abbott 8779e550a4 popovers: Use fix_positions option for streams popover.
The fix_positions argument here fixes the horizontal
position of the stream popover.

It also fixes the vertical position, both in the default case, and
also doing an appropriate adjustment for the case that the color
picker is open.

This contains a few changes by tabbott to, rather than hiding the
arrow unconditionally, only do so when it would no longer point at the
right part of the screen.

Fixes #2374.
Fixes #6059.
Fixes #7290.
2019-02-14 16:58:00 -08:00
Steve Howell 19a434a289 user popover: Fix cropping/positioning.
We use the `fix_positions` options every time
we launch a user popover, whether it is from
the message pane avatar or the buddy list
chevron.

For the message pane case, we can eliminate
some complexity related to trying to put
the menu above or below the avatar.  We now
always suggest "right", and if there are
constraints due to being close to the edge
of the screen, the fix_positions code
will take care of it.
2019-02-14 16:34:29 -08:00
Steve Howell 66c6423001 popovers: Restructure hardcoded "top" for user popover.
The patch to bootstrap will make the position smarter, but we still
want to preserve the 100px default vertical offset we chose for visual
reasons.

Tweaked by tabbott to preserve the visual design.
2019-02-14 16:34:15 -08:00
Steve Howell 21ccf45db9 bootstrap: Patch popover position calculations.
For large popovers (and tooltips) we want to avoid
having the popovers go offscreen.

Fixes #11469.
2019-02-14 16:32:57 -08:00
Steve Howell 5442b38a20 popovers: Rename template to `no_arrow_popover`.
The `user_info_popover` template is a generic
way to make a popover without the arrow effect,
and we'll want to reuse it for other popovers.
2019-02-14 16:16:04 -08:00
Rishi Gupta 801d14280d search: Update styling and text for no search results.
Changed <h5> to <p>, and removed the special formatting of
.empty_search_text to make this more in line with the formatting we
generally use with empty narrows.
2019-02-14 15:03:14 -08:00
Vaibhav fb111d017f drafts: Remove left border from draft-box.
This removes the left border extending the stream label from the
recipient bar in from the drafts in drafts modal.  Those borders are
important in the message feed for containing several messages, but
here we're only ever going to show individual drafts, and this change
avoids potential color clashes with the blue box surrounding the
recipient blocks.
2019-02-14 11:33:08 -08:00
Vaibhav 2ca8ec371e drafts: Change foreground for dark background streams in drafts modal.
In drafts modal, dark background streams still had black foreground;
This changes the foreground to white for the same.
2019-02-14 11:32:11 -08:00
Vaibhav 162f06bbbb drafts: Add blue border around the active draft.
This removes the change in background to a darker one for active draft,
also removes the change in recipient_row_date color to blue; adds a blue
border around the draft box.
2019-02-14 11:32:11 -08:00
Harshit Bansal d386706382 emoji: Fix traceback on opening emoji popover in quick succession.
Since the bootstrap popovers are destroyed asynchronously so opening a
emoji popover in quick succession like by clicking the reaction button
on another message was causing a race condition which was causing some
operations to be applied on a destroyed emoji popover.  This commit
fixes it by making sure to apply any operations only to the currently
active popover.

Fixes: #9851.
2019-02-14 11:29:25 -08:00
Rishi Gupta 64cdac9294 help: Remove zulip-glossary.
I'm torn about this, since there is good content here. But ultimately I think
* This page is a lot of work to write and maintain.
* In most cases, the right thing is for people to find the page that
  explains the full feature. E.g. if you don't know what an "administrator"
  is, the page I hope you find is "Roles and Permissions". For bots, it's
  "Bots and Integrations". Writing a punchy short summary for a glossary
  that does better than that is possible, but not fast.
* People find things via search, e.g. by Googling "What is X in Zulip",
  rather than looking for a glossary.
* This page was written more than 3 years ago, before we had 100+ help
  articles. So it may have served a purpose in the past that no longer
  exists.
2019-02-13 18:03:22 -08:00
Vaibhav 5796d9d623 drafts: Change width of the drafts modal to 58%. 2019-02-13 16:16:34 -08:00
Vaibhav d710be866f drafts: Change spacing of drafts in modal.
Increase spacing (horizontal padding) of drafts.
Also add spacing between pro-tip and hr.
2019-02-13 16:16:34 -08:00
Vaibhav 72bd3d22e8 drafts: Add helper functions to get focused draft rows.
Adds three helper functions - `row_with_focus`, `row_before_focus` and
`row_after_focus` to get the focused, previous and next to focused
draft rows respectively.
2019-02-13 16:16:34 -08:00
Vaibhav e0134111d5 drafts: Rename `delete_id` to `draft_to_be_focused_id`.
`delete_id` in `drafts.js` referred to the next draft row which was
to be focused when deleting using hot keys. The var name was absurd
and is hence renamed.
2019-02-13 16:16:34 -08:00
Vaibhav 69424e4f2f drafts: Refactor code used to remove drafts.
Adds a `remove_draft` function which deletes the draft and updates the ui
by removing it from the list of drafts.
Also adds comments to increase readability.
2019-02-13 16:16:34 -08:00
Steve Howell 8a4aa0e49a drafts: Add reminder of hotkey. 2019-02-13 16:16:34 -08:00
Steve Howell 0f21020783 drafts: Put 30-day notice in header (to prevent scroll). 2019-02-13 16:16:34 -08:00
Steve Howell c4cd0fe0c1 drafts: Use a reverse-cron sort.
I think it's natural for your eyes get drawn to
the top of the modal, so that's where we should
put the most recent draft.
2019-02-13 16:16:34 -08:00
Tim Abbott 4d1fb5270d message view: Fix asymmetric padding on date separators. 2019-02-13 16:03:33 -08:00
Anders Kaseorg 89897bcf70 css: Move inline date separators from messagebox to message_row.
Fixes border-related glitches introduced by commit
51c6c82003 (#10820).  Alternative
to #11534.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-13 16:03:21 -08:00
Anders Kaseorg dae6aa21d8 css: Remove dead CSS classes message_data, prev_is_same_sender.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-13 16:03:16 -08:00
Mohit Gupta bf14f4cd7b notification: Show wrong narrow notification for non locally echoed message.
Show "sent to different narrow" notification and other such notification by
notifications.notify_local_mixes for non locally echoed message sent by
current client.

With significant new comments added by tabbott.

Fixes: #11488.
2019-02-13 15:51:41 -08:00
Mohit Gupta e5f28ca78e refactor: Rename locally_echoed to sent_by_this_client.
This is a bit clearer, since we will soon want to pass this option for
messages that could not be locally echoed due to markdown rendering.
2019-02-13 15:30:57 -08:00
Tim Abbott 944d590298 settings: Offer starred messages count setting publicly.
Previously, this was only available in the Zulip development
environment.

Further work is needed on documenting this and how to use it for
managing work to follow up on.
2019-02-13 15:11:17 -08:00
Pragati Agrawal 48175ce1f7 subs: Update Default streams data while renaming streams.
If a stream is a default stream, this updates its name at `Default Streams`
section of `Organization settings` page.

Fixes: #11466
2019-02-13 15:05:25 -08:00