Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UI when leaving current call #872

Merged
merged 6 commits into from
May 9, 2018

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented May 9, 2018

Requires #871

This pull request fixes the call UI being shown after leaving the current call.

Note that the fix just shows and hides the HTML elements when needed; a proper fix would require to introduce view objects for the call UI and things like that, but for the time being this is good enough ;-)

Unfortunately acceptance tests could not be provided; as far as I know it is not possible to grant media permissions from WebDriver (although there are some tricks to grant them beforehand when using Mozilla Firefox, but they are cumbersome to apply with Behat/Mink :-( ).

How to test:

  • Create a conversation with another user
  • Join the call with both users
  • Delete the conversation

Expected result:
The empty content message is shown.

Actual result:
The local video container and the avatar of the other user are shown; the empty content message is not shown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When explicitly leaving the current room through the room list view the
chat view was detached. However, as the internal state of the
Application object (which manages the placement of the chat view) was
not updated the chat view was always hidden from that point on until the
page was reloaded.

Moreover, as the chat view was detached only when explicitly leaving the
current room the chat view was not hidden for other users in the room if
it was deleted by a moderator.

As the "leaveCurrentRoom" event is triggered in the room channel when
the current room is left, either explicitly or implicitly, now the
Application object listens to that event and hides the chat view as
needed when it is received.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In order to check if certain conversation is the active conversation
the element for the active conversation list item with the given name
was found and then it was verified that it was visible; waiting for the
element to be visible using the implicit wait made to find the element
is a valid approach if the element is always visible when it exists in
the DOM. However, during the lapse between removing/deleting the
conversation and getting the updated conversation list from the server
the element may be hidden but exist in the DOM. Due to that it has to be
explicitly waited for the element to be visible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the chat view is shown in the main view the call UI (videos and
screens) is hidden using a CSS trick. However, when there is no chat
view in the main view the elements for videos and screens were always
visible. Those elements are initially "empty", but once the user joins a
call they are filled with contents (like the icon to mute the own audio,
or the avatar of the speaking user). As the elements were always visible
the call UI was shown in the main view after a room was left (either
explicitly or implicitly, for example, if the moderator deleted the
room), as in those cases there is no chat view hidding them.

Besides that, the empty content element was hidden when joining a call
but never shown back again. Due to that when a room was left after
joining a call the empty content element was also missing.

Now the videos, screens and empty content are explicitly shown or hidden
as needed when the user joins a call, leaves a call, or leaves a room,
just like it is done with the chat view.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added this to the 4.0 (Nextcloud 14) milestone May 9, 2018
@nickvergessen nickvergessen merged commit d53f017 into master May 9, 2018
@nickvergessen nickvergessen deleted the fix-ui-when-leaving-current-call branch May 9, 2018 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants