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

Navigation bar in the middle of the screen #66

Open
mkopyczok opened this issue Jun 26, 2024 · 9 comments
Open

Navigation bar in the middle of the screen #66

mkopyczok opened this issue Jun 26, 2024 · 9 comments

Comments

@mkopyczok
Copy link

Hi Viritin team,

I am using pagination grid with 20 elements and the content of the gird doesn't fit the default page size so I have a scrollbar available.
When I start to scroll down, for a very short moment the (bottom) pagination bar doesn't move and it stays in the middle of the screen, when I scroll to the bottom it's going back to the right position.
Here it the screenshot:
Screenshot from 2024-06-26 15-43-31
I also noticed that initially I have 2 scrollbars visible, but later grid scroll disappears:
Screenshot from 2024-06-26 15-46-33
I am not sure if I am using some wrong page settings or it's a bug?

@mstahv
Copy link
Member

mstahv commented Jul 1, 2024

Hi!

Some odd layout bug. The PagingGrid uses header/footer row to place the pagination bar, technically the bug is most likely there. Could you provide a test case how to reproduce the isssue? It might also help to know which browser/OS you are using (sometimes these are platform specific). I can then either fix it in Viritin or create an issue to flow-components repository.

@mkopyczok
Copy link
Author

Hi,

Thank you for your reply.
Please find a demo app in the attachment. You can just run the app and slowly scroll the screen.
skeleton-starter-flow-spring-24.zip

You should see similar result:
Screenshot from 2024-07-01 17-05-39

I am using ubuntu and the problem I can see in Chrome and Firefox.

@mkopyczok
Copy link
Author

Hi Matti,

Did you have time to check this issue?

Thanks,
Michał

@mstahv
Copy link
Member

mstahv commented Aug 2, 2024

Hi, I spent enough time to reproduce the issue and indeed looked like it is Vaadin Grid issue. Didn't reduce the case enough yet or figure out a workaround. I'm on a vacay and busy with some pro bono work with a big sport competition, so can't promise to look into this very soon.

@jorgheymans
Copy link

As i'm a stakeholder here as well :-P Any chance this could be looked at ? I'm happy to file an issue under Grid if needed and try to achieve something there if possible via support hours usage.

@mstahv
Copy link
Member

mstahv commented Oct 24, 2024

I reduced the issue to this: vaadin/web-components#8023

@mstahv
Copy link
Member

mstahv commented Oct 24, 2024

A workaround you might be able to use:

    // fixing row height with CSS seems to workaround the bug
    // measure value from rendered grid with web inspector, 69 happened to be the height in the reduced test
    VStyleUtil.injectAsFirst("""
    vaadin-grid::part(row) {
        height: 69px;
    }
    """
    );

@mkopyczok
Copy link
Author

mkopyczok commented Nov 4, 2024

Hi Matti,
I have seen you on Vaadin conference ;)
We have dynamic row height so your workaround doesn't work for us.
I have also tried to replace vertical layout with div structure, but still it doesn't work.
Do you have any other workaround idea?
Thanks.

@mstahv
Copy link
Member

mstahv commented Nov 4, 2024

The components team seem to have been given "low/minor" classification for the issue 😤 Comments/upvotes there or prioritising that might be the easiest/fastest way to get this fixed.

A potential workaround would be to move the "navigation bar" out of the vaadin-grid, web component. I don't think the the containing layout matters here at all. So then the PagingGrid should essentially be extending Composite instead of Grid. But that would break backwards compatibility at least to some extend and require to proxy a ton of Grid API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants