Skip to content

Examples rearrangement #1512

@joshka

Description

@joshka

Follows on from:

Problem

  • Simple examples communicate how to use things the best. There's a lot of examples which are mini apps / demos
  • App-like demos often do a bit too much

Constraints / Needs

  • Examples are easy to find - contextual
  • Examples are easy to run
  • Examples are easy to export to the website
  • We have at least 4 and maybe more types of examples:
    1. examples for the api docs (scraped by docs.rs)
    2. example full apps / demos (demo, demo2, colors_rgb, async (github))
    3. tools which are useful for doing things (e.g. colors / modifier / constraints-explorer)
    4. small examples of each backend (missing currently we only have demo)

Solution

  • ratatui-widgets should have super simple examples - generally no more complex than E.g., docs(widgets): Add simple barchart example #1511. These will be used when scraping examples into the docs.rs page.
  • apps either stay under the ratatui/examples folder or move to a top level folder (I'm 70/30 for a top level folder, but would be fine with leaving them under ratatui directly. These should have more context about their running conditions (e.g. a full Cargo.toml / src folder / main.rs etc.)
  • Spend some time making the examples work well in the website. I'm not sure 100% what that looks like. More work / ideas needed here.

Alternatives

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions