mirror of https://github.com/zulip/zulip.git
integrations: Add animation to integrations dropdown.
We make the integration categories dropdown gradually slide down/up rather than appearing instantenously. I believe this gives a better look to the dropdown and how it behaves. We also fiddle a bit with the code relating to angle icon in the dropdown. Basically though its behaviour was already buggy and will be addressed in an upcoming commit, we try to maintain whatever behaviour it had before introduction of the annimation effect.
This commit is contained in:
parent
11f896809f
commit
b32f54e775
|
@ -321,18 +321,19 @@ function dispatch(action, payload) {
|
|||
|
||||
function toggle_categories_dropdown() {
|
||||
var $dropdown_list = $('.integration-categories-dropdown .dropdown-list');
|
||||
$dropdown_list.toggle();
|
||||
|
||||
if ($dropdown_list.css('display') === 'none' &&
|
||||
state.category === INITIAL_STATE.category) {
|
||||
$('.integration-categories-dropdown i')
|
||||
.removeClass('fa-angle-down')
|
||||
.addClass('fa-angle-right');
|
||||
} else {
|
||||
$('.integration-categories-dropdown i')
|
||||
.removeClass('fa-angle-right')
|
||||
.addClass('fa-angle-down');
|
||||
} else {
|
||||
$('.integration-categories-dropdown i')
|
||||
.removeClass('fa-angle-down')
|
||||
.addClass('fa-angle-right');
|
||||
}
|
||||
|
||||
$dropdown_list.slideToggle(250);
|
||||
}
|
||||
|
||||
function integration_events() {
|
||||
|
|
Loading…
Reference in New Issue