-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(showcase): add table built-in widget showcase #335
Conversation
Deploying with Cloudflare Pages
|
d24d0d7
to
909c74f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fun Easter egg might be to use the Ratatui maintainers in the list
|
||
pub fn render(frame: &mut Frame) { | ||
let rows = [ | ||
Row::new(["1".bold(), "John".into(), "john.doe@mail.org".dim()]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add two more rows to fill the space in the image.
|
||
let table = Table::new( | ||
rows, | ||
[Constraint::Min(8), Constraint::Min(15), Constraint::Min(20)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we know the exact size of the image that we're displaying here, these lengths can be exact.
Maybe make the ID column narrower.
To fill the space better you could make the user names lower case, and add a Name column.
909c74f
to
94ff963
Compare
Pushed 94ff963 "temporarily" as I don't have much time right now. Feedback is appreciated, I think it's better but the mail could be replaced by something more interesting imo |
LGTM - merging and will propose some changes in another PR. |
Relates to #249