-
Notifications
You must be signed in to change notification settings - Fork 11
refactor(example): rework headers.lua to reusable components #76
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
base: main
Are you sure you want to change the base?
Conversation
7a723ca
to
29596b8
Compare
Hi, I refactored the example again, this time embracing more Lua-ism :) #43 |
yesterday a new utils.class function was merged. Can we externalise the headers and footers? based on this class system? @Vishrutha1909 has widgets in |
btw; should we have a panel-container? a panel that hosts sub-panels. Then we can have screen-panel, containing a header panel, a footer panel, and a body panel, where the body panel automatically gets the remaining rows... also; should we be stricter in naming? panel feels like x-y-h-w coordinates, where this system is just full-width, so maybe it should be called wdyt? |
Yup, the new utils functions are great, really would make the example more intuitive.
I'm trying to reason out why
I don't think it matter that much, never thought of |
a bar makes sense.
(with a flexbox approach one would only set height, not position, correct?) should it take a single content string? but then header might need more; 3 text elements, left middle right, bar and the 3 elements should probably have their own attributes (color etc). flexbox seems nice, renders in one direction (horizontal or vertical, in a TUI case that would be vertical). So that should go in the container class then? just brainstorming some classes;
|
Addressing #43
Sorry for the repeated PR, I messed up my other branch :(