We now only suggest "Home" if you have an empty search box (suggestion #1),
or if you are typing "Home". Before we'd show it as a way to get back
from various narrows. This is trac #1596.
(imported from commit 9228bf45e9aaf9912d83efdf70338abb4b7e054f)
This follows up on extracting code to js/search_suggestion.js, and all
the search tests apply to the new module.
(imported from commit dec6c8614c25b4f82da57edeaddc7cfef28260a5)
Moved 400+ lines out of search.js into search_suggestion.js. This
leaves search.js primarily responsible for lots of little DOM
interactions, whereas search_suggestion is more about data.
(imported from commit 53d08b29367c0172e483064f213538d45098279e)
1. Change code comment in search.get_suggestion.
2. Remove side effects from search.get_suggestions.
The function get_suggestions() was updating a module-scoped variable
called search_object, but now it returns a dictionary to its caller.
3. Greatly reduce the scope of the search_object var in search.js.
I also clarified the comment around it a bit. We could squeeze
the scope of search_object even further by using a function wrapper, but
this is a big enough win for now.
(imported from commit 4b633dd30ab45d24b85ea1d10df27df5aaa0c959)
I added our "static" directory to NODE_PATH for our JS unit tests.
This eliminates most of the verbosity in our require statements, but
it still requires us to explicitly call out "js" or "third"
subdirectories, which should make it a bit easier for folks reading
the tests to distinguish modules from js, third, or node itself.
(imported from commit b77a5283135d388d46f4b7e511acc59986f1a8ba)
As Kevin points out, un_narrow() itself calls casper.then() so should be
called outside of a callback, not inside one.
(imported from commit c5f02a14c750045697558aeafb070227e3a9d24c)
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).
(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
I haven't hooked this into test-all yet, but I did modify
message_tour.js to accomodate the test.
(imported from commit e58f595f4fe1160f539c18ec09dbe22eebf1f104)
1) When you send a message, restore the focus to the composebox, targeted at the same recipient
2) If the composebox is completely empty and you press up or down, have that close the composebox and take the appropriate action
3) If you started the compose via a reply option (r, enter, click), don't refocus the composebox if the cursor has changed.
(imported from commit 84545e49d06959eb62e7fd2b22e1387383df6d1d)
* Modify the narrow icon in FontAwesome to make it better align to the pixel grid and display well on Windows+Chrome.
* Move the message controls to the right
* Hide the message info icon until the message is hovered / selected
* Switch the star to a gray version
* Increase the size of the gravatar
* Adjust the spacing
* Add the right-side message pointer
* Fix private message background colors and mention colors
* Modify star count test to account for new stars
* Bug fixes for stream subscription messages and other miscellanea.
(imported from commit 3d3d9de7e03f3658c5c78b492051b2b7f795487d)
Still not perfect, but now we move the pointer down and scroll
to make sure that the newly read messages are truly marked as read
(imported from commit 2b9a14d1c8695eac0ed9fb03484068dd9b08b940)
We're still failing frontend tests randomly due to this timeout being
too short. Ultimately we should fix this by making the
wait_for_receive check smarter, but this will do for now.
(imported from commit ff4b18beb88b957c705fd98cd9064902c9985f62)
Currently our test database is backed by sqlite; this commit moves
us to using postgres for our all database needs. This, in conjunction
with the patched django on github, allow us to have fewer hacks and
more true-to-life tests. It also sets the stage for testing the bulk_create
and schema search_path patches made to django.
Developers will need to run:
./tools/postgres-init-test-db
./tools/do-destroy-rebuild-test-database
this is assuming that they have already run:
./tools/postgres-init-db
./tools/do-destroy-rebuild-database
at some point on this pg_cluster. (The ordering is important; it will other-
wise complain about the south_migration table).
(imported from commit c56c6f27e13df7ae10b2e643e65d669dde61af3d)
Specifically:
* Leave the avatar image as inline and round it.
* Move timestamp to the left column.
* Replace the "Info" link with a permanent info sign.
* Move the pointer bar to the left.
* Remove borders
* Change selection background colors, and PM colors.
* Introduce the "narrowing" icon into our FontAwesome set.
* Modify the tests to account for the new "narrowing" icon and fixed a bug in star-finding.
* Clean up CSS and add a more prominent color to private messages
(imported from commit 8a8d6de8acccc52c0d16f5d1ce31aabdc72c88c8)
Nicer URLs:
/login to login
/register to register
/signup to signup
(Step two is to remove, e.g. /accounts/home/)
Also make /login the default page when you're not logged in.
(Prior to this commit, it was annoyingly different on deployed
vs. not.)
(imported from commit 21adb7a94f03256098d15b2e608d793d3ddb5b23)
This removes the large "New stream message" and "New private message"
from the left sidebar. It also makes the default action when clicking
inside the composebox the same as the "New stream message" button used to
do (instead of replying to the stream-subject pair at the current cursor).
(imported from commit 316f03a35b781aca4c42555f74b99c4332ff42de)
Really, the "correct" way to do this is to undo "scrolltheworld", and
then just have a compose div that always lives underneath the message
list div. (This will also allow us to deal much more reasonably with
the whole "Is the composebox in focus" thing.)
In the interest of prototyping something more rapidly, though, we
adopt the somewhat more hackish approach, with the understanding that
much of it will probably be simplified later.
(imported from commit e2754be155c522b6dac28e7b84c62bd2030217c8)
This commit also fixes a bug where "starred messages" wouldn't get
bolded when you narrowed to starred messages. However, it also
introduces a regression where subjects aren't highlighted correctly
on load to a narrow which will be fixed shortly.
(imported from commit 411575d92762e41d04c1baf126c0ab1dfb4225a5)
* renamed the 'icon-star' style to 'icon-vector-star' to keep backwards compatibility for icon-* classes
* changed relevant styles in zephyr.css; added FontAwesome assets
* changed relevant CSS classes in base.html, left-sidebar.html, ui.js, message.handlebars
* added new fonts.css to start consolidating all font-based assets
* added fonts.css to PIPELINE_CSS in settings.py under 'portico' and 'app'
* modified the stars test suite to reflect new star icon class name.
(imported from commit 3116fcfd4b5fb4edecd457da554fea616bb7081b)