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

The F1 Help modal is too greedy #626

Closed
xsebek opened this issue Aug 6, 2022 · 3 comments · Fixed by #628
Closed

The F1 Help modal is too greedy #626

xsebek opened this issue Aug 6, 2022 · 3 comments · Fixed by #628
Labels
Bug The observed behaviour is incorrect or unexpected. T-UI Involves the user interface.

Comments

@xsebek
Copy link
Member

xsebek commented Aug 6, 2022

The F1 Help modal loads slowly and then has seemingly infinite empty space under the two tables:
Screenshot from 2022-08-06 20-03-38
I took the picture on the web branch, but it is the same on main.

Scrolling is terribly slow too. What is going on?!


After looking at the code, the culprit is the new maybeScroll function (da4db6e) which lets Help greedily take too much space.

@xsebek xsebek added Bug The observed behaviour is incorrect or unexpected. T-UI Involves the user interface. labels Aug 6, 2022
@xsebek
Copy link
Member Author

xsebek commented Aug 6, 2022

OK, so what is going on is that the custom scrolling logic does not work for the help modal.

It seems to greedily take all the provided 1'000'000 lines of vertical space. 10'000 loads much faster.

The solution would be to either use the maybeScroll function for all modals except Help or make Help not so greedy.

@byorgey
Copy link
Member

byorgey commented Aug 6, 2022

Yes, I think that's right. We should make Help not so greedy. In fact we need to overhaul Help anyway. The second table of commands needs to be removed, it is very incomplete and we now have the Commands modal anyway. The first table perhaps needs some extra stuff added to it, and it probably doesn't need to be a table. And maybe we can add some friendly text with other helpful suggestions, like where to go if you have questions (the wiki, the IRC channel, etc.), where to find example code, etc.

@xsebek
Copy link
Member Author

xsebek commented Aug 6, 2022

We will definitely need to overhaul it when we implement custom keybinding (#523). 😄

I was thinking about putting the seed number there (#359) and the used port number (#493).

@xsebek xsebek changed the title Something is wrong with the F1 Help modal The F1 Help modal is too greedy Aug 6, 2022
@mergify mergify bot closed this as completed in #628 Aug 6, 2022
@mergify mergify bot closed this as completed in 33df76a Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The observed behaviour is incorrect or unexpected. T-UI Involves the user interface.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants