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` |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
icons/fonts | ||
images | ||
js | ||
locale | ||
styles | ||
templates | ||
third | ||
ts | ||
.gitignore | ||
favicon.ico | ||
node_modules |