Open sidebar automatically when joining a room #516
Merged
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.
Fixes #461
The sidebar has a width of 27% of the window width and a minimum width of 300px. Therefore, when the window is 1111px wide or narrower the sidebar will always be 300px wide, and when that happens it will overlap with the content area (the narrower the window the larger the overlap); this will be more evident once the chat view is shown as the main view. Due to this the sidebar is opened automatically only if it will not overlap with the content area.
With this change if the window is wide enough the sidebar will always be opened when joining a room. Should we try to be more clever about that (and take into account that soon the main view will show not only video, but also a chat when not in a call)? For example, if the user joins a room and closes the sidebar without joining a call (so she was just chatting) it may be better to not open the sidebar automatically if she changes to another room. But if she closed the sidebar because she was in a call maybe she expects it to open when joining a new room... or maybe not. It is hard to know what a user expects :-) Due to that I opted for the current approach, which is always consistent, sometimes maybe annoying ;-)