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

[stable20.1] Enable pagination for main grid view #4991

Conversation

danxuliu
Copy link
Member

Backport of #4958

This ensures that the grid view in development mode will behave like the
grid view in normal mode.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will be needed for proper calculations once pagination is enabled
in the full grid view, as the local video will be shown in all pages and
thus its slot will not be available.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Besides being cleaner this will make possible to fix the grid jumping
back to the first page when the  number of videos change.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the number of participants changed or the window was resized the
current page was reset to the first one. However, now that
"displayedVideos" is a computed property and no longer reset directly in
"makeGrid()" it is no longer necessary to go back to the first page.

Moreover, as "numberOfPages" is also a computed property it can be
watched to restrict the current page to be always in range.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When there was no longer an overflow the layout hint event was not
triggered with a false value, so even if the window was resized to
accomodate the larger number of participants the hint was not
automatically removed. Now the hint is removed whenever there is no
longer an overflow or the grid is shown as a stripe.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Instead of being explicitly emitted in "makeGrid" the layout hint is now
automatically emitted based on the value of the computed properties that
it depends on.

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>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
As it is now possible to paginate in the main grid view the layout hint
to change to speaker mode is no longer needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@nickvergessen
Copy link
Member

So not sure if this was also on master, but at least with the dev dummys if you have 10 and a 3*3 grid, on the first page you have 0-7 + you (looking good) and on page 2 you have 8-9+ you.
But that page looks rather bad and your video just jumped to the top:

Page 1 Page 2
Bildschirmfoto von 2021-01-21 16-50-27 Bildschirmfoto von 2021-01-21 16-50-33

@danxuliu
Copy link
Member Author

Yes, it is in master too. I was aware of it, but although I do not like it I did not find it so bad :-P

Anyway I think it could be fixed by adding dummy elements (just empty divs) as padding in the last page so the main grid shows the local video always at the bottom right.

@nickvergessen
Copy link
Member

Sounds good (enough) for now

@marcoambrosini
Copy link
Member

I think that this can also be accomplished with css grid rules only

@danxuliu
Copy link
Member Author

I think that this can also be accomplished with css grid rules only

Oh, I have just seen it 🤦 Anyway the dirty fix is in #4996, feel free to do the proper fix and close that one :-)

@marcoambrosini
Copy link
Member

Oh, I have just seen it facepalm Anyway the dirty fix is in #4996, feel free to do the proper fix and close that one :-)

Yeah sorry to be late with that comment, I just recalled how things were done when looking into it 😅
pr here #4999

@nickvergessen nickvergessen merged commit 47f1030 into stable20.1 Jan 22, 2021
@nickvergessen nickvergessen deleted the backport/4958/stable20.1-enable-pagination-for-main-grid-view branch January 22, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants