Skip to content

Conversation

@imalfect
Copy link
Contributor

This PR creates a new scrollable_table.rs file which contains utility functions that implement table pagination and navigation. Table navigation logic in screens was replaced with it, which reduces code duplication. On top of that, it also adds the pagination feature (which was recently implemented in the peers screen) to other screens that have interactive tables.

…ation

makes table navigation easier to implement in new screens and also more consistent, in a single place and not repeated in many screens, also supports pagination (pgup/pgdown)
…for table navigation

also adds pagination to pages that did not support it before
Copy link
Contributor

@aszepieniec aszepieniec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent PR, excellent work -- not least because of image!

I reviewed the code changes and they look good to me. I would merge but I did notice two strange behaviors that I would like to poke your brain about first. Maybe they are a very small change away from being fixed.

  1. Something weird happens in the Peers screen when the terminal window is only 6 rows high. The table header is being rendered over the canvas borders.
  2. The table on the Mempool screen is not scrollable. Is that by design? (I ask because in the future we might want more fine-grained control over individual transactions in the mempool with commands like "upgrade now" or "bump in priority" or "(re-)broadcast".)

@imalfect
Copy link
Contributor Author

imalfect commented Nov 20, 2025

Screenshot 2025-11-20 at 00 57 36 I see it, same seems to happen on the master branch, could it be because of the label that shows the number of peers connected? It's the only screen with a label like that, and other table-screens render just fine on that size, I'll have a deeper look on the _layout math_ tomorrow
  1. I think the original author of that file left it out, certainly not a problem though, I can add that functionality

once solved I'll include both as commits to this PR

@aszepieniec
Copy link
Contributor

@imalfect: Are you still working on this PR?

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

Successfully merging this pull request may close these issues.

2 participants