Commit Graph

54 Commits

Author SHA1 Message Date
Steve Howell c125ba1d08 Fix how we find if streams are muted.
This commit changes stream_data.in_home_view() to
take a stream_id parameter, which will make it more
robust to stream name changes.

This fixes a bug.  Now when an admin renames a stream
you are looking at, it will correctly show itself to
be un-muted. (Even with this fix, though, the stream
appears to be inactive.)

Some callers still do lookups by name, and they will
call name_in_home_view() for now, which we can
hopefully deprecate over time.
2017-05-15 14:47:41 -07:00
Steve Howell 742c55f514 Speed up key handling by adding modals.is_active().
The function modals.is_active() can see if modals are open
without having to look at the DOM.  This should make it snappier
to type in the compose box.  Even if the speedup is pretty minor,
not having to worry about jQuery slowness should make it easier
to diagnose future compose box issues.

The new function gets used in other places, too, where performance
isn't so much an issue.
2017-05-08 22:04:56 -07:00
Steve Howell d026344b37 Extract js/ui_util.js. 2017-03-19 11:05:45 -07:00
Steve Howell 5b2407bb22 Add ui_state.home_tab_obscured() shim. 2017-03-19 10:56:09 -07:00
Tim Abbott 5e39ccd642 js: Rename viewport.js to message_viewport.js.
This fixes the mobile web experience for Chrome on iOS.

Apparently, Chrome-on-iOS silently has a `viewport` module that
overrides and user-defined module by that name, causing all of our
code that accesses the viewport module to not work on that platform.
We fix this by renaming it.
2017-03-10 14:59:59 -08:00
Raghav Jajodia c17e574211 Remove product_name setting and return to harcoding 'Zulip'.
This removes some confusion in grep for frontend strings with Zulip in
them and also cleans up the code in some places.

Fixes #1602.
2017-03-09 21:48:15 -08:00
Steve Howell 477b4af39d Direct new users to the "new members" stream.
If a new user is auto-subscribed to a stream called "new
members", we will automatically narrow them to that stream
after the tutorial.  Otherwise, we fall back to the code's
previous behavior, which is to direct them to the notifications
stream (often called "announce").

This is somewhat experimental.  If we try this concept out on
the public Zulip realm and it works well, we will create a nice
realm setting for the "new members" stream.
2017-01-19 14:58:31 -08:00
Tim Abbott 998dff9e50 lint: Add dangling commas in JavaScript objects. 2017-01-11 15:23:42 -08:00
Tim Abbott 39f0ffdedd Move static/third/gemoji to static/generated/emoji.
Fixes #1153.
2016-12-27 20:16:23 -08:00
Tim Abbott 2c940b93ab js: Fix some minor whitespace issues. 2016-12-02 18:39:30 -08:00
AZtheAsian 5e9918135b eslint: change quote-props from off to error and fix violations. 2016-12-02 18:35:53 -08:00
Tim Abbott ebe959f2b0 tutorial: Remove low-quality alert bar onboarding flow.
This alert bar thing was buggy and didn't look that good, so let's
just remove it.  We can always write a nicer thing advertising the
desktop app later.
2016-11-02 23:41:16 -07:00
Rishi Gupta bba2465f89 Change links to /api to be relative or with {{ realm_uri }}. 2016-09-08 17:05:34 -07:00
Rishi Gupta 902a7fbfe9 Change relative paths to absolute paths when we don't want the subdomain.
Changes relative path to an absolute path (that doesn't contain the
subdomain) for various links to
/create_realm, /api, /apps, /integrations, /hello, /terms, and the logged
out / (the Zulip in the upper left corner of portico)

I typically left links internal to the relevant pages (e.g. a link from
integrations.html to a subpage of integrations/) as relative links, and
changed external links from within the app to the absolute path (e.g. the
link to integrations from the gear menu).
2016-08-13 16:27:36 -07:00
Taranjeet 3ca76b63c9 Remove use of $(document).data('events') to enable jQuery 1.8 upgrade.
jQuery renamed this (not supported) API in jQuery 1.8.

Fixes #1034.
2016-06-23 14:06:47 -07:00
Vishnu Ks 055c7eed04 Tweak the CSS of skip-tutorial button. 2016-06-21 14:23:17 -07:00
Umair Khan c8d139b2b1 Fix emoji urls interaction with i18n.
When accessing emojis with relative urls we should start the urls with
a slash so that language code doesn't become part of these urls.

Fixes #1014.
2016-06-13 09:10:11 -07:00
gregmccoy 1844f1b054 Add button to exit the Zulip tutorial.
Fixes: #872.

[Tweaked by tabbott to fix focus and rename to "Exit tutorial".]
2016-06-06 14:38:11 -07:00
Rachel Kelly df36216914 Change instances of 'coworkers' to 'users'.
In order to genericize use of Zulip outside companies,
    all instances of coworkers have been changed to users.
    NOTABLE EXCEPTION: When the Zulip instance is domain-
    locked, the reference to coworkers remains.  The reason
    for this is twofold: first, the majority of Zulip instances
    which require a particular domain will be locked to a
    company, and second, the template variable for the domain
    necessary should be added to the alert so it is clear
    to the user what the domain needs to be for access.

Fixes: #861.
2016-06-02 16:05:27 -07:00
Tim Abbott e3435b9613 Fix broken link to the cute guinea pig image in tutorial.
This link was broken when we hardened the access model for user file
uploads to not work cross-realm.  The right solution is just to
include the image in the codebase so it's guaranteed to exist.

Fixes #205.
2016-01-09 22:52:35 -08:00
Tim Abbott cd0a8e7e5a Marshall tutorial route inputs as JSON strings.
These routes previously didn't follow our standard convention of
sending arguments in JSON format, and so broke when we started
checking the argument format in
123d51e3aa.

Fixes #333.
2015-11-24 22:46:25 -08:00
Tim Abbott fcec80461b Remove the SSO-only realm integration.
It's messy code, only one customer ever used it, and it's not in use
today.

(imported from commit af3f512ac6af74af66c588c7d40d699e98514d0a)
2015-09-19 21:54:51 -07:00
Waseem Daher c90b76444d More whitelabeling stragglers.
Most notably:
* Tutorial
* Some Handlebars templates
* Some modals

(imported from commit b9fb92fa2f0f78d1efbd8f7fcd280fa5652059a8)
2014-07-29 21:46:33 -07:00
Zev Benjamin 2f7af69091 Add customizations for CUSTOMER16 employees' realm
CUSTOMER16 wants their employee realm to:
* only use JWT logins
* have name changes be disabled (they want users' full names to be the
  their CUSTOMER16 user name).
* not show the suggestion that users download the desktop app

(imported from commit cb5f72c993ddc26132ce50165bb68c3000276de0)
2014-04-04 16:51:32 -07:00
acrefoot c69f1dae3f Prevent resize operations from trying to access the reply() tutorial after the tutorial has finished
I had to move a function to prevent linter errors

(imported from commit 7634bd7d29ca2d204d17566f166ce9d580aaac4b)
2014-03-14 20:49:00 -04:00
Steve Howell d52e5e551d Remove {show,destroy}_first_run_message.
We essentially inlined the methods in the three places they
were called.

(imported from commit 622ee718d6dd226187f1e37ff754ee2fa635e6f2)
2014-03-14 20:48:54 -04:00
Leo Franchi 568c33f294 Render messages as groups of divs instead of individual rows
Now that we no longer use tables for our message list, we can
more logically group messages together.

(imported from commit 9923a092f91a45fe3ef06f2f00e23e4e3fb62a37)
2014-02-27 20:25:23 -05:00
Steve Howell 10b24f77b6 Fix misc. uses of search tuples.
(imported from commit c7dc47c1396eb0d9f6821cafcb3dc90d283b4764)
2014-02-10 15:11:43 -05:00
Steve Howell 583dae72a3 Change how the tutorial overrides the default stream color.
The tutorial introduces "engineering" messages that might not
be in the user's normal subscription, and they would get a gray
border if we did not override the stream color.  Before this change,
we accomplished this by overriding the core data structure in
stream_data.js.  Now we are a bit more future-proof; we only
override stream_color.default_color.

(imported from commit 0d0845b72f766912679f5aa7641ae9a60fdbb4ce)
2014-02-06 12:09:51 -05:00
Jessica McKellar a32b326ff2 Make tutorial respond to window resize events.
(imported from commit 4d7af1df04db8e2ef344e4c8e572d1a702309f73)
2014-02-04 15:51:53 -05:00
Jason Michalski 0e1909f489 Prevent errors in get_updates_success from stopping the event loop
Add try/catch blocks to get_updates_success and send a blueslip error on
errors we catch. This will let get_updates_success return successfully
so that the next call to get_updates will start immediately.

(imported from commit 44d8b85d9d8e930a5552a5fbf4af1d0e5e8c07e8)
2014-02-03 15:28:27 -05:00
Tim Abbott 1eb294ed11 Rename get_updates to get_events in the frontend.
We did this rename on the backend ages ago.

(imported from commit 11bdf6aa08d932fe2586de282f6174e3dba7267a)
2014-01-30 17:23:52 -05:00
Tim Abbott a7b1b29bf0 Move get_updates into a module.
(imported from commit 9a6c0ab1e76dd96abad8626bc5b1fdbd234b2645)
2014-01-30 15:57:28 -05:00
Jessica McKellar ee7a1f0953 tutorial: add helpful in-app links and be consistent with realm welcome message.
(imported from commit 2057dbe2606d32721192021ed2046ed9f412d8a7)
2014-01-23 17:06:29 -05:00
Jessica McKellar 993a20bdee tutorial: be flexible about the work-focused warm-up message recipient.
(imported from commit 190f0cb27dda8cb89c2682affe1daee4248fe846)
2014-01-23 17:06:28 -05:00
Jessica McKellar 117c98796e Send some messages to warm up the first user in a realm.
(imported from commit b4d92d474b27c9a0eabf99576a0f441a7d919106)
2014-01-23 17:06:28 -05:00
Jessica McKellar fcd89d5861 tutorial: show content as if in a stream narrow.
(imported from commit 716640dd5d0abeafdd8fd2f1b033a6203486a405)
2014-01-23 17:06:27 -05:00
Jessica McKellar ebd6408ec7 Make the tutorial shorter, and visually highlight important concepts.
(imported from commit 543d0ff838edbc2148df4b8d08331c793c7af4f6)
2014-01-23 17:06:27 -05:00
Jessica McKellar a677db4672 Start users in a narrow to the notifications stream after the tutorial.
They'll see the welcome messages they need without being overwhelmed
by the home view.

(imported from commit 195cb4defa1dc0aa5ba8870226036e4dfd111c0f)
2014-01-23 17:06:27 -05:00
Jessica McKellar e5a24c2d21 tutorial: tweak Desktop app banner language.
(imported from commit 727dd269314092a28b39e43300ee322416e3e18e)
2014-01-23 17:06:26 -05:00
Jessica McKellar 33bcd1977a Show the first person in the realm an invite banner if they are alone.
Previously we unconditionally showed the "get the desktop app"
banner. Now, if the first user declines to invite people as part of
their onboarding workflow, show the invite banner instead.

(imported from commit f7892fef17c923154a700149b8f5be99e9c03fa0)
2014-01-13 10:36:48 -05:00
Jessica McKellar e9dc149340 Make custom-alert-bar-content customizable.
(imported from commit 9947b15596fc818fcf3106606d1e638073a415f8)
2014-01-13 10:36:48 -05:00
Jason Michalski 1246ee3acd Focus all of the next buttons in the tutorial
All of the buttons in the tutorial now have focus to spamming enter will
get to the end.

(imported from commit dc620a28b2c0c3a316a0e91438baf1e284e29e83)
2014-01-07 15:07:15 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Kevin Mehall bc36aad698 Show desktop apps alert when tutorial completes
(imported from commit 7719ec798dbcca519fd79ac8da9196e1a862764f)
2013-09-19 13:23:35 -04:00
Jessica McKellar 908abbbd8b tutorial: adjust the placement of the stream and subject popovers.
(imported from commit e61df7b0ac25d63601763a37007d9f4cefded081)
2013-08-27 15:09:28 -04:00
Jessica McKellar eacd27dc8f Don't let the tutorial popovers get clipped on long names or small windows.
(imported from commit 069016ab38eb2d0d09b751ca22a53aba9d6980ba)
2013-08-27 15:09:28 -04:00
Zev Benjamin 3a70c4e928 dict: Make copying Dict constructor a class constructor method
(imported from commit 7bd5f6029c1290036a47688cf2b80f9317fe9c13)
2013-08-20 15:35:53 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Tim Abbott e2413e8137 Defer processing of get_old_messages results during tutorial.
Previously we would just discard the results of get_old_messages,
which meant that any messages sent either while you were doing the
tutorial or that you started out with (as in the case of the CUSTOMER3
experiment) would be lost until you reloaded.

(imported from commit f5280c091ab6ed7c2af6eb8fe49c0fa6b997ac97)
2013-08-12 10:17:18 -04:00