zulip/static
Shubham Padia 36707a33ca search: Add a basic implementation of search pills.
Following points have been implemented in this commit:
1.) Add search pill on selecting typeahead.
2.) Re-narrow after removing a search pill.
3.) Add quiet optional parameter to removeLastPill.
4.) Pre populate search pills in narrow.activate.
5.) Clear existing search pills on narrow.deactivate.

Description of above points:
1.) I tried out using the description from suggestions.lookup_table
to append a pill using appendValidatedData so that the description
had not to be calculated again. But the description in the suggestions
lookup contains html due to highlighting. This html is escaped when
inputed in a pill. An attempt was also made to remove the higlighting
by replacing the tags. But other espaced characters like < also
popped up, so it was better to use append_search_string.
3.) If one wants to refresh the pill using pill.clear and wants to
repopulate them, evaluating the event_handler associated with the
action of removing the pill may not be desired.
4.) Pill population code is added to narrow.activate. Pills are not
populated if the narrow was triggered by search as search handles the
addition and removal of pill by itself. The reason for not handling
search too in narrow.activate is to avoid clearing the pills and
repopulating them. Example of some of the triggers for narrow.activate
include `restore draft`, `topic change`,`sidebar`.

Also modifies tests for search.js
2018-07-23 11:29:10 -07:00
..
assets Fix favicon generator script. 2018-01-30 10:32:55 -08:00
audio
generated
html HTML validation: Remove xmlns:svg attribute. 2018-07-09 09:45:42 +05:30
icons/fonts Generate custom-icon-webfont on each provision or update-prod-static. 2017-11-20 16:36:49 -08:00
images webhooks: Add Clubhouse integration. 2018-07-01 04:01:17 -07:00
js search: Add a basic implementation of search pills. 2018-07-23 11:29:10 -07:00
locale i18n: Update translations. 2018-04-17 12:41:06 -07:00
styles search: Add a basic implementation of search pills. 2018-07-23 11:29:10 -07:00
templates subs: Replace tr block with t in subs handlebars template. 2018-07-23 10:55:16 -07:00
third jquery-form: Remove jquery-form plugin dependency. 2018-05-29 15:44:40 -07:00
ts webpack: Upgrade webpack version 4.5.0. 2018-04-23 15:49:33 -07:00
.gitignore i18n: Make Git ignore mobile.json resources. 2018-01-29 12:49:51 -08:00
favicon.ico
node_modules