-
Notifications
You must be signed in to change notification settings - Fork 428
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
Ivansss
approved these changes
May 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.