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

Write a demo "layout" component #3

Open
killercup opened this issue Oct 5, 2018 · 1 comment
Open

Write a demo "layout" component #3

killercup opened this issue Oct 5, 2018 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@killercup
Copy link
Owner

killercup commented Oct 5, 2018

To make it easier to have impressive outputs for custom data types, we should offer some common layout components. These components are similar to what we already have with span; they wrap a list of of child components and render them in a specific style.

To figure out how to implement this, we should pick one or two example layout components and see what we need to do to be able to write them.

@killercup killercup added the help wanted Extra attention is needed label Oct 6, 2018
@killercup killercup changed the title Demo a "layout" component Write a demo "layout" component Oct 7, 2018
@killercup
Copy link
Owner Author

One idea for a layout component I had was to wrap some features of prettytable:

out.print(table(
    &["title", "date", "status"],
    data.iter().map(|x| (x.title, x.data.format("YYYY-MM-DD"), if x.success { "ok" } else { "error" })),
))?;

@killercup killercup added this to the v0.2 milestone Nov 1, 2018
@killercup killercup mentioned this issue Nov 5, 2018
3 tasks
@killercup killercup removed this from the v0.2 milestone Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant