Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
f0a680e4
Commit
f0a680e4
authored
May 23, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `animate` config settings.
Also update tests
parent
04af3eb0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
32 deletions
+16
-32
docs/source/configuration.rst
docs/source/configuration.rst
+0
-7
spec/roster.js
spec/roster.js
+14
-22
src/converse-rosterview.js
src/converse-rosterview.js
+2
-2
src/headless/converse-core.js
src/headless/converse-core.js
+0
-1
No files found.
docs/source/configuration.rst
View file @
f0a680e4
...
...
@@ -219,13 +219,6 @@ Support for `XEP-0077: In band registration <https://xmpp.org/extensions/xep-007
Allow XMPP account registration showing the corresponding UI register form interface.
animate
-------
* Default: ``true``
Show animations, for example when opening and closing chatboxes.
archived_messages_page_size
---------------------------
...
...
spec/roster.js
View file @
f0a680e4
...
...
@@ -123,25 +123,17 @@
const
filter
=
_converse
.
rosterview
.
el
.
querySelector
(
'
.roster-filter
'
);
const
names
=
mock
.
cur_names
;
test_utils
.
openControlBox
();
_converse
.
rosterview
.
update
();
// XXX: Will normally called as event handler
expect
(
_
.
isNull
(
filter
)).
toBe
(
false
);
await
test_utils
.
waitUntil
(()
=>
!
u
.
isVisible
(
filter
));
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
_converse
.
roster
.
create
({
ask
:
null
,
fullname
:
names
[
i
],
jid
:
names
[
i
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
,
requesting
:
'
false
'
,
subscription
:
'
both
'
});
_converse
.
rosterview
.
update
();
// XXX: Will normally called as event handler
}
test_utils
.
createContacts
(
_converse
,
'
current
'
).
openControlBox
();
const
view
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
);
const
flyout
=
view
.
el
.
querySelector
(
'
.box-flyout
'
);
const
panel
=
flyout
.
querySelector
(
'
.controlbox-pane
'
);
function
hasScrollBar
(
el
)
{
return
el
.
isConnected
&&
el
.
parentElement
.
offsetHeight
<
el
.
scrollHeight
;
return
el
.
isConnected
&&
flyout
.
offsetHeight
<
pan
el
.
scrollHeight
;
}
await
test_utils
.
waitUntil
(
()
=>
hasScrollBar
(
_converse
.
rosterview
.
roster_el
)
?
u
.
isVisible
(
filter
)
:
!
u
.
isVisible
(
filter
)
);
const
el
=
_converse
.
rosterview
.
roster_el
;
await
test_utils
.
waitUntil
(()
=>
hasScrollBar
(
el
)
?
u
.
isVisible
(
filter
)
:
!
u
.
isVisible
(
filter
),
900
);
done
();
}));
...
...
@@ -321,25 +313,25 @@
jid
=
mock
.
cur_names
[
4
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
_converse
.
roster
.
get
(
jid
).
presence
.
set
(
'
show
'
,
'
dnd
'
);
test_utils
.
openControlBox
();
const
button
=
_converse
.
rosterview
.
el
.
querySelector
(
'
span[data-type="state"]
'
);
button
.
click
();
const
roster
=
_converse
.
rosterview
.
roster_el
;
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
15
,
500
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
15
,
900
);
console
.
log
(
'
First await
'
)
const
filter
=
_converse
.
rosterview
.
el
.
querySelector
(
'
.state-type
'
);
expect
(
sizzle
(
'
ul.roster-group-contacts
'
,
roster
).
filter
(
u
.
isVisible
).
length
).
toBe
(
5
);
filter
.
value
=
"
online
"
;
u
.
triggerEvent
(
filter
,
'
change
'
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
1
,
5
00
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
1
,
9
00
);
expect
(
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
pop
().
textContent
.
trim
()).
toBe
(
'
Rinse Sommer
'
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
ul.roster-group-contacts
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
1
,
500
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
ul.roster-group-contacts
'
,
roster
).
filter
(
u
.
isVisible
).
length
===
1
,
900
);
console
.
log
(
'
Second await
'
)
const
ul
=
sizzle
(
'
ul.roster-group-contacts
'
,
roster
).
filter
(
u
.
isVisible
).
pop
();
expect
(
ul
.
parentElement
.
firstElementChild
.
textContent
.
trim
()).
toBe
(
'
friends & acquaintences
'
);
filter
.
value
=
"
dnd
"
;
u
.
triggerEvent
(
filter
,
'
change
'
);
await
test_utils
.
waitUntil
(()
=>
sizzle
(
'
li
'
,
roster
).
filter
(
u
.
isVisible
).
pop
().
textContent
.
trim
()
===
'
Annegreet Gomez
'
,
900
);
console
.
log
(
'
Third await
'
)
expect
(
sizzle
(
'
ul.roster-group-contacts
'
,
roster
).
filter
(
u
.
isVisible
).
length
).
toBe
(
1
);
done
();
}));
...
...
src/converse-rosterview.js
View file @
f0a680e4
...
...
@@ -867,13 +867,13 @@ converse.plugins.add('converse-rosterview', {
}
},
100
),
update
:
_
.
debounce
(
function
()
{
update
()
{
if
(
!
u
.
isVisible
(
this
.
roster_el
))
{
u
.
showElement
(
this
.
roster_el
);
}
this
.
filter_view
.
showOrHide
();
return
this
;
},
_converse
.
animate
?
100
:
0
),
},
filter
(
query
,
type
)
{
// First we make sure the filter is restored to its
...
...
src/headless/converse-core.js
View file @
f0a680e4
...
...
@@ -188,7 +188,6 @@ _converse.CONTROLBOX_TYPE = 'controlbox';
// ----------------------------
_converse
.
default_settings
=
{
allow_non_roster_messaging
:
false
,
animate
:
true
,
authentication
:
'
login
'
,
// Available values are "login", "prebind", "anonymous" and "external".
auto_away
:
0
,
// Seconds after which user status is set to 'away'
auto_login
:
false
,
// Currently only used in connection with anonymous login
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment