-
Notifications
You must be signed in to change notification settings - Fork 437
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
[stable14] Fix rendering of the participant list #1222
Merged
Ivansss
merged 6 commits into
stable14
from
stable14-1208-fix-rendering-of-the-participant-list
Sep 28, 2018
Merged
[stable14] Fix rendering of the participant list #1222
Ivansss
merged 6 commits into
stable14
from
stable14-1208-fix-rendering-of-the-participant-list
Sep 28, 2018
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
Backbone requires a unique identifier for each model in a collection to be able to properly sort the models, merge their state when updating them... In the case of participants the id is their "userId" or their "sessionId", depending on whether the participant is a user or a guest. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The participant list view was rendered on every collection event to overcome the problem of participant views not being rendered, but that caused unneeded renderings, for example when the collection was synced but it had not changed. Now that the id of models in the participant collection is properly set the view for each participant is rendered again as expected when the attributes in its model change, so it is no longer needed to render the participant list on every collection event. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Some of the attribute names, as well as the "checkSharingStatus" call, look like leftovers from a copy-paste; now the proper names are used. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the collection is sorted after an update (for example, if a user is promoted to a moderator) there is no need to render again each subview of the participant list; Marionette provides "reorderOnSort" for those cases, which simply reorders the already existing DOM nodes instead of rendering the whole list again. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The endpoints for moderation operations do not fit the default setup for Backbone models, so the operations are performed directly with AJAX requests on the view. Thus, after a successful request rendering again the view has no visible effect, as the model it is based on has not changed yet. Now the model is updated instead, which will trigger the render with the new state; that state will be later refreshed with the server state (although it should be the same) when the model is synced again. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When a participant is offline the ".participant-offline" CSS class is added to the element of its view. However, when the view is rendered again the element itself is reused and only its contents are replaced by the template. Thus, the CSS class must be explicitly removed from the element when the view is rendered if the user is now online. As the CSS class is expected (by the CSS rules) to be set on the participant element instead of on the link inside it the CSS class was removed from the template. This makes no difference, though, as "isOffline" was always undefined and thus the class was never set on the link. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Ivansss
approved these changes
Sep 28, 2018
Ivansss
deleted the
stable14-1208-fix-rendering-of-the-participant-list
branch
September 28, 2018 07:34
nickvergessen
added a commit
that referenced
this pull request
Nov 15, 2018
**Added** - Add an option to test the TURN configuration in the admin settings [#1294](#1294) **Changed** - Improve the notifications when a share password is requested [#1296](#1296) - Do not show an error when a file is shared a second time into a conversation [#1295](#1295) **Fixed** - Custom Signaling, STUN and TURN configurations are not loaded for the user requesting the password for a share [#1297](#1297) - Fix position of the contacts menu when clicking on the avatar of a chat author [#1293](#1293) - Avatars in messages/mentions by guests show the guest avatar instead of the user [#1292](#1292) - Information about user state in a call is bugged [#1291](#1291) - Wrong conversation name of password requests in the details sidebar [#1290](#1290) - Fix rendering, reloading and interaction with the participant list [#1222](#1222) [#1289](#1289) Signed-off-by: Joas Schilling <[email protected]>
nickvergessen
added a commit
that referenced
this pull request
Dec 6, 2018
**Added** - Add an option to test the TURN configuration in the admin settings [#1294](#1294) **Changed** - Improve the notifications when a share password is requested [#1296](#1296) - Do not show an error when a file is shared a second time into a conversation [#1295](#1295) **Fixed** - Custom Signaling, STUN and TURN configurations are not loaded for the user requesting the password for a share [#1297](#1297) - Fix position of the contacts menu when clicking on the avatar of a chat author [#1293](#1293) - Avatars in messages/mentions by guests show the guest avatar instead of the user [#1292](#1292) - Information about user state in a call is bugged [#1291](#1291) - Wrong conversation name of password requests in the details sidebar [#1290](#1290) - Fix rendering, reloading and interaction with the participant list [#1222](#1222) [#1289](#1289) Signed-off-by: Joas Schilling <[email protected]>
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.
Backport of #1208