dalibo / dalibo/pg_activity

use "rich" for terminal rendering

Open
#261 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
3k
Forks
190
PR merge metrics
No merged PRs in 30d

Description

I'm thinking of replacing blessed with rich as a terminal rendering library. Rich is now mature and provides high level features that would be nice for us as we could drop a bunch of custom logic on our side. In particular:

  • no more need to handle available vertical space to limit the number of processes rendered (the limit() decorator)
  • automatic cropping or wrapping of long lines
  • better handling of text split with terminal sequence (would allow to handle horizontal scrolling as suggested in #260 without loosing the formatting, or introducing a bunch of custom logic on our side)
  • native table rendering
  • "layouts" allowing to split the screen into multiple areas (possibly with fixed size, and automatic overflow handling)
  • live display, allowing to refresh only part of the ui

That would be a large refactoring. But, after having played a bit with it, I think it's worth as it will make UI development easier long term.

Thoughts?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by mapping the existing blessed-based terminal rendering implementation, then compare its responsibilities with Rich's cropping, tables, layouts, and live display; done would mean the terminal UI uses Rich while preserving the application's current rendering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.