Skip to content

ui: force tables to display 10 rows#10408

Open
sopex wants to merge 17 commits into
opnsense:masterfrom
sopex:2-row-pinch
Open

ui: force tables to display 10 rows#10408
sopex wants to merge 17 commits into
opnsense:masterfrom
sopex:2-row-pinch

Conversation

@sopex

@sopex sopex commented Jun 11, 2026

Copy link
Copy Markdown
Member

Important notices

Before you submit a pull request, we ask you kindly to acknowledge the following:

Describe the problem
Phones and 4K screens make it very difficult for pixel-based minimums to work. A minimum amount of rows displayed is the way to go.

@fichtner Tagging you as the perfect tester :)
Expanding from here:
#10407

@fichtner

Copy link
Copy Markdown
Member

It would be nicer to let @swhite2 take the lead. And 3 is as bad as 2 IMO.

@sopex

sopex commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Of course.

In any case, in practice the jump is from 1.5 to 3.5 rows which is probably enough.

@fichtner

fichtner commented Jun 11, 2026

Copy link
Copy Markdown
Member

I'm leaning towards 5 or 10 if enough entries exist. As I said on mobile landscape it's rather hard to get a good overview and hitting the scroll position too then actually scroll again (still without better overview). The grids can have hundreds of entries so scrolling 2 of them at a time is weird.

Comment thread src/opnsense/www/js/opnsense_bootgrid.js Outdated
Comment thread src/opnsense/www/js/opnsense_bootgrid.js Outdated
@sopex sopex changed the title ui: force tables to display 3 rows ui: force tables to display 10 rows Jun 11, 2026
@swhite2

swhite2 commented Jun 11, 2026

Copy link
Copy Markdown
Member

@sopex testing this I see 2 issues:

  • getRows() should be recursive, as data rows may be nested on the dataTreeChildField property, see filter_rule.volt.
  • I see scrolling issues if there is too little space. Go to Aliases -> Diagnostics -> Bogons (just a large table), drag the developer tools all the way up until there is a scrollbar in both the page and the grid, then scroll the grid, it seems the page scrollbar is reset to the top with each scroll attempt.

@sopex sopex force-pushed the 2-row-pinch branch 3 times, most recently from f6dfa4e to 7ef2d2f Compare June 11, 2026 15:58
@sopex

sopex commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@swhite2 Done

@fichtner

Copy link
Copy Markdown
Member

When zooming in or reducing vertical space I still end up with the 2 entries.

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

When zooming in or reducing vertical space I still end up with the 2 entries.

On the phone?

@fichtner

fichtner commented Jun 12, 2026

Copy link
Copy Markdown
Member

On the phone?

Tested only in browser for now but this should apply to all things.

Now it works, but the irony is on larger lists it's harder to find a scrollable background to get to the apply button hidden below ;)

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@fichtner My bad. I was being overzealous in trying to keep the page from scrolling on 1080p computers. But in combination with #10409, this is a not an issue anymore.

Try it with #10409

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

Now it works, but the irony is on larger lists it's harder to find a scrollable background to get to the apply button hidden below ;)

Maybe some weird aspect ratio? You can always use the footer, the head bar, or the big menu bar :)

@fichtner

Copy link
Copy Markdown
Member

Good point. I avoided the footer thinking it doesn't work, but it does. Ok for me.

@sopex sopex requested a review from swhite2 June 12, 2026 08:56
@swhite2

swhite2 commented Jun 12, 2026

Copy link
Copy Markdown
Member

@sopex One glitch I see now is that when a grid is squashed (as always simulated on my end though dragging the developer tools up), and you scroll the grid down a bit, then create more space for the grid by increasing page height again, the grid doesn't scale with it anymore. As far as I can see the grid prioritizes resetting the grid scroll to the top, which shouldn't happen in this case. A second initiated resize will then scale the grid properly (because the scroll position is at the top).

Sorry for being annoying :)

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@swhite2 You need to try harder to annoy me. It's a bit of a unique problem, but all good :)

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

Edit: I need your help afterall, this is unstable. It doesn't work consistently.

@swhite2 If you have a better idea, otherwise this seems good.

Screen.Recording.2026-06-12.125324.mp4

@fichtner

Copy link
Copy Markdown
Member

Maybe it's already taken care of but I want to mention it -- on master the current resize still accounts for page-content-main?

Screenshot 2026-06-12 at 12 28 13

@swhite2

swhite2 commented Jun 12, 2026

Copy link
Copy Markdown
Member

@sopex what is the unstable part? It works rather well now

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@sopex what is the unstable part? It works rather well now

If it's fine on your system. Maybe it's time to kill my VM :)
Or maybe I have some weird browser caching.

@swhite2

swhite2 commented Jun 12, 2026

Copy link
Copy Markdown
Member

can you rebase this branch on master (and force push)? some git weirdness here

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

can you rebase this branch on master (and force push)? some git weirdness here

Absolutely

@swhite2

swhite2 commented Jun 12, 2026

Copy link
Copy Markdown
Member

For some reason the ipsec change from yesterday doesn't apply anymore?

@sopex

sopex commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

For some reason the ipsec change from yesterday doesn't apply anymore?

Rebase issue, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants