Commit Graph

7483 Commits

Author SHA1 Message Date
Steve Howell a921e7e894 minor: Remove unused intermediate variable.
Calculating everything relative to `viewport_height`
is easier to audit.
2019-02-11 19:12:51 -08:00
Tim Abbott e1832d890a css: Move conversation-partners styles to left-sidebar.css. 2019-02-11 19:12:20 -08:00
Steve Howell b10ef272f1 css: Simplify selector for conversation partners. 2019-02-11 17:47:54 -08:00
Steve Howell fd76b1b226 css: Limit scope of filter-icon css. 2019-02-11 17:47:54 -08:00
Steve Howell 5db26cb7fe css: Remove sidebar-title cruft.
This CSS seems to go back to when sidebar-titles
were links.  It's scoped at the wrong level, and
it seems to have no effect.
2019-02-11 17:47:54 -08:00
Steve Howell 350ed9fcaf css: Limit li padding/border to narrows_panel. 2019-02-11 17:47:54 -08:00
Steve Howell bd3b715cf2 css: Set hover only on narrows_panels. 2019-02-11 17:47:53 -08:00
Steve Howell 51925b03b7 css: Set margin for only narrow_panels.
We don't want this margin to affect every
single thing that goes in the left sidebar.
2019-02-11 17:43:54 -08:00
Steve Howell c4ac7f5b03 left sidebar: Clean up "split" list moves.
This change only impacts users who have the setting
to put the user lists in the left sidebar when they
have a narrow window.

First, we move ".right-sidebar-items" as an entire
group.

Second, we append the items to "#left-sidebar"
instead of ".narrows_panel".
2019-02-11 17:43:54 -08:00
Steve Howell 039daa2bfa refactor: Rename bottom_sidebar to narrows_panel.
The name `bottom_sidebar` was misleading, because it
includes the entire "normal" left sidebar.

It includes the 4 narrow links at the top plus the
stream/topic list.

We now call is narrows_panel.

Note that the left sidebar sometimes also includes
the user list (with a display setting turned on).

And it will eventually include other views.

We also remove an intermediate value in the resize
calculations.
2019-02-11 17:43:54 -08:00
Tim Abbott 523e651a10 i18n: Update translations data from Transifex. 2019-02-11 16:52:41 -08:00
Tim Abbott 40916803e7 floating_recipient_bar: Fix incorrect use of jQuery .next().
The semantic of jQuery's .next(selector) return nothing if the
selector doesn't match the next child.
2019-02-11 16:46:11 -08:00
Tim Abbott cbc2f495ff css: Fix night mode styling for mentions.
This was missed in developing
51c6c82003.
2019-02-11 16:11:47 -08:00
Tim Abbott 51c6c82003 message_list: Don't split message groups for a date divider.
This adds date dividers within a single message group when the only
reason we had previously been splitting apart two message groups is a
change of date.  The overall effect is a cleaner message list user
experience.

The downside of this change would be that the recipient bars no longer
will always show a new date for date changes; to fix that, we rewrite
how the floating recipient bars both set the date field on the
floating recipient bar itself, as well as ensure that non-floating
recipient bars don't show duplicate dates.

In a future design update where we modify how message recipient bars
look, we may very well be able to simplify this logic by removing some
of the dynamic nature of the recipient bar calculations.  But this is
a good implementation of what remains.

Tweaked significantly by tabbott from Steve Howell's original, both to
extract these changes from a larger PR as well as to modify the
first_visible_message logic to handle some tricky corner cases.

Fixes #10171.
2019-02-11 15:56:09 -08:00
Hemanth V. Alluri 77f24e2b56 click_handlers: Use stream desc. on edit instead of rendered desc.
On clicking the edit button for a stream description, the stream's
unrendered description should be made editable as text instead of
the stream's rendered description (which would be displayed as HTML
instead of text).

This completes the effort to use backend-rendered stream descriptions
here.  Fixes #11272.
2019-02-11 12:27:11 -08:00
Hemanth V. Alluri 683ec852fd stream_data: Use stream rendered_description provided by the backend.
Use the results of commit #73d26c8 to remove the method
`render_stream_description` in static/js/stream_data.js and instead
use the rendered_description attribute now being sent by the backend.

This will be a valuable optimization and a step towards removing the
need for the marked.js markdown parser and speeding up the client end.
2019-02-11 12:24:27 -08:00
Rishi Gupta c26e2ab178 help: Adjust CSS for headings.
This looks like it affects why-page as well, but in practice all those pages
seem to have CSS that overrides these values.
2019-02-11 12:05:19 -08:00
Rishi Gupta 0958345416 help: Remove styling from spurious <p></p> tags. 2019-02-11 12:05:19 -08:00
Rishi Gupta 83236dc283 help: Add tab styling to untabbed instructions as well.
This changes the border-radius to 6px for the tabbed display, which is not
in line with the current Zulip style for border-radius (4px). However 6px
really looks a lot better for this (possibly because it's a bigger box than
most of our other boxes?)
2019-02-11 12:05:19 -08:00
Rishi Gupta d6c80d1ce7 help: Restyle tabbed navigation boxes. 2019-02-11 12:05:19 -08:00
Amadeo234 7d42d7b4db message_edit: Fix message edit history breakdown on large messages.
The message_edit_history UI was incorrectly inheriting its content
div's structure from message_edit_content, i.e. the form for editing
message content, and not message_content, i.e. the class for rendering
the content of messages in the message feed (which we also use for
drafts).

Fix this by changing the inheritance, while also adding a (currently
unused) class for any future customizations.

Fixes: #5629.
2019-02-08 15:47:17 -08:00
Pragati Agrawal 3a374f5e68 typeahead: Add typeahead for silent mentions.
This adds typeaheads of the form _@ , _@* , _@** for silent mentions.

Fixes: #11426.
2019-02-08 15:40:01 -08:00
Pragati Agrawal d5a327f122 typeahead: Extract functions in `composebox_typeahead`.
This extract functions `get_mention_candidates_data` &
`filter_mention_name` to make code reusable and cleaner and further use
the logic in silent mention syntax.
2019-02-08 15:40:01 -08:00
Steve Howell 3649293d71 left sidebar: Add a bit of margin below stream list.
Having a tiny bit of margin below the stream list
makes it possible to see the bottom of the scrollbar.

It also makes it so that the scrollbar activates
for a tiny range of list sizes where before the
last element would have been right up against the
bottom of the page, but we wouldn't scroll.
2019-02-08 15:27:50 -08:00
Tim Abbott 925bf7b907 message_list: Move update_group_date_divider earlier.
We need to move the update_group_date_divider call to run when a
message group is created.  This achieves a few things:

* Fixes calling this multiple times useless for long message groups.
* It will soon no longer be correct to assume that every message
within a group has the same date, and in that case, we want to process
the date of the first message in the group, not of the last.
2019-02-08 14:54:40 -08:00
Tim Abbott 31e98b8b65 message_list: Remove extra calls to update_timestr.
We only generate message_containers in one place, and that code path
already calls update_timestr.  And update_timestr's effect only
depends on the message.  Thus, this code was useless.
2019-02-08 14:51:03 -08:00
Tim Abbott 7fd582025f message_list: Extract render_group_display_date. 2019-02-08 11:45:21 -08:00
Tim Abbott 0aa438e199 message_list: Rename update_group_time_display.
The name now reflects that this is about date dividers.
2019-02-08 11:30:58 -08:00
Tim Abbott 21a86f3ef7 message_list: Rename show_date_separator to show_group_date_divider. 2019-02-08 11:30:15 -08:00
Tim Abbott 0d66d3fafd message_list: Rename show_date to group_date_divider_html.
This is much more clear about what this actually means.
2019-02-08 11:26:24 -08:00
Tim Abbott 72bb3fb6c2 message_list: Extract clear_date_divider_html.
This also fixes the fact that the logic had swapped which object
should be undefined and which should be false.
2019-02-08 11:20:00 -08:00
Rishi Gupta fe28d0731e org settings: Move "allow message content in email" to different subsection. 2019-02-08 10:16:09 -08:00
Rishi Gupta 3a26daf911 org settings: Remove unnecessary titles from Organization settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 65f6bea7d7 org settings: Move video chat provider into other settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 16042ba15d org settings: Reorder the major sections of Organization settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 76488bd2fe settings: Remove button styling from role. 2019-02-08 10:16:09 -08:00
Abhinav Singh 849c296f90 popovers: Fix 'w' hotkey in narrow windows.
In small screen sizes, when the user presses shortcut `w` to search
for another user, the hide_all function calls in the search code path
would hide the right sidebar, immediately after opening it, making the
hotkey basically unusable.

We fix this by extracting a separate hide method that hides all true
popovers, but not the user list sidebar.

Fixes #11463.
2019-02-08 08:42:34 -08:00
Puneeth Chaganti b6cf14608d upload: Ensure correct textarea is focused when an upload finishes.
The `uploadFinished` code switches on the composing mode, if we aren't
in the composing mode already. This causes the focus to be incorrect
when this code path runs due to an upload from the message edit
box. This commit fixes that logic to turn on the composing mode or
switches focus to the message edit box, depending on where the upload
was triggered.
2019-02-08 07:45:41 -08:00
Steve Howell d7f9a21519 api docs: Move json-api-example css to portico.scss.
We didn't need to patch the third-party bootstrap code for this.
2019-02-08 07:42:32 -08:00
Vishnu Ks 6ed6bcef05 invites: Move multiuse invite status to footer. 2019-02-07 15:41:00 -08:00
Vishnu Ks b62bd83083 invites: Add generate multiuse invite button. 2019-02-07 15:41:00 -08:00
Steve Howell 0e65e74566 refactor: Make build_topic_popover() not rely on HTML.
Now all the markup-specific finding of elements just
happens in the click handler.
2019-02-07 15:19:55 -08:00
Steve Howell b5347c78b2 scrolling: Fix sidebar size calculation.
So the top navbar is above the left sidebar
on the z-axis, not the y-axis.

So it doesn't make sense to use the top
navbar in calculating the size of the left
sidebar.

It kind of coincidentally works, since these
two numbers are closely related:

    left sidebar top margin = 50
    navbar height = 40

Calculating `bottom_sidebar_height` correctly
decreases its value by 10.

And then the only value that depends on it
is `stream_filters_max_height`.  We were
subtracting out 10 there to make it work,
since `bottom_sidebar_height` was inaccurate
by +10.  Now that's fixed.

The comment there was inaccurate--the
`stream_filter` div actually has a bottom
margin of 22px.  The bottom margin does
have some consequences for scrolling,
but the main goal here is to make the
calculation return the same value but
be more accurate about what happens
toward the top of the screen.
2019-02-07 15:19:55 -08:00
Steve Howell e7ead7383d css: Add explicit padding below the navbar.
We have always intended to have 10px of whitespace
below the navbar, and this enforces it directly
and explicitly in the CSS.

Note that the three major panels still should
have a margin of 50px, which is equal to
the safe outer height of the header (40px + 10px).
2019-02-07 22:36:08 +00:00
Rishi Gupta 0f3125582b org settings: Reposition instructions for user groups, and hide from guests. 2019-02-07 11:46:09 -08:00
Rishi Gupta 9f2995a6f6 org settings: Reorder options under org permissions -> other permissions. 2019-02-07 11:46:09 -08:00
Rishi Gupta 9572c5ddb0 org settings: Update explanation for Default user settings. 2019-02-07 11:46:09 -08:00
Rishi Gupta abe67a3000 org settings: Reorder options in org settings -> message edit. 2019-02-07 11:46:09 -08:00
butchyyyy c1a47012fd jenkins: Update integration for new plugin release.
Fixes #11425.
2019-02-07 11:35:26 -08:00
Rishi Gupta aae9773f09 delete topic: Update wording in confirmation modal. 2019-02-06 22:16:24 -08:00