navbar: Clean up implementation of tab_bar.narrow_description hover.

This handler adds a neat little effect whereby hovering over the
clickable region to open the navbar triggers the search_icon hover
effect and is a neat little visual cue about what happens onClick.

The previous implementation was slightly messy because it fetched the
color and applied it via ".css(". This commit cleans it up by creating
and using the class "search_icon_hover_highlight" instead. We also
make the selectors more specific, ensuring they target children of
"#tab_bar", this was so because it was reasonable to expect someone to
define eg `search_closed` elsewhere and we wanted to prevent bugs when
that happened.
This commit is contained in:
YashRE42
2020-07-14 21:14:18 +00:00
committed by Tim Abbott
parent b554333421
commit 78d511fd03
4 changed files with 8 additions and 13 deletions

View File

@@ -194,7 +194,7 @@ $tab_bar.find = () => false;
compose.compute_show_video_chat_button = () => {};
$("#below-compose-content .video_link").toggle = () => {};
$(".narrow_description > a").hover = () => {};
$("#tab_bar .narrow_description > a").hover = () => {};
run_test('initialize_everything', () => {
ui_init.initialize_everything();