mirror of https://github.com/zulip/zulip.git
36707a33ca
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 |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
icons/fonts | ||
images | ||
js | ||
locale | ||
styles | ||
templates | ||
third | ||
ts | ||
.gitignore | ||
favicon.ico | ||
node_modules |