mirror of https://github.com/zulip/zulip.git
9986e41999
The following elements in the top left corner are major components of our app: All messages Private messages Starred messages Mentions We can now find them directly: $('.top_left_all_messages') $('.top_left_private_messages') $('.top_left_starred_messages') $('.top_left_mentions') Before this, we had to build up complicated selectors like below: exports.get_global_filter_li = function (filter_name) { var selector = "#global_filters li[data-name='" + filter_name + "']"; return $(selector); }; I don't think any newbie would know to grep for "global_filter", and I've seen a PR where somebody added specific markup here to "Private messages" because they couldn't grok the old scheme. Another thing to note is that we still have a "home-link" class for "All messages", which overlapped with portico code that had the same name. (There were some inaccurate comments in the code relating to the tab bar, but we don't actually have a way to click to the home view in the tab bar any more.) I'll eliminate that cruft in another commit. For this commit the four elements still have the "global-filter" class, since there's some benefit to being able to style them all as a group, although we should give it a nicer name in a subsequent commit. Most of this PR is basic search/replace, but I did add a two-line helper: `top_left_corner.update_starred_count` |
||
---|---|---|
.. | ||
00-realm-creation.js | ||
01-login.js | ||
02-site.js | ||
03-narrow.js | ||
04-compose.js | ||
05-subscriptions.js | ||
06-settings.js | ||
07-stars.js | ||
08-edit.js | ||
09-navigation.js | ||
10-admin.js | ||
11-mention.js | ||
12-toggle-message-editing.js | ||
13-user-deactivation.js | ||
14-drafts.js | ||
15-delete-message.js | ||
16-copy-and-paste.js |