Commit Graph

4068 Commits

Author SHA1 Message Date
Brock Whittaker 04ece5e5c5 portico: Redesign /why-zulip and /for/ open-source to be more readable.
This redesigns these pages to be more readable and more in line with
the rest of the portico page styling.
2017-07-21 14:17:20 -07:00
Harshit Bansal c1dc48f41b emoji: Merge the two semantically same tips on the `Custom emoji` page.
In case the user was not allowed to upload an emoji, we were displaying
two different but sematically same tips. This commit merges them and
also updates `update_custom_emoji_ui()` function in settings_emoji.js
to live update tooltip.
2017-07-21 13:29:27 -07:00
Jack Zhang 1c9426fdce registration: Divide form into user and org sections. 2017-07-21 13:09:06 -07:00
Jack Zhang 948d9c8d29 registration: Add domain text next to subdomain input field. 2017-07-21 13:09:06 -07:00
Jack Zhang 149572e14a registration: Style register form into a centered layout. 2017-07-21 13:09:06 -07:00
Jack Zhang 0995780f82 portico: Auto-correct and error-handle short name input. 2017-07-21 13:09:06 -07:00
Jack Zhang c938c3be2d portico: Remove green checkboxes from forms.
More than half of these are buggy. Adding them back will be
separate project for the future.
2017-07-21 13:09:06 -07:00
Cynthia Lin e21c3e1cb7 settings: Nest PM content setting in Desktop notification setting.
Fixes #5879
2017-07-21 12:13:43 -07:00
Steve Howell 0e25055c1d Add explicit message field for locally_echoed.
We now set locally_echoed to true for messages that are
locally echoed, and we change some of our code to look
for this flag.
2017-07-21 11:38:25 -07:00
Steve Howell fca158e387 local echo: Remove pencil icon on failed messages.
Our code to edit messages that were echoed locally but failed
by the server was broken.  We just disable it for now.

We have opened #5841 to try to restore this functionality.
2017-07-21 11:38:25 -07:00
Steve Howell 7134bbfbe3 message edit: Prevent editing any failed messages.
Our logic for editing failed messages is broken in various ways,
so we are removing the codepath for editing for now.  We will
try to restore these features as part of #5841.
2017-07-21 11:38:25 -07:00
Steve Howell bd59b91faa reactions: Simplify markup related to message ids.
Because of local echo, message ids can change in message rows.
Having reactions use markup to indicate their message id just
creates more moving parts, since we would need to handle
message_id_changed events.

Now our handlers just call row.get_message_id() as needed.
2017-07-21 11:38:25 -07:00
Steve Howell 9a239f682d rows.js: Add get_message_id() helper. 2017-07-21 11:38:25 -07:00
Steve Howell c256b1663e local echo: Extract message_store.reify_message_id().
We no longer do the message_store piece of reifying ids
via a trigger.  We now make an explicit call to an
ordinary function.

This has several benefits:
    - no more initialize() function
    - no more scary comments about garbage collection
    - the function has a real name now
    - the function is less indented
    - we can easily see when the message_store step happens
    - simpler node tests
    - simpler tracebacks (no jQuery cruft)
2017-07-21 11:38:25 -07:00
Jack Zhang 4ea45743d0 landing-page: Remove navbar content max width.
Zulip's logo and navigation options stay aligned with the page
content on screens larger than 1440px.

Addresses #5693.
2017-07-20 16:56:29 -07:00
Steve Howell 084fc9c32a Indent topics in the left sidebar.
While demoing Zulip at PyCon, I learned that it is hard to
distinguish topics from streams in our left sidebar.
Indenting them by a few pixel seems to make it more clear
that topics belong to a stream.
2017-07-20 16:47:46 -07:00
Greg Price 0da71dfa48 gitignore: Forget obsolete path static/js/bundle.js .
We used to generate a file at this path in the static build,
but since 3f5d0e69f the corresponding output goes into
static/webpack-bundles instead.  Clear the now-dead path
from our gitignore files.
2017-07-19 14:19:20 -07:00
Greg Price 2ed02a0c5d gitignore: Anchor patterns that should be anchored. 2017-07-19 14:03:49 -07:00
Greg Price d35f062040 gitignore: Give some organization to the root .gitignore file.
Also add a comment explaining an important non-obvious wrinkle in how
paths in the format are interpreted, and adjust some paths to a
consistent style.
2017-07-19 14:02:28 -07:00
Steve Howell 8de28ec66d hotkeys: Fix glitch related to closing message edits.
If you use the escape key to close a message edit, we need
to blur out the text fields.  Otherwise, hotkeys.js thinks
we are still editing the text.  This bug would disable the
use of things like arrow keys until the user subsequently
focused another field.

We probably eventually want hotkeys.js to be smarter about
ignoring hidden fields that still have the focus, but there's
also no reason not to blur the fields here, and this is a more
local, less risky fix.
2017-07-19 10:10:35 -07:00
Brock Whittaker b78e99aa0e message-feed: Remove underline from external link icon. (#5848)
Currently when hovering over the external link icon generated when a topic contains a 
realm filter, an underline appears. This commit removes that underline.
2017-07-18 15:54:35 -07:00
Steve Howell 0deb59052e Extract get_local_notify_mix_reason().
There are also minor cleanups to notify_local_mixes() here.
2017-07-18 12:11:43 -07:00
Steve Howell eb2659a26a local echo: Rename function to notify_local_mixes().
This commit renames possibly_notify_new_messages_outside_viewport()
to the more concise name notify_local_mixes().

We really only need to call this function in one place, so we
have the caller check the `local_id` condition.  We can eventually
upstream this code even further so that it's completely
obvious that it's only ever called from the local-echo codepath.
2017-07-18 12:11:43 -07:00
Steve Howell b5cb21ab2c Remove unneeded call in maybe_add_narrowed_messages().
We were calling maybe_add_narrowed_messages() in a place
where local_id is guaranteed to be undefined, since
we always set local_id to undefined when
can_apply_locally() fails.

In turn maybe_add_narrowed_messages() was calling
possibly_notify_new_messages_outside_viewport(), which
requires a local_id to do anything meaningful.

This removes all the associated dead code--passing in
a parameter that we know always was undefined and
calling a function that we know always would no-op.

Not only does this simplify the code a bit, but it avoids
us stepping on the toes of the alternative code path that
deals with non-locally-echoed messages.
2017-07-18 12:11:43 -07:00
Steve Howell 0f7addf5e3 Clean up possibly_notify_new_messages_outside_viewport.
This commit early-exits before our loop when local_id is none,
and it tries to more clearly indicate that the callers will
generally be just calling this with messages sent on the
local-echo path.
2017-07-18 12:11:43 -07:00
Steve Howell 7d49bb8dbd Extract maybe_advance_to_recently_sent_message.
All the rest of the code in its caller was high-level dispatch
stuff, so it just looked fine of funny.
2017-07-18 12:11:43 -07:00
Steve Howell 1fd38e7e26 local echo: Make get_next_local_id() less aggressive.
We now make it so that get_next_local_id() only returns up
to 5 local ids relative to any given max id.

For example, if your pointer is at message 999, we'd give out
999.01, 999.02, ..., 999.05.

We also avoid giving out the same local id twice.  This prevents
a bug where if you had aborted a previously failed locally echoed
message, a subsequent local echo would get into a funny state.

In order to to prevent false alarms on using the same local id
twice, we call get_next_local_id() later in the try_deliver_locally()
function.
2017-07-18 12:03:16 -07:00
Steve Howell 92ad988144 local echo: Remove buggy restart-related code.
We had code that would try to re-render locally echoed messages
that were rendered right before a browser restart.  This code
has gotten buggy over time, so we are removing it for now.

We will try to re-solve the problem as part of #5825, but
possibly with a different strategy.
2017-07-18 12:03:16 -07:00
Joshua Pan 5e5ca48063 markdown.js: Fix inconsistent #**stream** on new line.
This commit removes all code related to headers because
(1) we don't need the code and (2) it splits #**stream**
as a paragraph, which we don't want. This commit also
fixes the inconsistency when #**stream** is on a new line.

Fixes #4678.
2017-07-18 11:07:25 -07:00
Pweaver (Paul Weaver) d3ffc81726 Enable Hot Module Replacement in webpack.
This allow the webbpack dev server to properly reload JavaScript modules
while running in dev without restarting the server. We need to connect
to webpack-dev-server directly because SockJS doesn't support more than
one connection on the same host/port.
2017-07-18 11:02:05 -07:00
Steve Howell 1ed35be88c stream_list: Use more direct code in build_stream_list.
We eliminate `.get(0)` calls in buld_stream_list.

The easy case is that we stop building jQuery objects
for the splitters only to pull out the DOM immediately.

The more subtle case is that we also don't do `.get(0)` calls
to get DOM out of our individual list items.  By passing
in full jQuery objects to `append()`, we should prevent ourself
from orphaning the old objects, which may in the future have
things like tooltip logic attached to them.
2017-07-18 09:58:16 -07:00
Tim Abbott 2317819e47 nginx: Use the Django 404 page for files under static/.
This elimintes the need for us to maintain duplicate copies of the
Zulip 404 error pages.

Fixes #5382.
2017-07-18 09:55:30 -07:00
Rishi Gupta a05de7ce84 settings: Fix Display Settings categorized as Language Settings.
"Display user list on left side in narrow windows." was a duplicate and
was removed.
2017-07-18 00:19:31 -07:00
Joshua Pan ec669a0c45 markdown.js: Fix inconsistent user mention on new line.
The user mention regex was checking for multiple lines,
so it broke when the user mention was on a new line.
This changes the regex AND adds a couple tests to
test inline markdown regexes.
2017-07-18 00:07:49 -07:00
Brock Whittaker 0d3ea50379 settings: Change .btn => .button components.
This changes all of the old bootstrap .btn buttons in the settings UI
to the new .button classes that they should be.
2017-07-17 17:20:09 -07:00
Vaida Plankyte c9bc803118 frontend: Change inaccurate aria-hidden assignments on buttons.
This either removes aria-hidden=true assignments from buttons with
text, or adds a span to only hide the 'x' symbol rather than the
button for closing buttons.
2017-07-17 16:40:28 -07:00
Brock Whittaker 1e7665effe message_feed: Remove unnecessary "user-select: none".
There is a "user-select: none" (cross-browser) that was put on
the #bottom_whitespace div, but the div doesn't actually have any
content that can be selected, and it also makes it difficult to
deselect selected text because when clicked over it will save the
current selection.
2017-07-17 16:27:30 -07:00
Brock Whittaker e5e73f364b settings: Change [Change] button styles. 2017-07-17 16:18:46 -07:00
Brock Whittaker 563847e5fe settings: Redesign and responsively fix account settings.
This makes the avatar portion more responsive and efficient on many
screen settings and also fixes some of the design incongruences present
on the page.
2017-07-17 16:18:31 -07:00
Brock Whittaker 3b9d084b29 settings: Modify notification settings headers for consistency.
This changes bold h4 headers to be thin h3 headers like the rest of the
pages.
2017-07-17 16:18:31 -07:00
Brock Whittaker 330a3bd144 setttings: Indent display settings checkboxes and fix header styles.
Aside from the indentation of checkboxes, the headers are added and
changed to become more unified with other page styling.
2017-07-17 16:15:04 -07:00
Brock Whittaker 005a58ecd6 settings: Add border-top to <li> for logout.
This makes the logout option in settings look more consistent with the
rest of the settings UI.
2017-07-17 16:14:46 -07:00
Brock Whittaker 38440d6ba4 Change product page nav and hero styling. 2017-07-17 16:12:36 -07:00
Brock Whittaker c27f57ed4b Change top of the /hello/ page to lighter scheme.
This changes the top of the page to a lighter scheme that uses a
gradient rather than having a dark blue background.
2017-07-17 16:10:54 -07:00
Vaida Plankyte 32c3d1b6f9 frontend: Add aria-label to organization overlay elements. 2017-07-17 11:46:41 -07:00
Vaida Plankyte 8512218899 frontend: Fix ARIA state and property values must be valid. 2017-07-17 11:46:41 -07:00
Brock Whittaker e5926d562e /help/: Fix responsiveness on mobile.
This changes the markdown section and sidebar to be the correct
height on mobile along with correcting the broken footer to always
appear below the content.

Fixes: #5798.
2017-07-17 10:59:20 -07:00
Vishnu Ks 32fddf9a8b analytics: Add translation tags to stats.js. 2017-07-16 16:20:20 -07:00
Durga Akhil Mundroy 146dfa6f0b org-permissions: Add allow_edit_history organiztion setting.
This new setting controls whether or not users are allowed to see the
edit history in a Zulip organization.  It controls access through 2
key mechanisms:

* For long-ago edited messages, get_messages removes the edit history
  content from messages it sends to clients.

* For newly edited messages, clients are responsible for checking the
  setting and not saving the edit history data.  Since the webapp was
  the only client displaying it before this change, this just required
  some changes in message_events.js.

Significantly modified by tabbott to fix some logic bugs and add a
test.
2017-07-16 10:10:06 -07:00
Cory Lynch 1dba70ca0d search_suggestion: Fix highlighting for multi-word streams.
I deleted a test case that involved a highlighted stream, but
the query was empty. This produces kind of a weird result with
typeahead_helper.highlight_with_escaping, but this function already
has coverage in node_tests/typeahead_helper.js, so the check here
was essentially redundant anyway. Specifically, the highlighter
wraps every character individually with <strong>, and looks really
messy in html.
2017-07-14 17:33:09 -07:00