Thanks for considering a contribution. Ono is a library of themeable terminal UI components for Ratatui.
This doc covers everything you need to hack on the crate itself. If you just want to use ono, the README is the right starting point.
- Open an issue before a large PR. Small fixes (bugs, docs, typos) β send the PR. Anything that adds API surface, changes a palette role, or introduces a new component should start as an issue so we can align before code is written.
- One change per PR. Refactors, features, and unrelated cleanup go in separate PRs.
Requires Rust 1.85+ and just for the dev recipes.
git clone git@github.com:nullorder/ono.git
cd ono
just check # cargo check --workspace --features all-themes
just format # cargo fmt --allAlways run just check before opening a PR β the default build only compiles the forest theme, so theme-gated regressions can hide.
New components start their life in experiments/, not in the shipped crate. The scratchpad has no semver contract, so it's the right place to iterate on visual and behavioural ideas before they earn a spot in ono/.
See experiments/README.md for how to run experiments, add a new one, and graduate it into the library.
Ono supports multiple built-in themes. Forest is the default and is always built; Retro, Minimal, and Cyber live behind cargo features (theme-retro, theme-minimal, theme-cyber) so users only pay for what they use.
To add another:
- Add
theme-<name>to the relevantCargo.toml[features], and include it in theall-themesaggregate. - Add the
Themevariant +Paletteconst +Knobsconst + match arms, all#[cfg(feature = "theme-<name>")]-gated. - Every theme must fill all 9 palette roles and all knob fields. No
Option<Color>. No per-component fallbacks. - Verify every experiment and component renders under the new theme:
just all-themes.
Users who need a one-off look should write a custom Palette + Knobs in their own code rather than land it upstream β see theming docs. Upstream new themes when the look is broadly useful and the palette holds up across the full component catalog.
- Fork and branch from
main. - Run
just checkandcargo fmt --all. CI checks both. - For UI-affecting changes, actually run the affected experiment / preview in a real terminal. Type-check passes β visual correctness.
- Update
CHANGELOG.mdunder the next version's section. New components, palette role changes, and breaking API changes always go in the changelog. - Open a PR with a clear description of what changed and why. Reference any related issue.
- Imperative mood (
add splash component, notadded/adds). - Conventional prefixes are welcome but not required:
feat(...),fix(...),docs(...),refactor(...). - Keep commits focused. Squash trivial fixups before opening the PR.
Starting at v0.1.0, breaking changes to any pub item under ono::theme, ono::elements, or ono::components require a minor-version bump (major once we hit 1.0). Adding a palette role or a knob field counts as breaking β Palette and Knobs are not #[non_exhaustive] because ejected theme.rs files construct them with struct literals.
The internal engine (ono::spec, ono::cli) is not covered by semver.
Open an issue at https://github.com/nullorder/ono/issues with:
- A minimal repro (ideally a small
cargo runsnippet). - Terminal + OS + Rust version.
- What you expected vs what you got. Screenshots or
vhsrecordings help for visual bugs.
By contributing, you agree your contributions will be licensed under the MIT License.